[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.309

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