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

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