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

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