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

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