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

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