[BACK]Return to sshd_config.5 CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Annotation of src/usr.bin/ssh/sshd_config.5, Revision 1.344

1.1       stevesk     1: .\"
                      2: .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
                      3: .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
                      4: .\"                    All rights reserved
                      5: .\"
                      6: .\" As far as I am concerned, the code I have written for this software
                      7: .\" can be used freely for any purpose.  Any derived versions of this
                      8: .\" software must be clearly marked as such, and if the derived work is
                      9: .\" incompatible with the protocol description in the RFC file, it must be
                     10: .\" called by a name other than "ssh" or "Secure Shell".
                     11: .\"
                     12: .\" Copyright (c) 1999,2000 Markus Friedl.  All rights reserved.
                     13: .\" Copyright (c) 1999 Aaron Campbell.  All rights reserved.
                     14: .\" Copyright (c) 1999 Theo de Raadt.  All rights reserved.
                     15: .\"
                     16: .\" Redistribution and use in source and binary forms, with or without
                     17: .\" modification, are permitted provided that the following conditions
                     18: .\" are met:
                     19: .\" 1. Redistributions of source code must retain the above copyright
                     20: .\"    notice, this list of conditions and the following disclaimer.
                     21: .\" 2. Redistributions in binary form must reproduce the above copyright
                     22: .\"    notice, this list of conditions and the following disclaimer in the
                     23: .\"    documentation and/or other materials provided with the distribution.
                     24: .\"
                     25: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     26: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     27: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     28: .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
                     29: .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     30: .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     31: .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     32: .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     33: .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
                     34: .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     35: .\"
1.344   ! djm        36: .\" $OpenBSD: sshd_config.5,v 1.343 2022/09/17 10:34:29 djm Exp $
        !            37: .Dd $Mdocdate: September 17 2022 $
1.1       stevesk    38: .Dt SSHD_CONFIG 5
                     39: .Os
                     40: .Sh NAME
                     41: .Nm sshd_config
1.295     jmc        42: .Nd OpenSSH daemon configuration file
1.1       stevesk    43: .Sh DESCRIPTION
1.53      jmc        44: .Xr sshd 8
1.1       stevesk    45: reads configuration data from
                     46: .Pa /etc/ssh/sshd_config
                     47: (or the file specified with
                     48: .Fl f
                     49: on the command line).
                     50: The file contains keyword-argument pairs, one per line.
1.254     benno      51: For each keyword, the first obtained value will be used.
1.1       stevesk    52: Lines starting with
                     53: .Ql #
                     54: and empty lines are interpreted as comments.
1.56      dtucker    55: Arguments may optionally be enclosed in double quotes
                     56: .Pq \&"
                     57: in order to represent arguments containing spaces.
1.1       stevesk    58: .Pp
                     59: The possible
                     60: keywords and their meanings are as follows (note that
                     61: keywords are case-insensitive and arguments are case-sensitive):
                     62: .Bl -tag -width Ds
1.30      djm        63: .It Cm AcceptEnv
                     64: Specifies what environment variables sent by the client will be copied into
                     65: the session's
                     66: .Xr environ 7 .
                     67: See
                     68: .Cm SendEnv
1.273     djm        69: and
                     70: .Cm SetEnv
1.30      djm        71: in
                     72: .Xr ssh_config 5
                     73: for how to configure the client.
1.219     jmc        74: The
1.197     dtucker    75: .Ev TERM
1.275     djm        76: environment variable is always accepted whenever the client
1.204     djm        77: requests a pseudo-terminal as it is required by the protocol.
1.30      djm        78: Variables are specified by name, which may contain the wildcard characters
1.51      jmc        79: .Ql *
1.30      djm        80: and
                     81: .Ql \&? .
1.31      djm        82: Multiple environment variables may be separated by whitespace or spread
1.30      djm        83: across multiple
                     84: .Cm AcceptEnv
                     85: directives.
1.31      djm        86: Be warned that some environment variables could be used to bypass restricted
1.30      djm        87: user environments.
                     88: For this reason, care should be taken in the use of this directive.
                     89: The default is not to accept any environment variables.
1.37      djm        90: .It Cm AddressFamily
                     91: Specifies which address family should be used by
1.53      jmc        92: .Xr sshd 8 .
1.37      djm        93: Valid arguments are
1.237     jmc        94: .Cm any
                     95: (the default),
                     96: .Cm inet
1.52      jmc        97: (use IPv4 only), or
1.237     jmc        98: .Cm inet6
1.37      djm        99: (use IPv6 only).
1.89      jmc       100: .It Cm AllowAgentForwarding
                    101: Specifies whether
                    102: .Xr ssh-agent 1
                    103: forwarding is permitted.
                    104: The default is
1.237     jmc       105: .Cm yes .
1.89      jmc       106: Note that disabling agent forwarding does not improve security
                    107: unless users are also denied shell access, as they can always install
                    108: their own forwarders.
1.1       stevesk   109: .It Cm AllowGroups
                    110: This keyword can be followed by a list of group name patterns, separated
                    111: by spaces.
                    112: If specified, login is allowed only for users whose primary
                    113: group or supplementary group list matches one of the patterns.
                    114: Only group names are valid; a numerical group ID is not recognized.
                    115: By default, login is allowed for all groups.
1.301     djm       116: The allow/deny groups directives are processed in the following order:
1.54      jmc       117: .Cm DenyGroups ,
                    118: .Cm AllowGroups .
1.49      jmc       119: .Pp
1.161     jmc       120: See PATTERNS in
1.49      jmc       121: .Xr ssh_config 5
                    122: for more information on patterns.
1.231     jmc       123: .It Cm AllowStreamLocalForwarding
                    124: Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
1.150     djm       125: The available options are
1.237     jmc       126: .Cm yes
                    127: (the default)
1.150     djm       128: or
1.237     jmc       129: .Cm all
1.231     jmc       130: to allow StreamLocal forwarding,
1.237     jmc       131: .Cm no
1.231     jmc       132: to prevent all StreamLocal forwarding,
1.237     jmc       133: .Cm local
1.150     djm       134: to allow local (from the perspective of
1.151     jmc       135: .Xr ssh 1 )
                    136: forwarding only or
1.237     jmc       137: .Cm remote
1.150     djm       138: to allow remote forwarding only.
1.231     jmc       139: Note that disabling StreamLocal forwarding does not improve security unless
1.1       stevesk   140: users are also denied shell access, as they can always install their
                    141: own forwarders.
1.231     jmc       142: .It Cm AllowTcpForwarding
                    143: Specifies whether TCP forwarding is permitted.
1.175     millert   144: The available options are
1.237     jmc       145: .Cm yes
                    146: (the default)
1.175     millert   147: or
1.237     jmc       148: .Cm all
1.231     jmc       149: to allow TCP forwarding,
1.237     jmc       150: .Cm no
1.231     jmc       151: to prevent all TCP forwarding,
1.237     jmc       152: .Cm local
1.175     millert   153: to allow local (from the perspective of
                    154: .Xr ssh 1 )
                    155: forwarding only or
1.237     jmc       156: .Cm remote
1.175     millert   157: to allow remote forwarding only.
1.231     jmc       158: Note that disabling TCP forwarding does not improve security unless
1.175     millert   159: users are also denied shell access, as they can always install their
                    160: own forwarders.
1.1       stevesk   161: .It Cm AllowUsers
                    162: This keyword can be followed by a list of user name patterns, separated
                    163: by spaces.
1.14      jmc       164: If specified, login is allowed only for user names that
1.1       stevesk   165: match one of the patterns.
                    166: Only user names are valid; a numerical user ID is not recognized.
                    167: By default, login is allowed for all users.
                    168: If the pattern takes the form USER@HOST then USER and HOST
                    169: are separately checked, restricting logins to particular
                    170: users from particular hosts.
1.222     jmc       171: HOST criteria may additionally contain addresses to match in CIDR
                    172: address/masklen format.
1.301     djm       173: The allow/deny users directives are processed in the following order:
1.54      jmc       174: .Cm DenyUsers ,
1.301     djm       175: .Cm AllowUsers .
1.49      jmc       176: .Pp
1.161     jmc       177: See PATTERNS in
1.49      jmc       178: .Xr ssh_config 5
                    179: for more information on patterns.
1.149     djm       180: .It Cm AuthenticationMethods
                    181: Specifies the authentication methods that must be successfully completed
                    182: for a user to be granted access.
1.281     djm       183: This option must be followed by one or more lists of comma-separated
1.224     djm       184: authentication method names, or by the single string
1.237     jmc       185: .Cm any
1.224     djm       186: to indicate the default behaviour of accepting any single authentication
1.225     jmc       187: method.
1.237     jmc       188: If the default is overridden, then successful authentication requires
1.224     djm       189: completion of every method in at least one of these lists.
1.149     djm       190: .Pp
1.237     jmc       191: For example,
                    192: .Qq publickey,password publickey,keyboard-interactive
1.149     djm       193: would require the user to complete public key authentication, followed by
                    194: either password or keyboard interactive authentication.
                    195: Only methods that are next in one or more lists are offered at each stage,
1.237     jmc       196: so for this example it would not be possible to attempt password or
1.149     djm       197: keyboard-interactive authentication before public key.
1.157     markus    198: .Pp
                    199: For keyboard interactive authentication it is also possible to
                    200: restrict authentication to a specific device by appending a
                    201: colon followed by the device identifier
1.237     jmc       202: .Cm bsdauth ,
                    203: .Cm pam ,
1.157     markus    204: or
1.237     jmc       205: .Cm skey ,
1.157     markus    206: depending on the server configuration.
                    207: For example,
1.237     jmc       208: .Qq keyboard-interactive:bsdauth
1.157     markus    209: would restrict keyboard interactive authentication to the
1.237     jmc       210: .Cm bsdauth
1.157     markus    211: device.
1.185     djm       212: .Pp
1.237     jmc       213: If the publickey method is listed more than once,
1.185     djm       214: .Xr sshd 8
                    215: verifies that keys that have been used successfully are not reused for
                    216: subsequent authentications.
1.237     jmc       217: For example,
                    218: .Qq publickey,publickey
                    219: requires successful authentication using two different public keys.
1.181     djm       220: .Pp
1.149     djm       221: Note that each authentication method listed should also be explicitly enabled
                    222: in the configuration.
1.251     djm       223: .Pp
                    224: The available authentication methods are:
                    225: .Qq gssapi-with-mic ,
                    226: .Qq hostbased ,
                    227: .Qq keyboard-interactive ,
                    228: .Qq none
                    229: (used for access to password-less accounts when
1.266     jmc       230: .Cm PermitEmptyPasswords
1.251     djm       231: is enabled),
                    232: .Qq password
                    233: and
                    234: .Qq publickey .
1.146     djm       235: .It Cm AuthorizedKeysCommand
1.147     jmc       236: Specifies a program to be used to look up the user's public keys.
1.201     djm       237: The program must be owned by root, not writable by group or others and
                    238: specified by an absolute path.
                    239: Arguments to
                    240: .Cm AuthorizedKeysCommand
1.235     jmc       241: accept the tokens described in the
                    242: .Sx TOKENS
                    243: section.
                    244: If no arguments are specified then the username of the target user is used.
1.201     djm       245: .Pp
                    246: The program should produce on standard output zero or
1.235     jmc       247: more lines of authorized_keys output (see
                    248: .Sx AUTHORIZED_KEYS
                    249: in
1.147     jmc       250: .Xr sshd 8 ) .
1.235     jmc       251: .Cm AuthorizedKeysCommand
1.310     djm       252: is tried after the usual
1.146     djm       253: .Cm AuthorizedKeysFile
1.310     djm       254: files and will not be executed if a matching key is found there.
1.237     jmc       255: By default, no
                    256: .Cm AuthorizedKeysCommand
                    257: is run.
