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

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