1.146     djm       258: .It Cm AuthorizedKeysCommandUser
1.237     jmc       259: Specifies the user under whose account the
                    260: .Cm AuthorizedKeysCommand
                    261: is run.
1.146     djm       262: It is recommended to use a dedicated user that has no other role on the host
                    263: than running authorized keys commands.
1.186     djm       264: If
1.181     djm       265: .Cm AuthorizedKeysCommand
1.186     djm       266: is specified but
                    267: .Cm AuthorizedKeysCommandUser
                    268: is not, then
                    269: .Xr sshd 8
                    270: will refuse to start.
1.1       stevesk   271: .It Cm AuthorizedKeysFile
1.235     jmc       272: Specifies the file that contains the public keys used for user authentication.
1.285     schwarze  273: The format is described in the AUTHORIZED_KEYS FILE FORMAT section of
1.124     djm       274: .Xr sshd 8 .
1.235     jmc       275: Arguments to
1.1       stevesk   276: .Cm AuthorizedKeysFile
1.235     jmc       277: accept the tokens described in the
                    278: .Sx TOKENS
                    279: section.
1.1       stevesk   280: After expansion,
                    281: .Cm AuthorizedKeysFile
                    282: is taken to be an absolute path or one relative to the user's home
                    283: directory.
1.133     jmc       284: Multiple files may be listed, separated by whitespace.
1.212     djm       285: Alternately this option may be set to
1.237     jmc       286: .Cm none
1.212     djm       287: to skip checking for user keys in files.
1.133     jmc       288: The default is
1.237     jmc       289: .Qq .ssh/authorized_keys .ssh/authorized_keys2 .
1.202     djm       290: .It Cm AuthorizedPrincipalsCommand
                    291: Specifies a program to be used to generate the list of allowed
                    292: certificate principals as per
                    293: .Cm AuthorizedPrincipalsFile .
                    294: The program must be owned by root, not writable by group or others and
                    295: specified by an absolute path.
                    296: Arguments to
                    297: .Cm AuthorizedPrincipalsCommand
1.235     jmc       298: accept the tokens described in the
                    299: .Sx TOKENS
                    300: section.
                    301: If no arguments are specified then the username of the target user is used.
1.202     djm       302: .Pp
                    303: The program should produce on standard output zero or
                    304: more lines of
                    305: .Cm AuthorizedPrincipalsFile
                    306: output.
                    307: If either
                    308: .Cm AuthorizedPrincipalsCommand
                    309: or
                    310: .Cm AuthorizedPrincipalsFile
                    311: is specified, then certificates offered by the client for authentication
                    312: must contain a principal that is listed.
1.235     jmc       313: By default, no
                    314: .Cm AuthorizedPrincipalsCommand
                    315: is run.
1.202     djm       316: .It Cm AuthorizedPrincipalsCommandUser
1.235     jmc       317: Specifies the user under whose account the
                    318: .Cm AuthorizedPrincipalsCommand
                    319: is run.
1.202     djm       320: It is recommended to use a dedicated user that has no other role on the host
                    321: than running authorized principals commands.
                    322: If
                    323: .Cm AuthorizedPrincipalsCommand
                    324: is specified but
                    325: .Cm AuthorizedPrincipalsCommandUser
                    326: is not, then
                    327: .Xr sshd 8
                    328: will refuse to start.
1.121     djm       329: .It Cm AuthorizedPrincipalsFile
                    330: Specifies a file that lists principal names that are accepted for
                    331: certificate authentication.
                    332: When using certificates signed by a key listed in
                    333: .Cm TrustedUserCAKeys ,
                    334: this file lists names, one of which must appear in the certificate for it
                    335: to be accepted for authentication.
1.235     jmc       336: Names are listed one per line preceded by key options (as described in
                    337: .Sx AUTHORIZED_KEYS FILE FORMAT
                    338: in
1.125     jmc       339: .Xr sshd 8 ) .
1.124     djm       340: Empty lines and comments starting with
1.121     djm       341: .Ql #
                    342: are ignored.
                    343: .Pp
1.235     jmc       344: Arguments to
1.121     djm       345: .Cm AuthorizedPrincipalsFile
1.235     jmc       346: accept the tokens described in the
                    347: .Sx TOKENS
                    348: section.
1.121     djm       349: After expansion,
                    350: .Cm AuthorizedPrincipalsFile
1.235     jmc       351: is taken to be an absolute path or one relative to the user's home directory.
1.138     djm       352: The default is
1.237     jmc       353: .Cm none ,
1.138     djm       354: i.e. not to use a principals file \(en in this case, the username
1.121     djm       355: of the user must appear in a certificate's principals list for it to be
                    356: accepted.
1.235     jmc       357: .Pp
1.121     djm       358: Note that
                    359: .Cm AuthorizedPrincipalsFile
                    360: is only used when authentication proceeds using a CA listed in
                    361: .Cm TrustedUserCAKeys
                    362: and is not consulted for certification authorities trusted via
                    363: .Pa ~/.ssh/authorized_keys ,
                    364: though the
                    365: .Cm principals=
                    366: key option offers a similar facility (see
                    367: .Xr sshd 8
                    368: for details).
1.1       stevesk   369: .It Cm Banner
                    370: The contents of the specified file are sent to the remote user before
                    371: authentication is allowed.
1.78      djm       372: If the argument is
1.237     jmc       373: .Cm none
1.78      djm       374: then no banner is displayed.
1.1       stevesk   375: By default, no banner is displayed.
1.282     djm       376: .It Cm CASignatureAlgorithms
                    377: Specifies which algorithms are allowed for signing of certificates
                    378: by certificate authorities (CAs).
                    379: The default is:
                    380: .Bd -literal -offset indent
1.334     djm       381: ssh-ed25519,ecdsa-sha2-nistp256,
                    382: ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
                    383: sk-ssh-ed25519@openssh.com,
                    384: sk-ecdsa-sha2-nistp256@openssh.com,
1.330     djm       385: rsa-sha2-512,rsa-sha2-256
1.282     djm       386: .Ed
1.334     djm       387: .Pp
                    388: If the specified list begins with a
                    389: .Sq +
                    390: character, then the specified algorithms will be appended to the default set
                    391: instead of replacing them.
                    392: If the specified list begins with a
                    393: .Sq -
                    394: character, then the specified algorithms (including wildcards) will be removed
                    395: from the default set instead of replacing them.
1.282     djm       396: .Pp
                    397: Certificates signed using other algorithms will not be accepted for
                    398: public key or host-based authentication.
1.344   ! djm       399: .It Cm ChannelTimeout
        !           400: Specifies whether and how quickly
        !           401: .Xr sshd 8
        !           402: should close inactive channels.
        !           403: Timeouts for specified as one or more
        !           404: .Dq type=interval
        !           405: pairs separated by whitespace, where the
        !           406: .Dq type
        !           407: must be a channel type name (as described in the table below), optionally
        !           408: containing wildcard characters.
        !           409: .Pp
        !           410: The timeout value
        !           411: .Dq interval
        !           412: is specified in seconds or may use any of the units documented in the
        !           413: .Sx TIME FORMATS
        !           414: section.
        !           415: For example,
        !           416: .Dq session:*=5m
        !           417: would cause all sessions to terminate after five minutes of inactivity.
        !           418: Specifying a zero value disables the inactivity timeout.
        !           419: .Pp
        !           420: The available channel types include:
        !           421: .Bl -tag -width Ds
        !           422: .It Cm agent-connection
        !           423: Open connections to
        !           424: .Xr ssh-agent 1 .
        !           425: .It Cm direct-tcpip Cm direct-streamlocal@openssh.com
        !           426: Open TCP or Unix socket (respectively) connections that have
        !           427: been established from a
        !           428: .Xr ssh 1
        !           429: local forwarding, i.e.
        !           430: .Cm LocalForward or
        !           431: .Cm DynamicForward .
        !           432: .It Cm forwarded-tcpip Cm forwarded-streamlocal@openssh.com
        !           433: Open TCP or Unix socket (respectively) connections that have been
        !           434: established to a
        !           435: .Xr sshd 8
        !           436: listening on behalf of a
        !           437: .Xr ssh 1
        !           438: remote forwarding, i.e.
        !           439: .Cm RemoteForward .
        !           440: .It Cm session:command
        !           441: Command execution sessions.
        !           442: .It Cm session:shell
        !           443: Interactive shell sessions.
        !           444: .It Cm session:subsystem:...
        !           445: Subsystem sessions, e.g. for
        !           446: .Xr sftp 1 ,
        !           447: which could be identified as
        !           448: .Cm session:subsystem:sftp .
        !           449: .It Cm x11-connection
        !           450: Open X11 forwarding sessions.
        !           451: .El
        !           452: .Pp
        !           453: Note that, in all the above cases, terminating an inactive session does not
        !           454: guarantee to remove all resources associated with the session, e.g. shell
        !           455: processes or X11 clients relating to the session may continue to execute.
        !           456: .Pp
        !           457: Moreover, terminating an inactive channel or session does necessarily
        !           458: close the SSH connection, nor does it prevent a client from
        !           459: requesting another channel of the same type.
        !           460: In particular, expiring an inactive forwarding session does not prevent
        !           461: another identical forwarding from being subsequently created.
        !           462: .Pp
        !           463: The default is not to expire channels of any type for inactivity.
1.80      djm       464: .It Cm ChrootDirectory
1.113     stevesk   465: Specifies the pathname of a directory to
1.80      djm       466: .Xr chroot 2
                    467: to after authentication.
1.190     deraadt   468: At session startup
                    469: .Xr sshd 8
                    470: checks that all components of the pathname are root-owned directories
                    471: which are not writable by any other user or group.
1.106     stevesk   472: After the chroot,
                    473: .Xr sshd 8
                    474: changes the working directory to the user's home directory.
1.235     jmc       475: Arguments to
                    476: .Cm ChrootDirectory
                    477: accept the tokens described in the
                    478: .Sx TOKENS
                    479: section.
1.80      djm       480: .Pp
                    481: The
                    482: .Cm ChrootDirectory
                    483: must contain the necessary files and directories to support the
1.103     stevesk   484: user's session.
1.80      djm       485: For an interactive session this requires at least a shell, typically
                    486: .Xr sh 1 ,
                    487: and basic
                    488: .Pa /dev
                    489: nodes such as
                    490: .Xr null 4 ,
                    491: .Xr zero 4 ,
                    492: .Xr stdin 4 ,
                    493: .Xr stdout 4 ,
                    494: .Xr stderr 4 ,
1.180     jmc       495: and
1.80      djm       496: .Xr tty 4
                    497: devices.
1.237     jmc       498: For file transfer sessions using SFTP
                    499: no additional configuration of the environment is necessary if the in-process
                    500: sftp-server is used,
1.176     schwarze  501: though sessions which use logging may require
1.104     stevesk   502: .Pa /dev/log
1.176     schwarze  503: inside the chroot directory on some operating systems (see
1.104     stevesk   504: .Xr sftp-server 8
1.81      jmc       505: for details).
1.190     deraadt   506: .Pp
1.191     jmc       507: For safety, it is very important that the directory hierarchy be
1.190     deraadt   508: prevented from modification by other processes on the system (especially
                    509: those outside the jail).
                    510: Misconfiguration can lead to unsafe environments which
                    511: .Xr sshd 8
                    512: cannot detect.
1.80      djm       513: .Pp
1.215     djm       514: The default is
1.237     jmc       515: .Cm none ,
1.215     djm       516: indicating not to
1.80      djm       517: .Xr chroot 2 .
1.1       stevesk   518: .It Cm Ciphers
1.219     jmc       519: Specifies the ciphers allowed.
1.1       stevesk   520: Multiple ciphers must be comma-separated.
1.289     naddy     521: If the specified list begins with a
1.208     djm       522: .Sq +
                    523: character, then the specified ciphers will be appended to the default set
                    524: instead of replacing them.
1.289     naddy     525: If the specified list begins with a
1.242     djm       526: .Sq -
                    527: character, then the specified ciphers (including wildcards) will be removed
                    528: from the default set instead of replacing them.
1.290     naddy     529: If the specified list begins with a
                    530: .Sq ^
                    531: character, then the specified ciphers will be placed at the head of the
                    532: default set.
1.208     djm       533: .Pp
1.167     djm       534: The supported ciphers are:
                    535: .Pp
1.173     naddy     536: .Bl -item -compact -offset indent
                    537: .It
                    538: 3des-cbc
                    539: .It
                    540: aes128-cbc
                    541: .It
                    542: aes192-cbc
                    543: .It
                    544: aes256-cbc
                    545: .It
                    546: aes128-ctr
                    547: .It
                    548: aes192-ctr
                    549: .It
                    550: aes256-ctr
                    551: .It
                    552: aes128-gcm@openssh.com
                    553: .It
                    554: aes256-gcm@openssh.com
                    555: .It
                    556: chacha20-poly1305@openssh.com
                    557: .El
1.167     djm       558: .Pp
1.52      jmc       559: The default is:
1.173     naddy     560: .Bd -literal -offset indent
1.211     jmc       561: chacha20-poly1305@openssh.com,
1.173     naddy     562: aes128-ctr,aes192-ctr,aes256-ctr,
1.211     jmc       563: aes128-gcm@openssh.com,aes256-gcm@openssh.com
1.1       stevesk   564: .Ed
1.167     djm       565: .Pp
1.237     jmc       566: The list of available ciphers may also be obtained using
                    567: .Qq ssh -Q cipher .
1.1       stevesk   568: .It Cm ClientAliveCountMax
1.237     jmc       569: Sets the number of client alive messages which may be sent without
1.52      jmc       570: .Xr sshd 8
1.17      jmc       571: receiving any messages back from the client.
                    572: If this threshold is reached while client alive messages are being sent,
1.52      jmc       573: sshd will disconnect the client, terminating the session.
1.17      jmc       574: It is important to note that the use of client alive messages is very
                    575: different from
1.237     jmc       576: .Cm TCPKeepAlive .
1.17      jmc       577: The client alive messages are sent through the encrypted channel
                    578: and therefore will not be spoofable.
                    579: The TCP keepalive option enabled by
1.27      markus    580: .Cm TCPKeepAlive
1.17      jmc       581: is spoofable.
                    582: The client alive mechanism is valuable when the client or
1.288     dtucker   583: server depend on knowing when a connection has become unresponsive.
1.1       stevesk   584: .Pp
1.17      jmc       585: The default value is 3.
                    586: If
1.1       stevesk   587: .Cm ClientAliveInterval
1.237     jmc       588: is set to 15, and
1.1       stevesk   589: .Cm ClientAliveCountMax
1.52      jmc       590: is left at the default, unresponsive SSH clients
1.1       stevesk   591: will be disconnected after approximately 45 seconds.
1.302     djm       592: Setting a zero
                    593: .Cm ClientAliveCountMax
                    594: disables connection termination.
1.42      djm       595: .It Cm ClientAliveInterval
                    596: Sets a timeout interval in seconds after which if no data has been received
                    597: from the client,
1.52      jmc       598: .Xr sshd 8
1.42      djm       599: will send a message through the encrypted
                    600: channel to request a response from the client.
                    601: The default
                    602: is 0, indicating that these messages will not be sent to the client.
1.3       markus    603: .It Cm Compression
1.236     djm       604: Specifies whether compression is enabled after
1.44      markus    605: the user has authenticated successfully.
1.3       markus    606: The argument must be
1.237     jmc       607: .Cm yes ,
                    608: .Cm delayed
1.236     djm       609: (a legacy synonym for
1.237     jmc       610: .Cm yes )
1.3       markus    611: or
1.237     jmc       612: .Cm no .
1.3       markus    613: The default is
1.237     jmc       614: .Cm yes .
1.1       stevesk   615: .It Cm DenyGroups
                    616: This keyword can be followed by a list of group name patterns, separated
                    617: by spaces.
                    618: Login is disallowed for users whose primary group or supplementary
                    619: group list matches one of the patterns.
                    620: Only group names are valid; a numerical group ID is not recognized.
                    621: By default, login is allowed for all groups.
1.301     djm       622: The allow/deny groups directives are processed in the following order:
1.54      jmc       623: .Cm DenyGroups ,
                    624: .Cm AllowGroups .
1.49      jmc       625: .Pp
1.161     jmc       626: See PATTERNS in
1.49      jmc       627: .Xr ssh_config 5
                    628: for more information on patterns.
1.1       stevesk   629: .It Cm DenyUsers
                    630: This keyword can be followed by a list of user name patterns, separated
                    631: by spaces.
                    632: Login is disallowed for user names that match one of the patterns.
                    633: Only user names are valid; a numerical user ID is not recognized.
                    634: By default, login is allowed for all users.
                    635: If the pattern takes the form USER@HOST then USER and HOST
                    636: are separately checked, restricting logins to particular
                    637: users from particular hosts.
1.222     jmc       638: HOST criteria may additionally contain addresses to match in CIDR
                    639: address/masklen format.
1.301     djm       640: The allow/deny users directives are processed in the following order:
1.54      jmc       641: .Cm DenyUsers ,
1.301     djm       642: .Cm AllowUsers .
1.49      jmc       643: .Pp
1.161     jmc       644: See PATTERNS in
1.49      jmc       645: .Xr ssh_config 5
                    646: for more information on patterns.
1.239     djm       647: .It Cm DisableForwarding
                    648: Disables all forwarding features, including X11,
                    649: .Xr ssh-agent 1 ,
                    650: TCP and StreamLocal.
                    651: This option overrides all other forwarding-related options and may
                    652: simplify restricted configurations.
1.246     djm       653: .It Cm ExposeAuthInfo
1.253     jmc       654: Writes a temporary file containing a list of authentication methods and
1.246     djm       655: public credentials (e.g. keys) used to authenticate the user.
1.247     jmc       656: The location of the file is exposed to the user session through the
1.248     djm       657: .Ev SSH_USER_AUTH
1.247     jmc       658: environment variable.
1.253     jmc       659: The default is
                    660: .Cm no .
1.183     djm       661: .It Cm FingerprintHash
                    662: Specifies the hash algorithm used when logging key fingerprints.
                    663: Valid options are:
1.237     jmc       664: .Cm md5
1.183     djm       665: and
1.237     jmc       666: .Cm sha256 .
1.183     djm       667: The default is
1.237     jmc       668: .Cm sha256 .
1.67      dtucker   669: .It Cm ForceCommand
                    670: Forces the execution of the command specified by
                    671: .Cm ForceCommand ,
1.84      djm       672: ignoring any command supplied by the client and
                    673: .Pa ~/.ssh/rc
                    674: if present.
1.67      dtucker   675: The command is invoked by using the user's login shell with the -c option.
                    676: This applies to shell, command, or subsystem execution.
                    677: It is most useful inside a
                    678: .Cm Match
                    679: block.
                    680: The command originally supplied by the client is available in the
                    681: .Ev SSH_ORIGINAL_COMMAND
                    682: environment variable.
1.82      djm       683: Specifying a command of
1.237     jmc       684: .Cm internal-sftp
                    685: will force the use of an in-process SFTP server that requires no support
1.82      djm       686: files when used with
                    687: .Cm ChrootDirectory .
1.215     djm       688: The default is
1.237     jmc       689: .Cm none .
1.1       stevesk   690: .It Cm GatewayPorts
                    691: Specifies whether remote hosts are allowed to connect to ports
                    692: forwarded for the client.
                    693: By default,
1.52      jmc       694: .Xr sshd 8
1.15      jmc       695: binds remote port forwardings to the loopback address.
                    696: This prevents other remote hosts from connecting to forwarded ports.
1.1       stevesk   697: .Cm GatewayPorts
1.52      jmc       698: can be used to specify that sshd
1.39      djm       699: should allow remote port forwardings to bind to non-loopback addresses, thus
                    700: allowing other hosts to connect.
                    701: The argument may be
1.237     jmc       702: .Cm no
1.39      djm       703: to force remote port forwardings to be available to the local host only,
1.237     jmc       704: .Cm yes
1.39      djm       705: to force remote port forwardings to bind to the wildcard address, or
1.237     jmc       706: .Cm clientspecified
1.39      djm       707: to allow the client to select the address to which the forwarding is bound.
1.1       stevesk   708: The default is
1.237     jmc       709: .Cm no .
1.23      markus    710: .It Cm GSSAPIAuthentication
1.25      markus    711: Specifies whether user authentication based on GSSAPI is allowed.
1.26      djm       712: The default is
1.237     jmc       713: .Cm no .
1.23      markus    714: .It Cm GSSAPICleanupCredentials
                    715: Specifies whether to automatically destroy the user's credentials cache
                    716: on logout.
                    717: The default is
1.237     jmc       718: .Cm yes .
1.203     djm       719: .It Cm GSSAPIStrictAcceptorCheck
                    720: Determines whether to be strict about the identity of the GSSAPI acceptor
                    721: a client authenticates against.
                    722: If set to
1.237     jmc       723: .Cm yes
                    724: then the client must authenticate against the host
1.203     djm       725: service on the current hostname.
                    726: If set to
1.237     jmc       727: .Cm no
1.203     djm       728: then the client may authenticate against any service key stored in the
                    729: machine's default store.
                    730: This facility is provided to assist with operation on multi homed machines.
                    731: The default is
1.237     jmc       732: .Cm yes .
1.325     dtucker   733: .It Cm HostbasedAcceptedAlgorithms
1.327     djm       734: Specifies the signature algorithms that will be accepted for hostbased
                    735: authentication as a list of comma-separated patterns.
1.289     naddy     736: Alternately if the specified list begins with a
1.208     djm       737: .Sq +
1.327     djm       738: character, then the specified signature algorithms will be appended to
                    739: the default set instead of replacing them.
1.289     naddy     740: If the specified list begins with a
1.242     djm       741: .Sq -
1.327     djm       742: character, then the specified signature algorithms (including wildcards)
                    743: will be removed from the default set instead of replacing them.
1.290     naddy     744: If the specified list begins with a
                    745: .Sq ^
1.327     djm       746: character, then the specified signature algorithms will be placed at
                    747: the head of the default set.
1.206     markus    748: The default for this option is:
                    749: .Bd -literal -offset 3n
1.316     djm       750: ssh-ed25519-cert-v01@openssh.com,
1.206     markus    751: ecdsa-sha2-nistp256-cert-v01@openssh.com,
                    752: ecdsa-sha2-nistp384-cert-v01@openssh.com,
                    753: ecdsa-sha2-nistp521-cert-v01@openssh.com,
1.316     djm       754: sk-ssh-ed25519-cert-v01@openssh.com,
1.296     naddy     755: sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
1.291     naddy     756: rsa-sha2-512-cert-v01@openssh.com,
                    757: rsa-sha2-256-cert-v01@openssh.com,
1.316     djm       758: ssh-ed25519,
1.206     markus    759: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.316     djm       760: sk-ssh-ed25519@openssh.com,
1.296     naddy     761: sk-ecdsa-sha2-nistp256@openssh.com,
1.339     naddy     762: rsa-sha2-512,rsa-sha2-256
1.206     markus    763: .Ed
                    764: .Pp
1.327     djm       765: The list of available signature algorithms may also be obtained using
1.325     dtucker   766: .Qq ssh -Q HostbasedAcceptedAlgorithms .
                    767: This was formerly named HostbasedAcceptedKeyTypes.
1.1       stevesk   768: .It Cm HostbasedAuthentication
                    769: Specifies whether rhosts or /etc/hosts.equiv authentication together
                    770: with successful public key client host authentication is allowed
1.50      jmc       771: (host-based authentication).
1.70      dtucker   772: The default is
1.237     jmc       773: .Cm no .
1.70      dtucker   774: .It Cm HostbasedUsesNameFromPacketOnly
                    775: Specifies whether or not the server will attempt to perform a reverse
                    776: name lookup when matching the name in the
                    777: .Pa ~/.shosts ,
                    778: .Pa ~/.rhosts ,
                    779: and
                    780: .Pa /etc/hosts.equiv
                    781: files during
                    782: .Cm HostbasedAuthentication .
                    783: A setting of
1.237     jmc       784: .Cm yes
1.70      dtucker   785: means that
                    786: .Xr sshd 8
                    787: uses the name supplied by the client rather than
                    788: attempting to resolve the name from the TCP connection itself.
1.1       stevesk   789: The default is
1.237     jmc       790: .Cm no .
1.117     djm       791: .It Cm HostCertificate
                    792: Specifies a file containing a public host certificate.
                    793: The certificate's public key must match a private host key already specified
                    794: by
                    795: .Cm HostKey .
                    796: The default behaviour of
                    797: .Xr sshd 8
                    798: is not to load any certificates.
1.1       stevesk   799: .It Cm HostKey
                    800: Specifies a file containing a private host key
                    801: used by SSH.
1.229     naddy     802: The defaults are
1.169     naddy     803: .Pa /etc/ssh/ssh_host_ecdsa_key ,
                    804: .Pa /etc/ssh/ssh_host_ed25519_key
1.126     djm       805: and
1.229     naddy     806: .Pa /etc/ssh/ssh_host_rsa_key .
1.206     markus    807: .Pp
1.1       stevesk   808: Note that
1.52      jmc       809: .Xr sshd 8
1.206     markus    810: will refuse to use a file if it is group/world-accessible
                    811: and that the
                    812: .Cm HostKeyAlgorithms
                    813: option restricts which of the keys are actually used by
                    814: .Xr sshd 8 .
                    815: .Pp
1.1       stevesk   816: It is possible to have multiple host key files.
1.162     markus    817: It is also possible to specify public host key files instead.
                    818: In this case operations on the private key will be delegated
                    819: to an
                    820: .Xr ssh-agent 1 .
                    821: .It Cm HostKeyAgent
                    822: Identifies the UNIX-domain socket used to communicate
                    823: with an agent that has access to the private host keys.
1.223     markus    824: If the string
1.237     jmc       825: .Qq SSH_AUTH_SOCK
1.162     markus    826: is specified, the location of the socket will be read from the
                    827: .Ev SSH_AUTH_SOCK
                    828: environment variable.
1.206     markus    829: .It Cm HostKeyAlgorithms
1.327     djm       830: Specifies the host key signature algorithms
1.206     markus    831: that the server offers.
                    832: The default for this option is:
                    833: .Bd -literal -offset 3n
1.316     djm       834: ssh-ed25519-cert-v01@openssh.com,
1.206     markus    835: ecdsa-sha2-nistp256-cert-v01@openssh.com,
                    836: ecdsa-sha2-nistp384-cert-v01@openssh.com,
                    837: ecdsa-sha2-nistp521-cert-v01@openssh.com,
1.316     djm       838: sk-ssh-ed25519-cert-v01@openssh.com,
1.296     naddy     839: sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
1.291     naddy     840: rsa-sha2-512-cert-v01@openssh.com,
                    841: rsa-sha2-256-cert-v01@openssh.com,
1.316     djm       842: ssh-ed25519,
1.206     markus    843: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.316     djm       844: sk-ssh-ed25519@openssh.com,
1.296     naddy     845: sk-ecdsa-sha2-nistp256@openssh.com,
1.339     naddy     846: rsa-sha2-512,rsa-sha2-256
1.206     markus    847: .Ed
                    848: .Pp
1.327     djm       849: The list of available signature algorithms may also be obtained using
1.307     dtucker   850: .Qq ssh -Q HostKeyAlgorithms .
1.1       stevesk   851: .It Cm IgnoreRhosts
1.309     djm       852: Specifies whether to ignore per-user
1.1       stevesk   853: .Pa .rhosts
                    854: and
                    855: .Pa .shosts
1.309     djm       856: files during
1.1       stevesk   857: .Cm HostbasedAuthentication .
1.309     djm       858: The system-wide
1.1       stevesk   859: .Pa /etc/hosts.equiv
                    860: and
                    861: .Pa /etc/shosts.equiv
1.309     djm       862: are still used regardless of this setting.
                    863: .Pp
                    864: Accepted values are
                    865: .Cm yes
                    866: (the default) to ignore all per-user files,
                    867: .Cm shosts-only
                    868: to allow the use of
                    869: .Pa .shosts
                    870: but to ignore
                    871: .Pa .rhosts
                    872: or
                    873: .Cm no
                    874: to allow both
                    875: .Pa .shosts
                    876: and
1.311     jmc       877: .Pa rhosts .
1.1       stevesk   878: .It Cm IgnoreUserKnownHosts
                    879: Specifies whether
1.52      jmc       880: .Xr sshd 8
1.1       stevesk   881: should ignore the user's
1.41      djm       882: .Pa ~/.ssh/known_hosts
1.1       stevesk   883: during
1.261     djm       884: .Cm HostbasedAuthentication
                    885: and use only the system-wide known hosts file
1.341     dtucker   886: .Pa /etc/ssh/ssh_known_hosts .
1.1       stevesk   887: The default is
1.304     djm       888: .Dq no .
                    889: .It Cm Include
                    890: Include the specified configuration file(s).
1.305     jmc       891: Multiple pathnames may be specified and each pathname may contain
1.304     djm       892: .Xr glob 7
1.312     djm       893: wildcards that will be expanded and processed in lexical order.
1.304     djm       894: Files without absolute paths are assumed to be in
                    895: .Pa /etc/ssh .
1.305     jmc       896: An
1.304     djm       897: .Cm Include
                    898: directive may appear inside a
                    899: .Cm Match
                    900: block
                    901: to perform conditional inclusion.
1.129     djm       902: .It Cm IPQoS
                    903: Specifies the IPv4 type-of-service or DSCP class for the connection.
                    904: Accepted values are
1.237     jmc       905: .Cm af11 ,
                    906: .Cm af12 ,
                    907: .Cm af13 ,
                    908: .Cm af21 ,
                    909: .Cm af22 ,
                    910: .Cm af23 ,
                    911: .Cm af31 ,
                    912: .Cm af32 ,
                    913: .Cm af33 ,
                    914: .Cm af41 ,
                    915: .Cm af42 ,
                    916: .Cm af43 ,
                    917: .Cm cs0 ,
                    918: .Cm cs1 ,
                    919: .Cm cs2 ,
                    920: .Cm cs3 ,
                    921: .Cm cs4 ,
                    922: .Cm cs5 ,
                    923: .Cm cs6 ,
                    924: .Cm cs7 ,
                    925: .Cm ef ,
1.303     djm       926: .Cm le ,
1.237     jmc       927: .Cm lowdelay ,
                    928: .Cm throughput ,
                    929: .Cm reliability ,
1.250     djm       930: a numeric value, or
                    931: .Cm none
                    932: to use the operating system default.
1.131     djm       933: This option may take one or two arguments, separated by whitespace.
1.129     djm       934: If one argument is specified, it is used as the packet class unconditionally.
                    935: If two values are specified, the first is automatically selected for
                    936: interactive sessions and the second for non-interactive sessions.
                    937: The default is
1.264     job       938: .Cm af21
1.265     jmc       939: (Low-Latency Data)
1.129     djm       940: for interactive sessions and
1.264     job       941: .Cm cs1
1.265     jmc       942: (Lower Effort)
1.129     djm       943: for non-interactive sessions.
1.171     jmc       944: .It Cm KbdInteractiveAuthentication
                    945: Specifies whether to allow keyboard-interactive authentication.
1.332     dtucker   946: All authentication styles from
                    947: .Xr login.conf 5
                    948: are supported.
                    949: The default is
                    950: .Cm yes .
1.171     jmc       951: The argument to this keyword must be
1.237     jmc       952: .Cm yes
1.171     jmc       953: or
1.237     jmc       954: .Cm no .
1.171     jmc       955: .Cm ChallengeResponseAuthentication
1.332     dtucker   956: is a deprecated alias for this.
1.1       stevesk   957: .It Cm KerberosAuthentication
1.24      markus    958: Specifies whether the password provided by the user for
1.1       stevesk   959: .Cm PasswordAuthentication
1.24      markus    960: will be validated through the Kerberos KDC.
1.1       stevesk   961: To use this option, the server needs a
                    962: Kerberos servtab which allows the verification of the KDC's identity.
1.52      jmc       963: The default is
1.237     jmc       964: .Cm no .
1.29      dtucker   965: .It Cm KerberosGetAFSToken
1.45      djm       966: If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
1.29      dtucker   967: an AFS token before accessing the user's home directory.
1.52      jmc       968: The default is
1.237     jmc       969: .Cm no .
1.1       stevesk   970: .It Cm KerberosOrLocalPasswd
1.52      jmc       971: If password authentication through Kerberos fails then
1.1       stevesk   972: the password will be validated via any additional local mechanism
                    973: such as
                    974: .Pa /etc/passwd .
1.52      jmc       975: The default is
1.237     jmc       976: .Cm yes .
1.1       stevesk   977: .It Cm KerberosTicketCleanup
                    978: Specifies whether to automatically destroy the user's ticket cache
                    979: file on logout.
1.52      jmc       980: The default is
1.237     jmc       981: .Cm yes .
1.127     djm       982: .It Cm KexAlgorithms
                    983: Specifies the available KEX (Key Exchange) algorithms.
                    984: Multiple algorithms must be comma-separated.
1.289     naddy     985: Alternately if the specified list begins with a
1.208     djm       986: .Sq +
1.335     dtucker   987: character, then the specified algorithms will be appended to the default set
1.208     djm       988: instead of replacing them.
1.289     naddy     989: If the specified list begins with a
1.242     djm       990: .Sq -
1.335     dtucker   991: character, then the specified algorithms (including wildcards) will be removed
1.242     djm       992: from the default set instead of replacing them.
1.290     naddy     993: If the specified list begins with a
                    994: .Sq ^
1.335     dtucker   995: character, then the specified algorithms will be placed at the head of the
1.290     naddy     996: default set.
1.173     naddy     997: The supported algorithms are:
                    998: .Pp
                    999: .Bl -item -compact -offset indent
                   1000: .It
1.234     djm      1001: curve25519-sha256
                   1002: .It
1.173     naddy    1003: curve25519-sha256@libssh.org
                   1004: .It
                   1005: diffie-hellman-group1-sha1
                   1006: .It
                   1007: diffie-hellman-group14-sha1
                   1008: .It
1.263     djm      1009: diffie-hellman-group14-sha256
                   1010: .It
                   1011: diffie-hellman-group16-sha512
                   1012: .It
                   1013: diffie-hellman-group18-sha512
                   1014: .It
1.173     naddy    1015: diffie-hellman-group-exchange-sha1
                   1016: .It
                   1017: diffie-hellman-group-exchange-sha256
                   1018: .It
                   1019: ecdh-sha2-nistp256
                   1020: .It
                   1021: ecdh-sha2-nistp384
                   1022: .It
                   1023: ecdh-sha2-nistp521
1.298     dtucker  1024: .It
1.319     djm      1025: sntrup761x25519-sha512@openssh.com
1.173     naddy    1026: .El
                   1027: .Pp
                   1028: The default is:
1.170     dtucker  1029: .Bd -literal -offset indent
1.340     naddy    1030: sntrup761x25519-sha512@openssh.com,
1.234     djm      1031: curve25519-sha256,curve25519-sha256@libssh.org,
1.170     dtucker  1032: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
                   1033: diffie-hellman-group-exchange-sha256,
1.263     djm      1034: diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,
1.300     tedu     1035: diffie-hellman-group14-sha256
1.170     dtucker  1036: .Ed
1.188     djm      1037: .Pp
1.237     jmc      1038: The list of available key exchange algorithms may also be obtained using
1.307     dtucker  1039: .Qq ssh -Q KexAlgorithms .
1.1       stevesk  1040: .It Cm ListenAddress
                   1041: Specifies the local addresses
1.52      jmc      1042: .Xr sshd 8
1.1       stevesk  1043: should listen on.
                   1044: The following forms may be used:
                   1045: .Pp
                   1046: .Bl -item -offset indent -compact
                   1047: .It
                   1048: .Cm ListenAddress
                   1049: .Sm off
1.259     jmc      1050: .Ar hostname | address
1.1       stevesk  1051: .Sm on
1.260     jmc      1052: .Op Cm rdomain Ar domain
1.1       stevesk  1053: .It
                   1054: .Cm ListenAddress
                   1055: .Sm off
1.259     jmc      1056: .Ar hostname : port
1.1       stevesk  1057: .Sm on
1.260     jmc      1058: .Op Cm rdomain Ar domain
1.256     djm      1059: .It
                   1060: .Cm ListenAddress
                   1061: .Sm off
1.259     jmc      1062: .Ar IPv4_address : port
1.256     djm      1063: .Sm on
1.260     jmc      1064: .Op Cm rdomain Ar domain
1.1       stevesk  1065: .It
                   1066: .Cm ListenAddress
                   1067: .Sm off
1.259     jmc      1068: .Oo Ar hostname | address Oc : Ar port
1.1       stevesk  1069: .Sm on
1.260     jmc      1070: .Op Cm rdomain Ar domain
1.1       stevesk  1071: .El
                   1072: .Pp
1.256     djm      1073: The optional
                   1074: .Cm rdomain
                   1075: qualifier requests
                   1076: .Xr sshd 8
                   1077: listen in an explicit routing domain.
1.1       stevesk  1078: If
                   1079: .Ar port
                   1080: is not specified,
1.200     dtucker  1081: sshd will listen on the address and all
1.1       stevesk  1082: .Cm Port
1.17      jmc      1083: options specified.
1.256     djm      1084: The default is to listen on all local addresses on the current default
                   1085: routing domain.
1.15      jmc      1086: Multiple
1.1       stevesk  1087: .Cm ListenAddress
1.17      jmc      1088: options are permitted.
1.256     djm      1089: For more information on routing domains, see
1.259     jmc      1090: .Xr rdomain 4 .
1.1       stevesk  1091: .It Cm LoginGraceTime
                   1092: The server disconnects after this time if the user has not
                   1093: successfully logged in.
                   1094: If the value is 0, there is no time limit.
1.12      stevesk  1095: The default is 120 seconds.
1.1       stevesk  1096: .It Cm LogLevel
                   1097: Gives the verbosity level that is used when logging messages from
1.53      jmc      1098: .Xr sshd 8 .
1.1       stevesk  1099: The possible values are:
1.52      jmc      1100: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1.15      jmc      1101: The default is INFO.
                   1102: DEBUG and DEBUG1 are equivalent.
                   1103: DEBUG2 and DEBUG3 each specify higher levels of debugging output.
                   1104: Logging with a DEBUG level violates the privacy of users and is not recommended.
1.317     djm      1105: .It Cm LogVerbose
                   1106: Specify one or more overrides to LogLevel.
                   1107: An override consists of a pattern lists that matches the source file, function
                   1108: and line number to force detailed logging for.
                   1109: For example, an override pattern of:
                   1110: .Bd -literal -offset indent
                   1111: kex.c:*:1000,*:kex_exchange_identification():*,packet.c:*
                   1112: .Ed
                   1113: .Pp
                   1114: would enable detailed logging for line 1000 of
1.318     jmc      1115: .Pa kex.c ,
1.317     djm      1116: everything in the
                   1117: .Fn kex_exchange_identification
                   1118: function, and all code in the
                   1119: .Pa packet.c
                   1120: file.
                   1121: This option is intended for debugging and no overrides are enabled by default.
1.1       stevesk  1122: .It Cm MACs
                   1123: Specifies the available MAC (message authentication code) algorithms.
1.219     jmc      1124: The MAC algorithm is used for data integrity protection.
1.1       stevesk  1125: Multiple algorithms must be comma-separated.
1.289     naddy    1126: If the specified list begins with a
1.208     djm      1127: .Sq +
                   1128: character, then the specified algorithms will be appended to the default set
                   1129: instead of replacing them.
1.289     naddy    1130: If the specified list begins with a
1.242     djm      1131: .Sq -
                   1132: character, then the specified algorithms (including wildcards) will be removed
                   1133: from the default set instead of replacing them.
1.290     naddy    1134: If the specified list begins with a
                   1135: .Sq ^
                   1136: character, then the specified algorithms will be placed at the head of the
                   1137: default set.
1.208     djm      1138: .Pp
1.152     markus   1139: The algorithms that contain
1.237     jmc      1140: .Qq -etm
1.152     markus   1141: calculate the MAC after encryption (encrypt-then-mac).
                   1142: These are considered safer and their use recommended.
1.173     naddy    1143: The supported MACs are:
                   1144: .Pp
                   1145: .Bl -item -compact -offset indent
                   1146: .It
                   1147: hmac-md5
                   1148: .It
                   1149: hmac-md5-96
                   1150: .It
                   1151: hmac-sha1
                   1152: .It
                   1153: hmac-sha1-96
                   1154: .It
                   1155: hmac-sha2-256
                   1156: .It
                   1157: hmac-sha2-512
                   1158: .It
                   1159: umac-64@openssh.com
                   1160: .It
                   1161: umac-128@openssh.com
                   1162: .It
                   1163: hmac-md5-etm@openssh.com
                   1164: .It
                   1165: hmac-md5-96-etm@openssh.com
                   1166: .It
                   1167: hmac-sha1-etm@openssh.com
                   1168: .It
                   1169: hmac-sha1-96-etm@openssh.com
                   1170: .It
                   1171: hmac-sha2-256-etm@openssh.com
                   1172: .It
                   1173: hmac-sha2-512-etm@openssh.com
                   1174: .It
                   1175: umac-64-etm@openssh.com
                   1176: .It
                   1177: umac-128-etm@openssh.com
                   1178: .El
                   1179: .Pp
1.52      jmc      1180: The default is:
1.77      jmc      1181: .Bd -literal -offset indent
1.152     markus   1182: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
                   1183: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1.217     djm      1184: hmac-sha1-etm@openssh.com,
1.173     naddy    1185: umac-64@openssh.com,umac-128@openssh.com,
1.217     djm      1186: hmac-sha2-256,hmac-sha2-512,hmac-sha1
1.77      jmc      1187: .Ed
1.188     djm      1188: .Pp
1.237     jmc      1189: The list of available MAC algorithms may also be obtained using
                   1190: .Qq ssh -Q mac .
1.60      dtucker  1191: .It Cm Match
1.61      jmc      1192: Introduces a conditional block.
1.65      dtucker  1193: If all of the criteria on the
1.60      dtucker  1194: .Cm Match
1.65      dtucker  1195: line are satisfied, the keywords on the following lines override those
                   1196: set in the global section of the config file, until either another
1.60      dtucker  1197: .Cm Match
1.65      dtucker  1198: line or the end of the file.
1.172     djm      1199: If a keyword appears in multiple
                   1200: .Cm Match
1.177     sobrado  1201: blocks that are satisfied, only the first instance of the keyword is
1.172     djm      1202: applied.
1.91      djm      1203: .Pp
1.61      jmc      1204: The arguments to
1.60      dtucker  1205: .Cm Match
1.163     dtucker  1206: are one or more criteria-pattern pairs or the single token
                   1207: .Cm All
                   1208: which matches all criteria.
1.60      dtucker  1209: The available criteria are
                   1210: .Cm User ,
1.69      dtucker  1211: .Cm Group ,
1.60      dtucker  1212: .Cm Host ,
1.139     dtucker  1213: .Cm LocalAddress ,
                   1214: .Cm LocalPort ,
1.258     djm      1215: .Cm RDomain ,
1.60      dtucker  1216: and
1.258     djm      1217: .Cm Address
                   1218: (with
                   1219: .Cm RDomain
                   1220: representing the
                   1221: .Xr rdomain 4
1.284     jmc      1222: on which the connection was received).
1.258     djm      1223: .Pp
1.91      djm      1224: The match patterns may consist of single entries or comma-separated
                   1225: lists and may use the wildcard and negation operators described in the
1.237     jmc      1226: .Sx PATTERNS
                   1227: section of
1.92      djm      1228: .Xr ssh_config 5 .
1.91      djm      1229: .Pp
                   1230: The patterns in an
                   1231: .Cm Address
                   1232: criteria may additionally contain addresses to match in CIDR
1.237     jmc      1233: address/masklen format,
                   1234: such as 192.0.2.0/24 or 2001:db8::/32.
1.91      djm      1235: Note that the mask length provided must be consistent with the address -
                   1236: it is an error to specify a mask length that is too long for the address
1.93      jmc      1237: or one with bits set in this host portion of the address.
1.237     jmc      1238: For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
1.91      djm      1239: .Pp
1.60      dtucker  1240: Only a subset of keywords may be used on the lines following a
                   1241: .Cm Match
                   1242: keyword.
                   1243: Available keywords are
1.142     jmc      1244: .Cm AcceptEnv ,
1.99      okan     1245: .Cm AllowAgentForwarding ,
1.142     jmc      1246: .Cm AllowGroups ,
1.193     djm      1247: .Cm AllowStreamLocalForwarding ,
1.62      dtucker  1248: .Cm AllowTcpForwarding ,
1.141     markus   1249: .Cm AllowUsers ,
1.149     djm      1250: .Cm AuthenticationMethods ,
1.146     djm      1251: .Cm AuthorizedKeysCommand ,
                   1252: .Cm AuthorizedKeysCommandUser ,
1.147     jmc      1253: .Cm AuthorizedKeysFile ,
1.214     djm      1254: .Cm AuthorizedPrincipalsCommand ,
                   1255: .Cm AuthorizedPrincipalsCommandUser ,
1.123     djm      1256: .Cm AuthorizedPrincipalsFile ,
1.72      dtucker  1257: .Cm Banner ,
1.336     dtucker  1258: .Cm CASignatureAlgorithms ,
1.85      djm      1259: .Cm ChrootDirectory ,
1.238     markus   1260: .Cm ClientAliveCountMax ,
                   1261: .Cm ClientAliveInterval ,
1.141     markus   1262: .Cm DenyGroups ,
                   1263: .Cm DenyUsers ,
1.320     djm      1264: .Cm DisableForwarding ,
1.336     dtucker  1265: .Cm ExposeAuthInfo ,
1.67      dtucker  1266: .Cm ForceCommand ,
1.194     djm      1267: .Cm GatewayPorts ,
1.193     djm      1268: .Cm GSSAPIAuthentication ,
1.325     dtucker  1269: .Cm HostbasedAcceptedAlgorithms ,
1.87      djm      1270: .Cm HostbasedAuthentication ,
1.123     djm      1271: .Cm HostbasedUsesNameFromPacketOnly ,
1.308     djm      1272: .Cm IgnoreRhosts ,
1.306     naddy    1273: .Cm Include ,
1.193     djm      1274: .Cm IPQoS ,
1.74      jmc      1275: .Cm KbdInteractiveAuthentication ,
1.72      dtucker  1276: .Cm KerberosAuthentication ,
1.245     djm      1277: .Cm LogLevel ,
1.95      dtucker  1278: .Cm MaxAuthTries ,
1.94      dtucker  1279: .Cm MaxSessions ,
1.72      dtucker  1280: .Cm PasswordAuthentication ,
1.97      djm      1281: .Cm PermitEmptyPasswords ,
1.271     djm      1282: .Cm PermitListen ,
1.66      dtucker  1283: .Cm PermitOpen ,
1.79      dtucker  1284: .Cm PermitRootLogin ,
1.164     djm      1285: .Cm PermitTTY ,
1.123     djm      1286: .Cm PermitTunnel ,
1.174     djm      1287: .Cm PermitUserRC ,
1.324     dtucker  1288: .Cm PubkeyAcceptedAlgorithms ,
1.107     dtucker  1289: .Cm PubkeyAuthentication ,
1.336     dtucker  1290: .Cm PubkeyAuthOptions ,
1.159     dtucker  1291: .Cm RekeyLimit ,
1.193     djm      1292: .Cm RevokedKeys ,
1.257     djm      1293: .Cm RDomain ,
1.274     djm      1294: .Cm SetEnv ,
1.193     djm      1295: .Cm StreamLocalBindMask ,
                   1296: .Cm StreamLocalBindUnlink ,
                   1297: .Cm TrustedUserCAKeys ,
1.66      dtucker  1298: .Cm X11DisplayOffset ,
1.101     djm      1299: .Cm X11Forwarding
1.60      dtucker  1300: and
1.286     jmc      1301: .Cm X11UseLocalhost .
1.33      dtucker  1302: .It Cm MaxAuthTries
                   1303: Specifies the maximum number of authentication attempts permitted per
1.35      jmc      1304: connection.
                   1305: Once the number of failures reaches half this value,
                   1306: additional failures are logged.
                   1307: The default is 6.
1.90      djm      1308: .It Cm MaxSessions
1.216     djm      1309: Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
                   1310: sessions permitted per network connection.
                   1311: Multiple sessions may be established by clients that support connection
                   1312: multiplexing.
                   1313: Setting
                   1314: .Cm MaxSessions
                   1315: to 1 will effectively disable session multiplexing, whereas setting it to 0
                   1316: will prevent all shell, login and subsystem sessions while still permitting
                   1317: forwarding.
1.90      djm      1318: The default is 10.
1.1       stevesk  1319: .It Cm MaxStartups
                   1320: Specifies the maximum number of concurrent unauthenticated connections to the
1.52      jmc      1321: SSH daemon.
1.1       stevesk  1322: Additional connections will be dropped until authentication succeeds or the
                   1323: .Cm LoginGraceTime
                   1324: expires for a connection.
1.156     dtucker  1325: The default is 10:30:100.
1.1       stevesk  1326: .Pp
                   1327: Alternatively, random early drop can be enabled by specifying
                   1328: the three colon separated values
1.237     jmc      1329: start:rate:full (e.g. "10:30:60").
1.53      jmc      1330: .Xr sshd 8
1.237     jmc      1331: will refuse connection attempts with a probability of rate/100 (30%)
                   1332: if there are currently start (10) unauthenticated connections.
1.1       stevesk  1333: The probability increases linearly and all connection attempts
1.237     jmc      1334: are refused if the number of unauthenticated connections reaches full (60).
1.329     dtucker  1335: .It Cm ModuliFile
                   1336: Specifies the
                   1337: .Xr moduli 5
                   1338: file that contains the Diffie-Hellman groups used for the
                   1339: .Dq diffie-hellman-group-exchange-sha1
                   1340: and
                   1341: .Dq diffie-hellman-group-exchange-sha256
                   1342: key exchange methods.
                   1343: The default is
                   1344: .Pa /etc/moduli .
1.1       stevesk  1345: .It Cm PasswordAuthentication
                   1346: Specifies whether password authentication is allowed.
                   1347: The default is
1.237     jmc      1348: .Cm yes .
1.1       stevesk  1349: .It Cm PermitEmptyPasswords
                   1350: When password authentication is allowed, it specifies whether the
                   1351: server allows login to accounts with empty password strings.
                   1352: The default is
1.237     jmc      1353: .Cm no .
1.271     djm      1354: .It Cm PermitListen
                   1355: Specifies the addresses/ports on which a remote TCP port forwarding may listen.
                   1356: The listen specification must be one of the following forms:
                   1357: .Pp
                   1358: .Bl -item -offset indent -compact
                   1359: .It
                   1360: .Cm PermitListen
                   1361: .Sm off
1.276     djm      1362: .Ar port
1.271     djm      1363: .Sm on
                   1364: .It
                   1365: .Cm PermitListen
                   1366: .Sm off
1.276     djm      1367: .Ar host : port
1.271     djm      1368: .Sm on
                   1369: .El
                   1370: .Pp
                   1371: Multiple permissions may be specified by separating them with whitespace.
                   1372: An argument of
                   1373: .Cm any
                   1374: can be used to remove all restrictions and permit any listen requests.
                   1375: An argument of
                   1376: .Cm none
                   1377: can be used to prohibit all listen requests.
                   1378: The host name may contain wildcards as described in the PATTERNS section in
                   1379: .Xr ssh_config 5 .
                   1380: The wildcard
                   1381: .Sq *
                   1382: can also be used in place of a port number to allow all ports.
                   1383: By default all port forwarding listen requests are permitted.
1.272     jmc      1384: Note that the
1.271     djm      1385: .Cm GatewayPorts
                   1386: option may further restrict which addresses may be listened on.
1.276     djm      1387: Note also that
                   1388: .Xr ssh 1
                   1389: will request a listen host of
                   1390: .Dq localhost
1.283     dtucker  1391: if no listen host was specifically requested, and this name is
1.277     jmc      1392: treated differently to explicit localhost addresses of
1.276     djm      1393: .Dq 127.0.0.1
                   1394: and
                   1395: .Dq ::1 .
1.62      dtucker  1396: .It Cm PermitOpen
                   1397: Specifies the destinations to which TCP port forwarding is permitted.
                   1398: The forwarding specification must be one of the following forms:
                   1399: .Pp
                   1400: .Bl -item -offset indent -compact
                   1401: .It
                   1402: .Cm PermitOpen
                   1403: .Sm off
                   1404: .Ar host : port
                   1405: .Sm on
                   1406: .It
                   1407: .Cm PermitOpen
                   1408: .Sm off
                   1409: .Ar IPv4_addr : port
                   1410: .Sm on
                   1411: .It
                   1412: .Cm PermitOpen
                   1413: .Sm off
                   1414: .Ar \&[ IPv6_addr \&] : port
                   1415: .Sm on
                   1416: .El
                   1417: .Pp
1.68      dtucker  1418: Multiple forwards may be specified by separating them with whitespace.
1.62      dtucker  1419: An argument of
1.237     jmc      1420: .Cm any
1.62      dtucker  1421: can be used to remove all restrictions and permit any forwarding requests.
1.140     dtucker  1422: An argument of
1.237     jmc      1423: .Cm none
1.140     dtucker  1424: can be used to prohibit all forwarding requests.
1.227     jmc      1425: The wildcard
1.237     jmc      1426: .Sq *
1.299     djm      1427: can be used for host or port to allow all hosts or ports respectively.
                   1428: Otherwise, no pattern matching or address lookups are performed on supplied
                   1429: names.
1.63      jmc      1430: By default all port forwarding requests are permitted.
1.1       stevesk  1431: .It Cm PermitRootLogin
1.38      jmc      1432: Specifies whether root can log in using
1.1       stevesk  1433: .Xr ssh 1 .
                   1434: The argument must be
1.237     jmc      1435: .Cm yes ,
                   1436: .Cm prohibit-password ,
                   1437: .Cm forced-commands-only ,
1.1       stevesk  1438: or
1.237     jmc      1439: .Cm no .
1.1       stevesk  1440: The default is
1.237     jmc      1441: .Cm prohibit-password .
1.1       stevesk  1442: .Pp
                   1443: If this option is set to
1.237     jmc      1444: .Cm prohibit-password
1.255     jmc      1445: (or its deprecated alias,
                   1446: .Cm without-password ) ,
1.210     deraadt  1447: password and keyboard-interactive authentication are disabled for root.
1.1       stevesk  1448: .Pp
                   1449: If this option is set to
1.237     jmc      1450: .Cm forced-commands-only ,
1.1       stevesk  1451: root login with public key authentication will be allowed,
                   1452: but only if the
                   1453: .Ar command
                   1454: option has been specified
                   1455: (which may be useful for taking remote backups even if root login is
1.17      jmc      1456: normally not allowed).
                   1457: All other authentication methods are disabled for root.
1.1       stevesk  1458: .Pp
                   1459: If this option is set to
1.237     jmc      1460: .Cm no ,
1.38      jmc      1461: root is not allowed to log in.
1.231     jmc      1462: .It Cm PermitTTY
                   1463: Specifies whether
                   1464: .Xr pty 4
                   1465: allocation is permitted.
                   1466: The default is
1.237     jmc      1467: .Cm yes .
1.46      reyk     1468: .It Cm PermitTunnel
                   1469: Specifies whether
                   1470: .Xr tun 4
                   1471: device forwarding is allowed.
1.47      reyk     1472: The argument must be
1.237     jmc      1473: .Cm yes ,
                   1474: .Cm point-to-point
1.58      stevesk  1475: (layer 3),
1.237     jmc      1476: .Cm ethernet
1.58      stevesk  1477: (layer 2), or
1.237     jmc      1478: .Cm no .
1.58      stevesk  1479: Specifying
1.237     jmc      1480: .Cm yes
1.58      stevesk  1481: permits both
1.237     jmc      1482: .Cm point-to-point
1.58      stevesk  1483: and
1.237     jmc      1484: .Cm ethernet .
1.46      reyk     1485: The default is
1.237     jmc      1486: .Cm no .
1.178     djm      1487: .Pp
                   1488: Independent of this setting, the permissions of the selected
                   1489: .Xr tun 4
                   1490: device must allow access to the user.
1.6       markus   1491: .It Cm PermitUserEnvironment
                   1492: Specifies whether
                   1493: .Pa ~/.ssh/environment
1.9       stevesk  1494: and
1.6       markus   1495: .Cm environment=
                   1496: options in
                   1497: .Pa ~/.ssh/authorized_keys
1.9       stevesk  1498: are processed by
1.52      jmc      1499: .Xr sshd 8 .
1.278     djm      1500: Valid options are
                   1501: .Cm yes ,
                   1502: .Cm no
                   1503: or a pattern-list specifying which environment variable names to accept
                   1504: (for example
                   1505: .Qq LANG,LC_* ) .
1.6       markus   1506: The default is
1.237     jmc      1507: .Cm no .
1.9       stevesk  1508: Enabling environment processing may enable users to bypass access
                   1509: restrictions in some configurations using mechanisms such as
                   1510: .Ev LD_PRELOAD .
1.174     djm      1511: .It Cm PermitUserRC
                   1512: Specifies whether any
                   1513: .Pa ~/.ssh/rc
                   1514: file is executed.
                   1515: The default is
1.237     jmc      1516: .Cm yes .
1.321     dtucker  1517: .It Cm PerSourceMaxStartups
                   1518: Specifies the number of unauthenticated connections allowed from a
                   1519: given source address, or
                   1520: .Dq none
                   1521: if there is no limit.
                   1522: This limit is applied in addition to
                   1523: .Cm MaxStartups ,
                   1524: whichever is lower.
                   1525: The default is
                   1526: .Cm none .
                   1527: .It Cm PerSourceNetBlockSize
                   1528: Specifies the number of bits of source address that are grouped together
                   1529: for the purposes of applying PerSourceMaxStartups limits.
                   1530: Values for IPv4 and optionally IPv6 may be specified, separated by a colon.
                   1531: The default is
1.322     jmc      1532: .Cm 32:128 ,
1.321     dtucker  1533: which means each address is considered individually.
1.328     djm      1534: .It Cm PidFile
                   1535: Specifies the file that contains the process ID of the
                   1536: SSH daemon, or
                   1537: .Cm none
                   1538: to not write one.
                   1539: The default is
                   1540: .Pa /var/run/sshd.pid .
1.1       stevesk  1541: .It Cm Port
                   1542: Specifies the port number that
1.52      jmc      1543: .Xr sshd 8
1.1       stevesk  1544: listens on.
                   1545: The default is 22.
                   1546: Multiple options of this type are permitted.
                   1547: See also
                   1548: .Cm ListenAddress .
                   1549: .It Cm PrintLastLog
                   1550: Specifies whether
1.52      jmc      1551: .Xr sshd 8
1.36      jaredy   1552: should print the date and time of the last user login when a user logs
                   1553: in interactively.
1.1       stevesk  1554: The default is
1.237     jmc      1555: .Cm yes .
1.1       stevesk  1556: .It Cm PrintMotd
                   1557: Specifies whether
1.52      jmc      1558: .Xr sshd 8
1.1       stevesk  1559: should print
                   1560: .Pa /etc/motd
                   1561: when a user logs in interactively.
                   1562: (On some systems it is also printed by the shell,
                   1563: .Pa /etc/profile ,
                   1564: or equivalent.)
                   1565: The default is
1.237     jmc      1566: .Cm yes .
1.324     dtucker  1567: .It Cm PubkeyAcceptedAlgorithms
                   1568: Specifies the signature algorithms that will be accepted for public key
                   1569: authentication as a list of comma-separated patterns.
1.289     naddy    1570: Alternately if the specified list begins with a
1.208     djm      1571: .Sq +
1.324     dtucker  1572: character, then the specified algorithms will be appended to the default set
1.208     djm      1573: instead of replacing them.
1.289     naddy    1574: If the specified list begins with a
1.242     djm      1575: .Sq -
1.324     dtucker  1576: character, then the specified algorithms (including wildcards) will be removed
1.242     djm      1577: from the default set instead of replacing them.
1.290     naddy    1578: If the specified list begins with a
                   1579: .Sq ^
1.324     dtucker  1580: character, then the specified algorithms will be placed at the head of the
1.290     naddy    1581: default set.
1.206     markus   1582: The default for this option is:
                   1583: .Bd -literal -offset 3n
1.316     djm      1584: ssh-ed25519-cert-v01@openssh.com,
1.206     markus   1585: ecdsa-sha2-nistp256-cert-v01@openssh.com,
                   1586: ecdsa-sha2-nistp384-cert-v01@openssh.com,
                   1587: ecdsa-sha2-nistp521-cert-v01@openssh.com,
1.316     djm      1588: sk-ssh-ed25519-cert-v01@openssh.com,
1.296     naddy    1589: sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,
1.291     naddy    1590: rsa-sha2-512-cert-v01@openssh.com,
                   1591: rsa-sha2-256-cert-v01@openssh.com,
1.316     djm      1592: ssh-ed25519,
1.296     naddy    1593: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.316     djm      1594: sk-ssh-ed25519@openssh.com,
1.291     naddy    1595: sk-ecdsa-sha2-nistp256@openssh.com,
1.338     dtucker  1596: rsa-sha2-512,rsa-sha2-256
1.206     markus   1597: .Ed
                   1598: .Pp
1.326     djm      1599: The list of available signature algorithms may also be obtained using
1.324     dtucker  1600: .Qq ssh -Q PubkeyAcceptedAlgorithms .
1.293     djm      1601: .It Cm PubkeyAuthOptions
                   1602: Sets one or more public key authentication options.
1.313     djm      1603: The supported keywords are:
1.294     jmc      1604: .Cm none
1.313     djm      1605: (the default; indicating no additional options are enabled),
                   1606: .Cm touch-required
1.293     djm      1607: and
1.313     djm      1608: .Cm verify-required .
1.293     djm      1609: .Pp
                   1610: The
                   1611: .Cm touch-required
1.297     naddy    1612: option causes public key authentication using a FIDO authenticator algorithm
1.294     jmc      1613: (i.e.\&
1.293     djm      1614: .Cm ecdsa-sk
                   1615: or
                   1616: .Cm ed25519-sk )
                   1617: to always require the signature to attest that a physically present user
1.297     naddy    1618: explicitly confirmed the authentication (usually by touching the authenticator).
1.293     djm      1619: By default,
                   1620: .Xr sshd 8
1.297     naddy    1621: requires user presence unless overridden with an authorized_keys option.
1.293     djm      1622: The
                   1623: .Cm touch-required
                   1624: flag disables this override.
1.313     djm      1625: .Pp
                   1626: The
                   1627: .Cm verify-required
1.315     jmc      1628: option requires a FIDO key signature attest that the user was verified,
1.314     jmc      1629: e.g. via a PIN.
1.313     djm      1630: .Pp
                   1631: Neither the
                   1632: .Cm touch-required
                   1633: or
                   1634: .Cm verify-required
1.314     jmc      1635: options have any effect for other, non-FIDO, public key types.
1.1       stevesk  1636: .It Cm PubkeyAuthentication
                   1637: Specifies whether public key authentication is allowed.
                   1638: The default is
1.237     jmc      1639: .Cm yes .
1.159     dtucker  1640: .It Cm RekeyLimit
1.342     djm      1641: Specifies the maximum amount of data that may be transmitted or received
                   1642: before the session key is renegotiated, optionally followed by a maximum
                   1643: amount of time that may pass before the session key is renegotiated.
1.159     dtucker  1644: The first argument is specified in bytes and may have a suffix of
                   1645: .Sq K ,
                   1646: .Sq M ,
                   1647: or
                   1648: .Sq G
                   1649: to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
                   1650: The default is between
                   1651: .Sq 1G
                   1652: and
                   1653: .Sq 4G ,
                   1654: depending on the cipher.
                   1655: The optional second value is specified in seconds and may use any of the
                   1656: units documented in the
                   1657: .Sx TIME FORMATS
1.160     jmc      1658: section.
1.159     dtucker  1659: The default value for
                   1660: .Cm RekeyLimit
                   1661: is
1.237     jmc      1662: .Cm default none ,
1.159     dtucker  1663: which means that rekeying is performed after the cipher's default amount
                   1664: of data has been sent or received and no time based rekeying is done.
1.343     djm      1665: .It Cm RequiredRSASize
                   1666: Specifies the minimum RSA key size (in bits) that
                   1667: .Xr sshd 8
                   1668: will accept.
                   1669: User and host-based authentication keys smaller than this limit will be
                   1670: refused.
                   1671: The default is
                   1672: .Cm 1024
                   1673: bits.
                   1674: Note that this limit may only be raised from the default.
1.118     djm      1675: .It Cm RevokedKeys
1.195     dtucker  1676: Specifies revoked public keys file, or
1.237     jmc      1677: .Cm none
1.195     dtucker  1678: to not use one.
1.118     djm      1679: Keys listed in this file will be refused for public key authentication.
                   1680: Note that if this file is not readable, then public key authentication will
                   1681: be refused for all users.
1.154     djm      1682: Keys may be specified as a text file, listing one public key per line, or as
                   1683: an OpenSSH Key Revocation List (KRL) as generated by
1.155     jmc      1684: .Xr ssh-keygen 1 .
1.161     jmc      1685: For more information on KRLs, see the KEY REVOCATION LISTS section in
1.154     djm      1686: .Xr ssh-keygen 1 .
1.257     djm      1687: .It Cm RDomain
                   1688: Specifies an explicit routing domain that is applied after authentication
                   1689: has completed.
1.333     jmc      1690: The user session, as well as any forwarded or listening IP sockets,
1.259     jmc      1691: will be bound to this
1.257     djm      1692: .Xr rdomain 4 .
                   1693: If the routing domain is set to
                   1694: .Cm \&%D ,
1.259     jmc      1695: then the domain in which the incoming connection was received will be applied.
1.296     naddy    1696: .It Cm SecurityKeyProvider
1.297     naddy    1697: Specifies a path to a library that will be used when loading
                   1698: FIDO authenticator-hosted keys, overriding the default of using
                   1699: the built-in USB HID support.
1.274     djm      1700: .It Cm SetEnv
                   1701: Specifies one or more environment variables to set in child sessions started
                   1702: by
                   1703: .Xr sshd 8
                   1704: as
                   1705: .Dq NAME=VALUE .
                   1706: The environment value may be quoted (e.g. if it contains whitespace
                   1707: characters).
                   1708: Environment variables set by
                   1709: .Cm SetEnv
                   1710: override the default environment and any variables specified by the user
                   1711: via
                   1712: .Cm AcceptEnv
                   1713: or
                   1714: .Cm PermitUserEnvironment .
1.175     millert  1715: .It Cm StreamLocalBindMask
                   1716: Sets the octal file creation mode mask
                   1717: .Pq umask
                   1718: used when creating a Unix-domain socket file for local or remote
                   1719: port forwarding.
                   1720: This option is only used for port forwarding to a Unix-domain socket file.
                   1721: .Pp
                   1722: The default value is 0177, which creates a Unix-domain socket file that is
                   1723: readable and writable only by the owner.
                   1724: Note that not all operating systems honor the file mode on Unix-domain
                   1725: socket files.
                   1726: .It Cm StreamLocalBindUnlink
                   1727: Specifies whether to remove an existing Unix-domain socket file for local
                   1728: or remote port forwarding before creating a new one.
                   1729: If the socket file already exists and
                   1730: .Cm StreamLocalBindUnlink
                   1731: is not enabled,
                   1732: .Nm sshd
                   1733: will be unable to forward the port to the Unix-domain socket file.
                   1734: This option is only used for port forwarding to a Unix-domain socket file.
                   1735: .Pp
                   1736: The argument must be
1.237     jmc      1737: .Cm yes
1.175     millert  1738: or
1.237     jmc      1739: .Cm no .
1.175     millert  1740: The default is
1.237     jmc      1741: .Cm no .
1.1       stevesk  1742: .It Cm StrictModes
                   1743: Specifies whether
1.52      jmc      1744: .Xr sshd 8
1.1       stevesk  1745: should check file modes and ownership of the
                   1746: user's files and home directory before accepting login.
                   1747: This is normally desirable because novices sometimes accidentally leave their
                   1748: directory or files world-writable.
                   1749: The default is
1.237     jmc      1750: .Cm yes .
1.112     djm      1751: Note that this does not apply to
                   1752: .Cm ChrootDirectory ,
                   1753: whose permissions and ownership are checked unconditionally.
1.1       stevesk  1754: .It Cm Subsystem
1.51      jmc      1755: Configures an external subsystem (e.g. file transfer daemon).
1.59      djm      1756: Arguments should be a subsystem name and a command (with optional arguments)
                   1757: to execute upon subsystem request.
1.80      djm      1758: .Pp
1.1       stevesk  1759: The command
1.237     jmc      1760: .Cm sftp-server
                   1761: implements the SFTP file transfer subsystem.
1.80      djm      1762: .Pp
                   1763: Alternately the name
1.237     jmc      1764: .Cm internal-sftp
                   1765: implements an in-process SFTP server.
1.80      djm      1766: This may simplify configurations using
                   1767: .Cm ChrootDirectory
                   1768: to force a different filesystem root on clients.
                   1769: .Pp
1.1       stevesk  1770: By default no subsystems are defined.
                   1771: .It Cm SyslogFacility
                   1772: Gives the facility code that is used when logging messages from
1.53      jmc      1773: .Xr sshd 8 .
1.1       stevesk  1774: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
                   1775: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
                   1776: The default is AUTH.
1.27      markus   1777: .It Cm TCPKeepAlive
                   1778: Specifies whether the system should send TCP keepalive messages to the
                   1779: other side.
                   1780: If they are sent, death of the connection or crash of one
                   1781: of the machines will be properly noticed.
                   1782: However, this means that
                   1783: connections will die if the route is down temporarily, and some people
                   1784: find it annoying.
                   1785: On the other hand, if TCP keepalives are not sent,
                   1786: sessions may hang indefinitely on the server, leaving
1.237     jmc      1787: .Qq ghost
1.27      markus   1788: users and consuming server resources.
                   1789: .Pp
                   1790: The default is
1.237     jmc      1791: .Cm yes
1.27      markus   1792: (to send TCP keepalive messages), and the server will notice
                   1793: if the network goes down or the client host crashes.
                   1794: This avoids infinitely hanging sessions.
                   1795: .Pp
                   1796: To disable TCP keepalive messages, the value should be set to
1.237     jmc      1797: .Cm no .
1.118     djm      1798: .It Cm TrustedUserCAKeys
                   1799: Specifies a file containing public keys of certificate authorities that are
1.195     dtucker  1800: trusted to sign user certificates for authentication, or
1.237     jmc      1801: .Cm none
1.195     dtucker  1802: to not use one.
1.119     jmc      1803: Keys are listed one per line; empty lines and comments starting with
1.118     djm      1804: .Ql #
                   1805: are allowed.
                   1806: If a certificate is presented for authentication and has its signing CA key
                   1807: listed in this file, then it may be used for authentication for any user
                   1808: listed in the certificate's principals list.
                   1809: Note that certificates that lack a list of principals will not be permitted
                   1810: for authentication using
                   1811: .Cm TrustedUserCAKeys .
1.161     jmc      1812: For more details on certificates, see the CERTIFICATES section in
1.118     djm      1813: .Xr ssh-keygen 1 .
1.18      markus   1814: .It Cm UseDNS
                   1815: Specifies whether
1.52      jmc      1816: .Xr sshd 8
1.207     djm      1817: should look up the remote host name, and to check that
1.18      markus   1818: the resolved host name for the remote IP address maps back to the
                   1819: very same IP address.
1.207     djm      1820: .Pp
                   1821: If this option is set to
1.237     jmc      1822: .Cm no
1.207     djm      1823: (the default) then only addresses and not host names may be used in
1.221     djm      1824: .Pa ~/.ssh/authorized_keys
1.207     djm      1825: .Cm from
                   1826: and
1.211     jmc      1827: .Nm
1.207     djm      1828: .Cm Match
                   1829: .Cm Host
                   1830: directives.
1.137     djm      1831: .It Cm VersionAddendum
                   1832: Optionally specifies additional text to append to the SSH protocol banner
                   1833: sent by the server upon connection.
                   1834: The default is
1.237     jmc      1835: .Cm none .
1.1       stevesk  1836: .It Cm X11DisplayOffset
                   1837: Specifies the first display number available for
1.52      jmc      1838: .Xr sshd 8 Ns 's
1.1       stevesk  1839: X11 forwarding.
1.52      jmc      1840: This prevents sshd from interfering with real X11 servers.
1.1       stevesk  1841: The default is 10.
                   1842: .It Cm X11Forwarding
                   1843: Specifies whether X11 forwarding is permitted.
1.13      stevesk  1844: The argument must be
1.237     jmc      1845: .Cm yes
1.13      stevesk  1846: or
1.237     jmc      1847: .Cm no .
1.1       stevesk  1848: The default is
1.237     jmc      1849: .Cm no .
1.13      stevesk  1850: .Pp
                   1851: When X11 forwarding is enabled, there may be additional exposure to
                   1852: the server and to client displays if the
1.52      jmc      1853: .Xr sshd 8
1.13      stevesk  1854: proxy display is configured to listen on the wildcard address (see
1.237     jmc      1855: .Cm X11UseLocalhost ) ,
                   1856: though this is not the default.
1.13      stevesk  1857: Additionally, the authentication spoofing and authentication data
                   1858: verification and substitution occur on the client side.
                   1859: The security risk of using X11 forwarding is that the client's X11
1.52      jmc      1860: display server may be exposed to attack when the SSH client requests
1.13      stevesk  1861: forwarding (see the warnings for
                   1862: .Cm ForwardX11
                   1863: in
1.19      jmc      1864: .Xr ssh_config 5 ) .
1.13      stevesk  1865: A system administrator may have a stance in which they want to
                   1866: protect clients that may expose themselves to attack by unwittingly
                   1867: requesting X11 forwarding, which can warrant a
1.237     jmc      1868: .Cm no
1.13      stevesk  1869: setting.
                   1870: .Pp
                   1871: Note that disabling X11 forwarding does not prevent users from
                   1872: forwarding X11 traffic, as users can always install their own forwarders.
1.1       stevesk  1873: .It Cm X11UseLocalhost
                   1874: Specifies whether
1.52      jmc      1875: .Xr sshd 8
1.1       stevesk  1876: should bind the X11 forwarding server to the loopback address or to
1.15      jmc      1877: the wildcard address.
                   1878: By default,
1.52      jmc      1879: sshd binds the forwarding server to the loopback address and sets the
1.1       stevesk  1880: hostname part of the
                   1881: .Ev DISPLAY
                   1882: environment variable to
1.237     jmc      1883: .Cm localhost .
1.8       stevesk  1884: This prevents remote hosts from connecting to the proxy display.
1.1       stevesk  1885: However, some older X11 clients may not function with this
                   1886: configuration.
                   1887: .Cm X11UseLocalhost
                   1888: may be set to
1.237     jmc      1889: .Cm no
1.1       stevesk  1890: to specify that the forwarding server should be bound to the wildcard
                   1891: address.
                   1892: The argument must be
1.237     jmc      1893: .Cm yes
1.1       stevesk  1894: or
1.237     jmc      1895: .Cm no .
1.1       stevesk  1896: The default is
1.237     jmc      1897: .Cm yes .
1.1       stevesk  1898: .It Cm XAuthLocation
1.11      stevesk  1899: Specifies the full pathname of the
1.1       stevesk  1900: .Xr xauth 1
1.195     dtucker  1901: program, or
1.237     jmc      1902: .Cm none
1.195     dtucker  1903: to not use one.
1.1       stevesk  1904: The default is
                   1905: .Pa /usr/X11R6/bin/xauth .
                   1906: .El
1.55      jmc      1907: .Sh TIME FORMATS
1.53      jmc      1908: .Xr sshd 8
1.1       stevesk  1909: command-line arguments and configuration file options that specify time
                   1910: may be expressed using a sequence of the form:
                   1911: .Sm off
1.7       stevesk  1912: .Ar time Op Ar qualifier ,
1.1       stevesk  1913: .Sm on
                   1914: where
                   1915: .Ar time
                   1916: is a positive integer value and
                   1917: .Ar qualifier
                   1918: is one of the following:
                   1919: .Pp
                   1920: .Bl -tag -width Ds -compact -offset indent
1.64      jmc      1921: .It Aq Cm none
1.1       stevesk  1922: seconds
                   1923: .It Cm s | Cm S
                   1924: seconds
                   1925: .It Cm m | Cm M
                   1926: minutes
                   1927: .It Cm h | Cm H
                   1928: hours
                   1929: .It Cm d | Cm D
                   1930: days
                   1931: .It Cm w | Cm W
                   1932: weeks
                   1933: .El
                   1934: .Pp
                   1935: Each member of the sequence is added together to calculate
                   1936: the total time value.
                   1937: .Pp
                   1938: Time format examples:
                   1939: .Pp
                   1940: .Bl -tag -width Ds -compact -offset indent
                   1941: .It 600
                   1942: 600 seconds (10 minutes)
                   1943: .It 10m
                   1944: 10 minutes
                   1945: .It 1h30m
                   1946: 1 hour 30 minutes (90 minutes)
                   1947: .El
1.235     jmc      1948: .Sh TOKENS
                   1949: Arguments to some keywords can make use of tokens,
                   1950: which are expanded at runtime:
                   1951: .Pp
                   1952: .Bl -tag -width XXXX -offset indent -compact
                   1953: .It %%
                   1954: A literal
                   1955: .Sq % .
1.257     djm      1956: .It \&%D
                   1957: The routing domain in which the incoming connection was received.
1.235     jmc      1958: .It %F
                   1959: The fingerprint of the CA key.
                   1960: .It %f
                   1961: The fingerprint of the key or certificate.
                   1962: .It %h
                   1963: The home directory of the user.
                   1964: .It %i
                   1965: The key ID in the certificate.
                   1966: .It %K
                   1967: The base64-encoded CA key.
                   1968: .It %k
                   1969: The base64-encoded key or certificate for authentication.
                   1970: .It %s
                   1971: The serial number of the certificate.
                   1972: .It \&%T
                   1973: The type of the CA key.
                   1974: .It %t
                   1975: The key or certificate type.
1.268     jmc      1976: .It \&%U
                   1977: The numeric user ID of the target user.
1.235     jmc      1978: .It %u
                   1979: The username.
                   1980: .El
                   1981: .Pp
                   1982: .Cm AuthorizedKeysCommand
1.270     jmc      1983: accepts the tokens %%, %f, %h, %k, %t, %U, and %u.
1.235     jmc      1984: .Pp
                   1985: .Cm AuthorizedKeysFile
1.270     jmc      1986: accepts the tokens %%, %h, %U, and %u.
1.235     jmc      1987: .Pp
                   1988: .Cm AuthorizedPrincipalsCommand
1.270     jmc      1989: accepts the tokens %%, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u.
1.235     jmc      1990: .Pp
                   1991: .Cm AuthorizedPrincipalsFile
1.270     jmc      1992: accepts the tokens %%, %h, %U, and %u.
1.235     jmc      1993: .Pp
                   1994: .Cm ChrootDirectory
1.270     jmc      1995: accepts the tokens %%, %h, %U, and %u.
1.257     djm      1996: .Pp
                   1997: .Cm RoutingDomain
                   1998: accepts the token %D.
1.1       stevesk  1999: .Sh FILES
                   2000: .Bl -tag -width Ds
                   2001: .It Pa /etc/ssh/sshd_config
                   2002: Contains configuration data for
1.53      jmc      2003: .Xr sshd 8 .
1.1       stevesk  2004: This file should be writable by root only, but it is recommended
                   2005: (though not necessary) that it be world-readable.
                   2006: .El
1.19      jmc      2007: .Sh SEE ALSO
1.237     jmc      2008: .Xr sftp-server 8 ,
1.19      jmc      2009: .Xr sshd 8
1.1       stevesk  2010: .Sh AUTHORS
1.237     jmc      2011: .An -nosplit
1.1       stevesk  2012: OpenSSH is a derivative of the original and free
1.237     jmc      2013: ssh 1.2.12 release by
                   2014: .An Tatu Ylonen .
                   2015: .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
                   2016: .An Theo de Raadt
                   2017: and
                   2018: .An Dug Song
1.1       stevesk  2019: removed many bugs, re-added newer features and
                   2020: created OpenSSH.
1.237     jmc      2021: .An Markus Friedl
                   2022: contributed the support for SSH protocol versions 1.5 and 2.0.
                   2023: .An Niels Provos
                   2024: and
                   2025: .An Markus Friedl
                   2026: contributed support for privilege separation.