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

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.174   ! djm        36: .\" $OpenBSD: sshd_config.5,v 1.173 2014/03/28 05:17:11 naddy Exp $
        !            37: .Dd $Mdocdate: March 28 2014 $
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 SYNOPSIS
1.71      jmc        44: .Nm /etc/ssh/sshd_config
1.1       stevesk    45: .Sh DESCRIPTION
1.53      jmc        46: .Xr sshd 8
1.1       stevesk    47: reads configuration data from
                     48: .Pa /etc/ssh/sshd_config
                     49: (or the file specified with
                     50: .Fl f
                     51: on the command line).
                     52: The file contains keyword-argument pairs, one per line.
                     53: Lines starting with
                     54: .Ql #
                     55: and empty lines are interpreted as comments.
1.56      dtucker    56: Arguments may optionally be enclosed in double quotes
                     57: .Pq \&"
                     58: in order to represent arguments containing spaces.
1.1       stevesk    59: .Pp
                     60: The possible
                     61: keywords and their meanings are as follows (note that
                     62: keywords are case-insensitive and arguments are case-sensitive):
                     63: .Bl -tag -width Ds
1.30      djm        64: .It Cm AcceptEnv
                     65: Specifies what environment variables sent by the client will be copied into
                     66: the session's
                     67: .Xr environ 7 .
                     68: See
                     69: .Cm SendEnv
                     70: in
                     71: .Xr ssh_config 5
                     72: for how to configure the client.
1.31      djm        73: Note that environment passing is only supported for protocol 2.
1.30      djm        74: Variables are specified by name, which may contain the wildcard characters
1.51      jmc        75: .Ql *
1.30      djm        76: and
                     77: .Ql \&? .
1.31      djm        78: Multiple environment variables may be separated by whitespace or spread
1.30      djm        79: across multiple
                     80: .Cm AcceptEnv
                     81: directives.
1.31      djm        82: Be warned that some environment variables could be used to bypass restricted
1.30      djm        83: user environments.
                     84: For this reason, care should be taken in the use of this directive.
                     85: The default is not to accept any environment variables.
1.37      djm        86: .It Cm AddressFamily
                     87: Specifies which address family should be used by
1.53      jmc        88: .Xr sshd 8 .
1.37      djm        89: Valid arguments are
                     90: .Dq any ,
                     91: .Dq inet
1.52      jmc        92: (use IPv4 only), or
1.37      djm        93: .Dq inet6
                     94: (use IPv6 only).
                     95: The default is
                     96: .Dq any .
1.89      jmc        97: .It Cm AllowAgentForwarding
                     98: Specifies whether
                     99: .Xr ssh-agent 1
                    100: forwarding is permitted.
                    101: The default is
                    102: .Dq yes .
                    103: Note that disabling agent forwarding does not improve security
                    104: unless users are also denied shell access, as they can always install
                    105: their own forwarders.
1.1       stevesk   106: .It Cm AllowGroups
                    107: This keyword can be followed by a list of group name patterns, separated
                    108: by spaces.
                    109: If specified, login is allowed only for users whose primary
                    110: group or supplementary group list matches one of the patterns.
                    111: Only group names are valid; a numerical group ID is not recognized.
                    112: By default, login is allowed for all groups.
1.54      jmc       113: The allow/deny directives are processed in the following order:
                    114: .Cm DenyUsers ,
                    115: .Cm AllowUsers ,
                    116: .Cm DenyGroups ,
                    117: and finally
                    118: .Cm AllowGroups .
1.49      jmc       119: .Pp
1.161     jmc       120: See PATTERNS in
1.49      jmc       121: .Xr ssh_config 5
                    122: for more information on patterns.
1.1       stevesk   123: .It Cm AllowTcpForwarding
                    124: Specifies whether TCP forwarding is permitted.
1.150     djm       125: The available options are
                    126: .Dq yes
                    127: or
                    128: .Dq all
                    129: to allow TCP forwarding,
                    130: .Dq no
                    131: to prevent all TCP forwarding,
                    132: .Dq local
                    133: to allow local (from the perspective of
1.151     jmc       134: .Xr ssh 1 )
                    135: forwarding only or
1.150     djm       136: .Dq remote
                    137: to allow remote forwarding only.
1.1       stevesk   138: The default is
                    139: .Dq yes .
                    140: Note that disabling TCP forwarding does not improve security unless
                    141: users are also denied shell access, as they can always install their
                    142: own forwarders.
                    143: .It Cm AllowUsers
                    144: This keyword can be followed by a list of user name patterns, separated
                    145: by spaces.
1.14      jmc       146: If specified, login is allowed only for user names that
1.1       stevesk   147: match one of the patterns.
                    148: Only user names are valid; a numerical user ID is not recognized.
                    149: By default, login is allowed for all users.
                    150: If the pattern takes the form USER@HOST then USER and HOST
                    151: are separately checked, restricting logins to particular
                    152: users from particular hosts.
1.54      jmc       153: The allow/deny directives are processed in the following order:
                    154: .Cm DenyUsers ,
                    155: .Cm AllowUsers ,
                    156: .Cm DenyGroups ,
                    157: and finally
                    158: .Cm AllowGroups .
1.49      jmc       159: .Pp
1.161     jmc       160: See PATTERNS in
1.49      jmc       161: .Xr ssh_config 5
                    162: for more information on patterns.
1.149     djm       163: .It Cm AuthenticationMethods
                    164: Specifies the authentication methods that must be successfully completed
                    165: for a user to be granted access.
                    166: This option must be followed by one or more comma-separated lists of
                    167: authentication method names.
                    168: Successful authentication requires completion of every method in at least
                    169: one of these lists.
                    170: .Pp
                    171: For example, an argument of
                    172: .Dq publickey,password publickey,keyboard-interactive
                    173: would require the user to complete public key authentication, followed by
                    174: either password or keyboard interactive authentication.
                    175: Only methods that are next in one or more lists are offered at each stage,
                    176: so for this example, it would not be possible to attempt password or
                    177: keyboard-interactive authentication before public key.
1.157     markus    178: .Pp
                    179: For keyboard interactive authentication it is also possible to
                    180: restrict authentication to a specific device by appending a
                    181: colon followed by the device identifier
                    182: .Dq bsdauth ,
                    183: .Dq pam ,
                    184: or
                    185: .Dq skey ,
                    186: depending on the server configuration.
                    187: For example,
                    188: .Dq keyboard-interactive:bsdauth
                    189: would restrict keyboard interactive authentication to the
                    190: .Dq bsdauth
                    191: device.
1.149     djm       192: .Pp
                    193: This option is only available for SSH protocol 2 and will yield a fatal
                    194: error if enabled if protocol 1 is also enabled.
                    195: Note that each authentication method listed should also be explicitly enabled
                    196: in the configuration.
                    197: The default is not to require multiple authentication; successful completion
                    198: of a single authentication method is sufficient.
1.146     djm       199: .It Cm AuthorizedKeysCommand
1.147     jmc       200: Specifies a program to be used to look up the user's public keys.
1.158     djm       201: The program must be owned by root and not writable by group or others.
                    202: It will be invoked with a single argument of the username
1.146     djm       203: being authenticated, and should produce on standard output zero or
1.161     jmc       204: more lines of authorized_keys output (see AUTHORIZED_KEYS in
1.147     jmc       205: .Xr sshd 8 ) .
1.146     djm       206: If a key supplied by AuthorizedKeysCommand does not successfully authenticate
                    207: and authorize the user then public key authentication continues using the usual
                    208: .Cm AuthorizedKeysFile
                    209: files.
                    210: By default, no AuthorizedKeysCommand is run.
                    211: .It Cm AuthorizedKeysCommandUser
                    212: Specifies the user under whose account the AuthorizedKeysCommand is run.
                    213: It is recommended to use a dedicated user that has no other role on the host
                    214: than running authorized keys commands.
1.1       stevesk   215: .It Cm AuthorizedKeysFile
                    216: Specifies the file that contains the public keys that can be used
                    217: for user authentication.
1.124     djm       218: The format is described in the
1.161     jmc       219: AUTHORIZED_KEYS FILE FORMAT
1.124     djm       220: section of
                    221: .Xr sshd 8 .
1.1       stevesk   222: .Cm AuthorizedKeysFile
                    223: may contain tokens of the form %T which are substituted during connection
1.52      jmc       224: setup.
1.17      jmc       225: The following tokens are defined: %% is replaced by a literal '%',
1.52      jmc       226: %h is replaced by the home directory of the user being authenticated, and
1.1       stevesk   227: %u is replaced by the username of that user.
                    228: After expansion,
                    229: .Cm AuthorizedKeysFile
                    230: is taken to be an absolute path or one relative to the user's home
                    231: directory.
1.133     jmc       232: Multiple files may be listed, separated by whitespace.
                    233: The default is
                    234: .Dq .ssh/authorized_keys .ssh/authorized_keys2 .
1.121     djm       235: .It Cm AuthorizedPrincipalsFile
                    236: Specifies a file that lists principal names that are accepted for
                    237: certificate authentication.
                    238: When using certificates signed by a key listed in
                    239: .Cm TrustedUserCAKeys ,
                    240: this file lists names, one of which must appear in the certificate for it
                    241: to be accepted for authentication.
1.125     jmc       242: Names are listed one per line preceded by key options (as described
1.161     jmc       243: in AUTHORIZED_KEYS FILE FORMAT in
1.125     jmc       244: .Xr sshd 8 ) .
1.124     djm       245: Empty lines and comments starting with
1.121     djm       246: .Ql #
                    247: are ignored.
                    248: .Pp
                    249: .Cm AuthorizedPrincipalsFile
                    250: may contain tokens of the form %T which are substituted during connection
                    251: setup.
                    252: The following tokens are defined: %% is replaced by a literal '%',
                    253: %h is replaced by the home directory of the user being authenticated, and
                    254: %u is replaced by the username of that user.
                    255: After expansion,
                    256: .Cm AuthorizedPrincipalsFile
                    257: is taken to be an absolute path or one relative to the user's home
                    258: directory.
                    259: .Pp
1.138     djm       260: The default is
                    261: .Dq none ,
                    262: i.e. not to use a principals file \(en in this case, the username
1.121     djm       263: of the user must appear in a certificate's principals list for it to be
                    264: accepted.
                    265: Note that
                    266: .Cm AuthorizedPrincipalsFile
                    267: is only used when authentication proceeds using a CA listed in
                    268: .Cm TrustedUserCAKeys
                    269: and is not consulted for certification authorities trusted via
                    270: .Pa ~/.ssh/authorized_keys ,
                    271: though the
                    272: .Cm principals=
                    273: key option offers a similar facility (see
                    274: .Xr sshd 8
                    275: for details).
1.1       stevesk   276: .It Cm Banner
                    277: The contents of the specified file are sent to the remote user before
                    278: authentication is allowed.
1.78      djm       279: If the argument is
                    280: .Dq none
                    281: then no banner is displayed.
1.1       stevesk   282: This option is only available for protocol version 2.
                    283: By default, no banner is displayed.
                    284: .It Cm ChallengeResponseAuthentication
1.50      jmc       285: Specifies whether challenge-response authentication is allowed.
1.1       stevesk   286: All authentication styles from
                    287: .Xr login.conf 5
                    288: are supported.
                    289: The default is
                    290: .Dq yes .
1.80      djm       291: .It Cm ChrootDirectory
1.113     stevesk   292: Specifies the pathname of a directory to
1.80      djm       293: .Xr chroot 2
                    294: to after authentication.
1.113     stevesk   295: All components of the pathname must be root-owned directories that are
1.80      djm       296: not writable by any other user or group.
1.106     stevesk   297: After the chroot,
                    298: .Xr sshd 8
                    299: changes the working directory to the user's home directory.
1.80      djm       300: .Pp
1.113     stevesk   301: The pathname may contain the following tokens that are expanded at runtime once
1.80      djm       302: the connecting user has been authenticated: %% is replaced by a literal '%',
                    303: %h is replaced by the home directory of the user being authenticated, and
                    304: %u is replaced by the username of that user.
                    305: .Pp
                    306: The
                    307: .Cm ChrootDirectory
                    308: must contain the necessary files and directories to support the
1.103     stevesk   309: user's session.
1.80      djm       310: For an interactive session this requires at least a shell, typically
                    311: .Xr sh 1 ,
                    312: and basic
                    313: .Pa /dev
                    314: nodes such as
                    315: .Xr null 4 ,
                    316: .Xr zero 4 ,
                    317: .Xr stdin 4 ,
                    318: .Xr stdout 4 ,
                    319: .Xr stderr 4 ,
                    320: .Xr arandom 4
                    321: and
                    322: .Xr tty 4
                    323: devices.
                    324: For file transfer sessions using
1.105     jmc       325: .Dq sftp ,
1.80      djm       326: no additional configuration of the environment is necessary if the
1.105     jmc       327: in-process sftp server is used,
                    328: though sessions which use logging do require
1.104     stevesk   329: .Pa /dev/log
                    330: inside the chroot directory (see
                    331: .Xr sftp-server 8
1.81      jmc       332: for details).
1.80      djm       333: .Pp
                    334: The default is not to
                    335: .Xr chroot 2 .
1.1       stevesk   336: .It Cm Ciphers
                    337: Specifies the ciphers allowed for protocol version 2.
                    338: Multiple ciphers must be comma-separated.
1.167     djm       339: The supported ciphers are:
                    340: .Pp
1.173     naddy     341: .Bl -item -compact -offset indent
                    342: .It
                    343: 3des-cbc
                    344: .It
                    345: aes128-cbc
                    346: .It
                    347: aes192-cbc
                    348: .It
                    349: aes256-cbc
                    350: .It
                    351: aes128-ctr
                    352: .It
                    353: aes192-ctr
                    354: .It
                    355: aes256-ctr
                    356: .It
                    357: aes128-gcm@openssh.com
                    358: .It
                    359: aes256-gcm@openssh.com
                    360: .It
                    361: arcfour
                    362: .It
                    363: arcfour128
                    364: .It
                    365: arcfour256
                    366: .It
                    367: blowfish-cbc
                    368: .It
                    369: cast128-cbc
                    370: .It
                    371: chacha20-poly1305@openssh.com
                    372: .El
1.167     djm       373: .Pp
1.52      jmc       374: The default is:
1.173     naddy     375: .Bd -literal -offset indent
                    376: aes128-ctr,aes192-ctr,aes256-ctr,
1.153     markus    377: aes128-gcm@openssh.com,aes256-gcm@openssh.com,
1.173     naddy     378: chacha20-poly1305@openssh.com
1.1       stevesk   379: .Ed
1.167     djm       380: .Pp
                    381: The list of available ciphers may also be obtained using the
                    382: .Fl Q
                    383: option of
                    384: .Xr ssh 1 .
1.1       stevesk   385: .It Cm ClientAliveCountMax
1.48      jmc       386: Sets the number of client alive messages (see below) which may be
1.1       stevesk   387: sent without
1.52      jmc       388: .Xr sshd 8
1.17      jmc       389: receiving any messages back from the client.
                    390: If this threshold is reached while client alive messages are being sent,
1.52      jmc       391: sshd will disconnect the client, terminating the session.
1.17      jmc       392: It is important to note that the use of client alive messages is very
                    393: different from
1.27      markus    394: .Cm TCPKeepAlive
1.17      jmc       395: (below).
                    396: The client alive messages are sent through the encrypted channel
                    397: and therefore will not be spoofable.
                    398: The TCP keepalive option enabled by
1.27      markus    399: .Cm TCPKeepAlive
1.17      jmc       400: is spoofable.
                    401: The client alive mechanism is valuable when the client or
1.1       stevesk   402: server depend on knowing when a connection has become inactive.
                    403: .Pp
1.17      jmc       404: The default value is 3.
                    405: If
1.1       stevesk   406: .Cm ClientAliveInterval
1.48      jmc       407: (see below) is set to 15, and
1.1       stevesk   408: .Cm ClientAliveCountMax
1.52      jmc       409: is left at the default, unresponsive SSH clients
1.1       stevesk   410: will be disconnected after approximately 45 seconds.
1.57      markus    411: This option applies to protocol version 2 only.
1.42      djm       412: .It Cm ClientAliveInterval
                    413: Sets a timeout interval in seconds after which if no data has been received
                    414: from the client,
1.52      jmc       415: .Xr sshd 8
1.42      djm       416: will send a message through the encrypted
                    417: channel to request a response from the client.
                    418: The default
                    419: is 0, indicating that these messages will not be sent to the client.
                    420: This option applies to protocol version 2 only.
1.3       markus    421: .It Cm Compression
1.44      markus    422: Specifies whether compression is allowed, or delayed until
                    423: the user has authenticated successfully.
1.3       markus    424: The argument must be
1.44      markus    425: .Dq yes ,
                    426: .Dq delayed ,
1.3       markus    427: or
                    428: .Dq no .
                    429: The default is
1.44      markus    430: .Dq delayed .
1.1       stevesk   431: .It Cm DenyGroups
                    432: This keyword can be followed by a list of group name patterns, separated
                    433: by spaces.
                    434: Login is disallowed for users whose primary group or supplementary
                    435: group list matches one of the patterns.
                    436: Only group names are valid; a numerical group ID is not recognized.
                    437: By default, login is allowed for all groups.
1.54      jmc       438: The allow/deny directives are processed in the following order:
                    439: .Cm DenyUsers ,
                    440: .Cm AllowUsers ,
                    441: .Cm DenyGroups ,
                    442: and finally
                    443: .Cm AllowGroups .
1.49      jmc       444: .Pp
1.161     jmc       445: See PATTERNS in
1.49      jmc       446: .Xr ssh_config 5
                    447: for more information on patterns.
1.1       stevesk   448: .It Cm DenyUsers
                    449: This keyword can be followed by a list of user name patterns, separated
                    450: by spaces.
                    451: Login is disallowed for user names that match one of the patterns.
                    452: Only user names are valid; a numerical user ID is not recognized.
                    453: By default, login is allowed for all users.
                    454: If the pattern takes the form USER@HOST then USER and HOST
                    455: are separately checked, restricting logins to particular
                    456: users from particular hosts.
1.54      jmc       457: The allow/deny directives are processed in the following order:
                    458: .Cm DenyUsers ,
                    459: .Cm AllowUsers ,
                    460: .Cm DenyGroups ,
                    461: and finally
                    462: .Cm AllowGroups .
1.49      jmc       463: .Pp
1.161     jmc       464: See PATTERNS in
1.49      jmc       465: .Xr ssh_config 5
                    466: for more information on patterns.
1.67      dtucker   467: .It Cm ForceCommand
                    468: Forces the execution of the command specified by
                    469: .Cm ForceCommand ,
1.84      djm       470: ignoring any command supplied by the client and
                    471: .Pa ~/.ssh/rc
                    472: if present.
1.67      dtucker   473: The command is invoked by using the user's login shell with the -c option.
                    474: This applies to shell, command, or subsystem execution.
                    475: It is most useful inside a
                    476: .Cm Match
                    477: block.
                    478: The command originally supplied by the client is available in the
                    479: .Ev SSH_ORIGINAL_COMMAND
                    480: environment variable.
1.82      djm       481: Specifying a command of
                    482: .Dq internal-sftp
                    483: will force the use of an in-process sftp server that requires no support
                    484: files when used with
                    485: .Cm ChrootDirectory .
1.1       stevesk   486: .It Cm GatewayPorts
                    487: Specifies whether remote hosts are allowed to connect to ports
                    488: forwarded for the client.
                    489: By default,
1.52      jmc       490: .Xr sshd 8
1.15      jmc       491: binds remote port forwardings to the loopback address.
                    492: This prevents other remote hosts from connecting to forwarded ports.
1.1       stevesk   493: .Cm GatewayPorts
1.52      jmc       494: can be used to specify that sshd
1.39      djm       495: should allow remote port forwardings to bind to non-loopback addresses, thus
                    496: allowing other hosts to connect.
                    497: The argument may be
                    498: .Dq no
                    499: to force remote port forwardings to be available to the local host only,
1.1       stevesk   500: .Dq yes
1.39      djm       501: to force remote port forwardings to bind to the wildcard address, or
                    502: .Dq clientspecified
                    503: to allow the client to select the address to which the forwarding is bound.
1.1       stevesk   504: The default is
                    505: .Dq no .
1.23      markus    506: .It Cm GSSAPIAuthentication
1.25      markus    507: Specifies whether user authentication based on GSSAPI is allowed.
1.26      djm       508: The default is
1.23      markus    509: .Dq no .
                    510: Note that this option applies to protocol version 2 only.
                    511: .It Cm GSSAPICleanupCredentials
                    512: Specifies whether to automatically destroy the user's credentials cache
                    513: on logout.
                    514: The default is
                    515: .Dq yes .
                    516: Note that this option applies to protocol version 2 only.
1.1       stevesk   517: .It Cm HostbasedAuthentication
                    518: Specifies whether rhosts or /etc/hosts.equiv authentication together
                    519: with successful public key client host authentication is allowed
1.50      jmc       520: (host-based authentication).
1.1       stevesk   521: This option is similar to
                    522: .Cm RhostsRSAAuthentication
                    523: and applies to protocol version 2 only.
1.70      dtucker   524: The default is
                    525: .Dq no .
                    526: .It Cm HostbasedUsesNameFromPacketOnly
                    527: Specifies whether or not the server will attempt to perform a reverse
                    528: name lookup when matching the name in the
                    529: .Pa ~/.shosts ,
                    530: .Pa ~/.rhosts ,
                    531: and
                    532: .Pa /etc/hosts.equiv
                    533: files during
                    534: .Cm HostbasedAuthentication .
                    535: A setting of
                    536: .Dq yes
                    537: means that
                    538: .Xr sshd 8
                    539: uses the name supplied by the client rather than
                    540: attempting to resolve the name from the TCP connection itself.
1.1       stevesk   541: The default is
                    542: .Dq no .
1.117     djm       543: .It Cm HostCertificate
                    544: Specifies a file containing a public host certificate.
                    545: The certificate's public key must match a private host key already specified
                    546: by
                    547: .Cm HostKey .
                    548: The default behaviour of
                    549: .Xr sshd 8
                    550: is not to load any certificates.
1.1       stevesk   551: .It Cm HostKey
                    552: Specifies a file containing a private host key
                    553: used by SSH.
                    554: The default is
                    555: .Pa /etc/ssh/ssh_host_key
                    556: for protocol version 1, and
1.126     djm       557: .Pa /etc/ssh/ssh_host_dsa_key ,
1.169     naddy     558: .Pa /etc/ssh/ssh_host_ecdsa_key ,
                    559: .Pa /etc/ssh/ssh_host_ed25519_key
1.126     djm       560: and
1.1       stevesk   561: .Pa /etc/ssh/ssh_host_rsa_key
                    562: for protocol version 2.
                    563: Note that
1.52      jmc       564: .Xr sshd 8
1.1       stevesk   565: will refuse to use a file if it is group/world-accessible.
                    566: It is possible to have multiple host key files.
                    567: .Dq rsa1
                    568: keys are used for version 1 and
1.126     djm       569: .Dq dsa ,
1.169     naddy     570: .Dq ecdsa ,
                    571: .Dq ed25519
1.1       stevesk   572: or
                    573: .Dq rsa
                    574: are used for version 2 of the SSH protocol.
1.162     markus    575: It is also possible to specify public host key files instead.
                    576: In this case operations on the private key will be delegated
                    577: to an
                    578: .Xr ssh-agent 1 .
                    579: .It Cm HostKeyAgent
                    580: Identifies the UNIX-domain socket used to communicate
                    581: with an agent that has access to the private host keys.
                    582: If
                    583: .Dq SSH_AUTH_SOCK
                    584: is specified, the location of the socket will be read from the
                    585: .Ev SSH_AUTH_SOCK
                    586: environment variable.
1.1       stevesk   587: .It Cm IgnoreRhosts
                    588: Specifies that
                    589: .Pa .rhosts
                    590: and
                    591: .Pa .shosts
                    592: files will not be used in
                    593: .Cm RhostsRSAAuthentication
                    594: or
                    595: .Cm HostbasedAuthentication .
                    596: .Pp
                    597: .Pa /etc/hosts.equiv
                    598: and
                    599: .Pa /etc/shosts.equiv
                    600: are still used.
                    601: The default is
                    602: .Dq yes .
                    603: .It Cm IgnoreUserKnownHosts
                    604: Specifies whether
1.52      jmc       605: .Xr sshd 8
1.1       stevesk   606: should ignore the user's
1.41      djm       607: .Pa ~/.ssh/known_hosts
1.1       stevesk   608: during
                    609: .Cm RhostsRSAAuthentication
                    610: or
                    611: .Cm HostbasedAuthentication .
                    612: The default is
                    613: .Dq no .
1.129     djm       614: .It Cm IPQoS
                    615: Specifies the IPv4 type-of-service or DSCP class for the connection.
                    616: Accepted values are
                    617: .Dq af11 ,
                    618: .Dq af12 ,
                    619: .Dq af13 ,
1.136     djm       620: .Dq af21 ,
1.129     djm       621: .Dq af22 ,
                    622: .Dq af23 ,
                    623: .Dq af31 ,
                    624: .Dq af32 ,
                    625: .Dq af33 ,
                    626: .Dq af41 ,
                    627: .Dq af42 ,
                    628: .Dq af43 ,
                    629: .Dq cs0 ,
                    630: .Dq cs1 ,
                    631: .Dq cs2 ,
                    632: .Dq cs3 ,
                    633: .Dq cs4 ,
                    634: .Dq cs5 ,
                    635: .Dq cs6 ,
                    636: .Dq cs7 ,
                    637: .Dq ef ,
                    638: .Dq lowdelay ,
                    639: .Dq throughput ,
                    640: .Dq reliability ,
                    641: or a numeric value.
1.131     djm       642: This option may take one or two arguments, separated by whitespace.
1.129     djm       643: If one argument is specified, it is used as the packet class unconditionally.
                    644: If two values are specified, the first is automatically selected for
                    645: interactive sessions and the second for non-interactive sessions.
                    646: The default is
                    647: .Dq lowdelay
                    648: for interactive sessions and
                    649: .Dq throughput
                    650: for non-interactive sessions.
1.171     jmc       651: .It Cm KbdInteractiveAuthentication
                    652: Specifies whether to allow keyboard-interactive authentication.
                    653: The argument to this keyword must be
                    654: .Dq yes
                    655: or
                    656: .Dq no .
                    657: The default is to use whatever value
                    658: .Cm ChallengeResponseAuthentication
                    659: is set to
                    660: (by default
                    661: .Dq yes ) .
1.1       stevesk   662: .It Cm KerberosAuthentication
1.24      markus    663: Specifies whether the password provided by the user for
1.1       stevesk   664: .Cm PasswordAuthentication
1.24      markus    665: will be validated through the Kerberos KDC.
1.1       stevesk   666: To use this option, the server needs a
                    667: Kerberos servtab which allows the verification of the KDC's identity.
1.52      jmc       668: The default is
1.29      dtucker   669: .Dq no .
                    670: .It Cm KerberosGetAFSToken
1.45      djm       671: If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
1.29      dtucker   672: an AFS token before accessing the user's home directory.
1.52      jmc       673: The default is
1.1       stevesk   674: .Dq no .
                    675: .It Cm KerberosOrLocalPasswd
1.52      jmc       676: If password authentication through Kerberos fails then
1.1       stevesk   677: the password will be validated via any additional local mechanism
                    678: such as
                    679: .Pa /etc/passwd .
1.52      jmc       680: The default is
1.1       stevesk   681: .Dq yes .
                    682: .It Cm KerberosTicketCleanup
                    683: Specifies whether to automatically destroy the user's ticket cache
                    684: file on logout.
1.52      jmc       685: The default is
1.1       stevesk   686: .Dq yes .
1.127     djm       687: .It Cm KexAlgorithms
                    688: Specifies the available KEX (Key Exchange) algorithms.
                    689: Multiple algorithms must be comma-separated.
1.173     naddy     690: The supported algorithms are:
                    691: .Pp
                    692: .Bl -item -compact -offset indent
                    693: .It
                    694: curve25519-sha256@libssh.org
                    695: .It
                    696: diffie-hellman-group1-sha1
                    697: .It
                    698: diffie-hellman-group14-sha1
                    699: .It
                    700: diffie-hellman-group-exchange-sha1
                    701: .It
                    702: diffie-hellman-group-exchange-sha256
                    703: .It
                    704: ecdh-sha2-nistp256
                    705: .It
                    706: ecdh-sha2-nistp384
                    707: .It
                    708: ecdh-sha2-nistp521
                    709: .El
                    710: .Pp
                    711: The default is:
1.170     dtucker   712: .Bd -literal -offset indent
                    713: curve25519-sha256@libssh.org,
                    714: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
                    715: diffie-hellman-group-exchange-sha256,
1.173     naddy     716: diffie-hellman-group14-sha1
1.170     dtucker   717: .Ed
1.1       stevesk   718: .It Cm KeyRegenerationInterval
                    719: In protocol version 1, the ephemeral server key is automatically regenerated
                    720: after this many seconds (if it has been used).
                    721: The purpose of regeneration is to prevent
                    722: decrypting captured sessions by later breaking into the machine and
                    723: stealing the keys.
                    724: The key is never stored anywhere.
                    725: If the value is 0, the key is never regenerated.
                    726: The default is 3600 (seconds).
                    727: .It Cm ListenAddress
                    728: Specifies the local addresses
1.52      jmc       729: .Xr sshd 8
1.1       stevesk   730: should listen on.
                    731: The following forms may be used:
                    732: .Pp
                    733: .Bl -item -offset indent -compact
                    734: .It
                    735: .Cm ListenAddress
                    736: .Sm off
                    737: .Ar host No | Ar IPv4_addr No | Ar IPv6_addr
                    738: .Sm on
                    739: .It
                    740: .Cm ListenAddress
                    741: .Sm off
                    742: .Ar host No | Ar IPv4_addr No : Ar port
                    743: .Sm on
                    744: .It
                    745: .Cm ListenAddress
                    746: .Sm off
                    747: .Oo
                    748: .Ar host No | Ar IPv6_addr Oc : Ar port
                    749: .Sm on
                    750: .El
                    751: .Pp
                    752: If
                    753: .Ar port
                    754: is not specified,
1.52      jmc       755: sshd will listen on the address and all prior
1.1       stevesk   756: .Cm Port
1.17      jmc       757: options specified.
                    758: The default is to listen on all local addresses.
1.15      jmc       759: Multiple
1.1       stevesk   760: .Cm ListenAddress
1.17      jmc       761: options are permitted.
                    762: Additionally, any
1.1       stevesk   763: .Cm Port
1.52      jmc       764: options must precede this option for non-port qualified addresses.
1.1       stevesk   765: .It Cm LoginGraceTime
                    766: The server disconnects after this time if the user has not
                    767: successfully logged in.
                    768: If the value is 0, there is no time limit.
1.12      stevesk   769: The default is 120 seconds.
1.1       stevesk   770: .It Cm LogLevel
                    771: Gives the verbosity level that is used when logging messages from
1.53      jmc       772: .Xr sshd 8 .
1.1       stevesk   773: The possible values are:
1.52      jmc       774: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1.15      jmc       775: The default is INFO.
                    776: DEBUG and DEBUG1 are equivalent.
                    777: DEBUG2 and DEBUG3 each specify higher levels of debugging output.
                    778: Logging with a DEBUG level violates the privacy of users and is not recommended.
1.1       stevesk   779: .It Cm MACs
                    780: Specifies the available MAC (message authentication code) algorithms.
                    781: The MAC algorithm is used in protocol version 2
                    782: for data integrity protection.
                    783: Multiple algorithms must be comma-separated.
1.152     markus    784: The algorithms that contain
                    785: .Dq -etm
                    786: calculate the MAC after encryption (encrypt-then-mac).
                    787: These are considered safer and their use recommended.
1.173     naddy     788: The supported MACs are:
                    789: .Pp
                    790: .Bl -item -compact -offset indent
                    791: .It
                    792: hmac-md5
                    793: .It
                    794: hmac-md5-96
                    795: .It
                    796: hmac-ripemd160
                    797: .It
                    798: hmac-sha1
                    799: .It
                    800: hmac-sha1-96
                    801: .It
                    802: hmac-sha2-256
                    803: .It
                    804: hmac-sha2-512
                    805: .It
                    806: umac-64@openssh.com
                    807: .It
                    808: umac-128@openssh.com
                    809: .It
                    810: hmac-md5-etm@openssh.com
                    811: .It
                    812: hmac-md5-96-etm@openssh.com
                    813: .It
                    814: hmac-ripemd160-etm@openssh.com
                    815: .It
                    816: hmac-sha1-etm@openssh.com
                    817: .It
                    818: hmac-sha1-96-etm@openssh.com
                    819: .It
                    820: hmac-sha2-256-etm@openssh.com
                    821: .It
                    822: hmac-sha2-512-etm@openssh.com
                    823: .It
                    824: umac-64-etm@openssh.com
                    825: .It
                    826: umac-128-etm@openssh.com
                    827: .El
                    828: .Pp
1.52      jmc       829: The default is:
1.77      jmc       830: .Bd -literal -offset indent
1.152     markus    831: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
                    832: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1.173     naddy     833: umac-64@openssh.com,umac-128@openssh.com,
                    834: hmac-sha2-256,hmac-sha2-512
1.77      jmc       835: .Ed
1.60      dtucker   836: .It Cm Match
1.61      jmc       837: Introduces a conditional block.
1.65      dtucker   838: If all of the criteria on the
1.60      dtucker   839: .Cm Match
1.65      dtucker   840: line are satisfied, the keywords on the following lines override those
                    841: set in the global section of the config file, until either another
1.60      dtucker   842: .Cm Match
1.65      dtucker   843: line or the end of the file.
1.172     djm       844: If a keyword appears in multiple
                    845: .Cm Match
                    846: blocks that are satisified, only the first instance of the keyword is
                    847: applied.
1.91      djm       848: .Pp
1.61      jmc       849: The arguments to
1.60      dtucker   850: .Cm Match
1.163     dtucker   851: are one or more criteria-pattern pairs or the single token
                    852: .Cm All
                    853: which matches all criteria.
1.60      dtucker   854: The available criteria are
                    855: .Cm User ,
1.69      dtucker   856: .Cm Group ,
1.60      dtucker   857: .Cm Host ,
1.139     dtucker   858: .Cm LocalAddress ,
                    859: .Cm LocalPort ,
1.60      dtucker   860: and
                    861: .Cm Address .
1.91      djm       862: The match patterns may consist of single entries or comma-separated
                    863: lists and may use the wildcard and negation operators described in the
1.161     jmc       864: PATTERNS section of
1.92      djm       865: .Xr ssh_config 5 .
1.91      djm       866: .Pp
                    867: The patterns in an
                    868: .Cm Address
                    869: criteria may additionally contain addresses to match in CIDR
1.93      jmc       870: address/masklen format, e.g.\&
1.91      djm       871: .Dq 192.0.2.0/24
                    872: or
                    873: .Dq 3ffe:ffff::/32 .
                    874: Note that the mask length provided must be consistent with the address -
                    875: it is an error to specify a mask length that is too long for the address
1.93      jmc       876: or one with bits set in this host portion of the address.
                    877: For example,
1.91      djm       878: .Dq 192.0.2.0/33
                    879: and
1.93      jmc       880: .Dq 192.0.2.0/8
1.91      djm       881: respectively.
                    882: .Pp
1.60      dtucker   883: Only a subset of keywords may be used on the lines following a
                    884: .Cm Match
                    885: keyword.
                    886: Available keywords are
1.142     jmc       887: .Cm AcceptEnv ,
1.99      okan      888: .Cm AllowAgentForwarding ,
1.142     jmc       889: .Cm AllowGroups ,
1.62      dtucker   890: .Cm AllowTcpForwarding ,
1.141     markus    891: .Cm AllowUsers ,
1.149     djm       892: .Cm AuthenticationMethods ,
1.146     djm       893: .Cm AuthorizedKeysCommand ,
                    894: .Cm AuthorizedKeysCommandUser ,
1.147     jmc       895: .Cm AuthorizedKeysFile ,
1.123     djm       896: .Cm AuthorizedPrincipalsFile ,
1.72      dtucker   897: .Cm Banner ,
1.85      djm       898: .Cm ChrootDirectory ,
1.141     markus    899: .Cm DenyGroups ,
                    900: .Cm DenyUsers ,
1.67      dtucker   901: .Cm ForceCommand ,
1.142     jmc       902: .Cm GatewayPorts ,
1.141     markus    903: .Cm GSSAPIAuthentication ,
1.87      djm       904: .Cm HostbasedAuthentication ,
1.123     djm       905: .Cm HostbasedUsesNameFromPacketOnly ,
1.74      jmc       906: .Cm KbdInteractiveAuthentication ,
1.72      dtucker   907: .Cm KerberosAuthentication ,
1.95      dtucker   908: .Cm MaxAuthTries ,
1.94      dtucker   909: .Cm MaxSessions ,
1.72      dtucker   910: .Cm PasswordAuthentication ,
1.97      djm       911: .Cm PermitEmptyPasswords ,
1.66      dtucker   912: .Cm PermitOpen ,
1.79      dtucker   913: .Cm PermitRootLogin ,
1.164     djm       914: .Cm PermitTTY ,
1.123     djm       915: .Cm PermitTunnel ,
1.174   ! djm       916: .Cm PermitUserRC ,
1.107     dtucker   917: .Cm PubkeyAuthentication ,
1.159     dtucker   918: .Cm RekeyLimit ,
1.142     jmc       919: .Cm RhostsRSAAuthentication ,
1.141     markus    920: .Cm RSAAuthentication ,
1.66      dtucker   921: .Cm X11DisplayOffset ,
1.101     djm       922: .Cm X11Forwarding
1.60      dtucker   923: and
1.102     djm       924: .Cm X11UseLocalHost .
1.33      dtucker   925: .It Cm MaxAuthTries
                    926: Specifies the maximum number of authentication attempts permitted per
1.35      jmc       927: connection.
                    928: Once the number of failures reaches half this value,
                    929: additional failures are logged.
                    930: The default is 6.
1.90      djm       931: .It Cm MaxSessions
                    932: Specifies the maximum number of open sessions permitted per network connection.
                    933: The default is 10.
1.1       stevesk   934: .It Cm MaxStartups
                    935: Specifies the maximum number of concurrent unauthenticated connections to the
1.52      jmc       936: SSH daemon.
1.1       stevesk   937: Additional connections will be dropped until authentication succeeds or the
                    938: .Cm LoginGraceTime
                    939: expires for a connection.
1.156     dtucker   940: The default is 10:30:100.
1.1       stevesk   941: .Pp
                    942: Alternatively, random early drop can be enabled by specifying
                    943: the three colon separated values
                    944: .Dq start:rate:full
1.51      jmc       945: (e.g. "10:30:60").
1.53      jmc       946: .Xr sshd 8
1.1       stevesk   947: will refuse connection attempts with a probability of
                    948: .Dq rate/100
                    949: (30%)
                    950: if there are currently
                    951: .Dq start
                    952: (10)
                    953: unauthenticated connections.
                    954: The probability increases linearly and all connection attempts
                    955: are refused if the number of unauthenticated connections reaches
                    956: .Dq full
                    957: (60).
                    958: .It Cm PasswordAuthentication
                    959: Specifies whether password authentication is allowed.
                    960: The default is
                    961: .Dq yes .
                    962: .It Cm PermitEmptyPasswords
                    963: When password authentication is allowed, it specifies whether the
                    964: server allows login to accounts with empty password strings.
                    965: The default is
                    966: .Dq no .
1.62      dtucker   967: .It Cm PermitOpen
                    968: Specifies the destinations to which TCP port forwarding is permitted.
                    969: The forwarding specification must be one of the following forms:
                    970: .Pp
                    971: .Bl -item -offset indent -compact
                    972: .It
                    973: .Cm PermitOpen
                    974: .Sm off
                    975: .Ar host : port
                    976: .Sm on
                    977: .It
                    978: .Cm PermitOpen
                    979: .Sm off
                    980: .Ar IPv4_addr : port
                    981: .Sm on
                    982: .It
                    983: .Cm PermitOpen
                    984: .Sm off
                    985: .Ar \&[ IPv6_addr \&] : port
                    986: .Sm on
                    987: .El
                    988: .Pp
1.68      dtucker   989: Multiple forwards may be specified by separating them with whitespace.
1.62      dtucker   990: An argument of
                    991: .Dq any
                    992: can be used to remove all restrictions and permit any forwarding requests.
1.140     dtucker   993: An argument of
                    994: .Dq none
                    995: can be used to prohibit all forwarding requests.
1.63      jmc       996: By default all port forwarding requests are permitted.
1.1       stevesk   997: .It Cm PermitRootLogin
1.38      jmc       998: Specifies whether root can log in using
1.1       stevesk   999: .Xr ssh 1 .
                   1000: The argument must be
                   1001: .Dq yes ,
                   1002: .Dq without-password ,
1.52      jmc      1003: .Dq forced-commands-only ,
1.1       stevesk  1004: or
                   1005: .Dq no .
                   1006: The default is
                   1007: .Dq yes .
                   1008: .Pp
                   1009: If this option is set to
1.52      jmc      1010: .Dq without-password ,
1.1       stevesk  1011: password authentication is disabled for root.
                   1012: .Pp
                   1013: If this option is set to
1.52      jmc      1014: .Dq forced-commands-only ,
1.1       stevesk  1015: root login with public key authentication will be allowed,
                   1016: but only if the
                   1017: .Ar command
                   1018: option has been specified
                   1019: (which may be useful for taking remote backups even if root login is
1.17      jmc      1020: normally not allowed).
                   1021: All other authentication methods are disabled for root.
1.1       stevesk  1022: .Pp
                   1023: If this option is set to
1.52      jmc      1024: .Dq no ,
1.38      jmc      1025: root is not allowed to log in.
1.46      reyk     1026: .It Cm PermitTunnel
                   1027: Specifies whether
                   1028: .Xr tun 4
                   1029: device forwarding is allowed.
1.47      reyk     1030: The argument must be
                   1031: .Dq yes ,
1.58      stevesk  1032: .Dq point-to-point
                   1033: (layer 3),
                   1034: .Dq ethernet
                   1035: (layer 2), or
1.47      reyk     1036: .Dq no .
1.58      stevesk  1037: Specifying
                   1038: .Dq yes
                   1039: permits both
                   1040: .Dq point-to-point
                   1041: and
                   1042: .Dq ethernet .
1.46      reyk     1043: The default is
                   1044: .Dq no .
1.164     djm      1045: .It Cm PermitTTY
                   1046: Specifies whether
1.165     jmc      1047: .Xr pty 4
1.164     djm      1048: allocation is permitted.
                   1049: The default is
                   1050: .Dq yes .
1.6       markus   1051: .It Cm PermitUserEnvironment
                   1052: Specifies whether
                   1053: .Pa ~/.ssh/environment
1.9       stevesk  1054: and
1.6       markus   1055: .Cm environment=
                   1056: options in
                   1057: .Pa ~/.ssh/authorized_keys
1.9       stevesk  1058: are processed by
1.52      jmc      1059: .Xr sshd 8 .
1.6       markus   1060: The default is
                   1061: .Dq no .
1.9       stevesk  1062: Enabling environment processing may enable users to bypass access
                   1063: restrictions in some configurations using mechanisms such as
                   1064: .Ev LD_PRELOAD .
1.174   ! djm      1065: .It Cm PermitUserRC
        !          1066: Specifies whether any
        !          1067: .Pa ~/.ssh/rc
        !          1068: file is executed.
        !          1069: The default is
        !          1070: .Dq yes .
1.1       stevesk  1071: .It Cm PidFile
1.4       stevesk  1072: Specifies the file that contains the process ID of the
1.53      jmc      1073: SSH daemon.
1.1       stevesk  1074: The default is
                   1075: .Pa /var/run/sshd.pid .
                   1076: .It Cm Port
                   1077: Specifies the port number that
1.52      jmc      1078: .Xr sshd 8
1.1       stevesk  1079: listens on.
                   1080: The default is 22.
                   1081: Multiple options of this type are permitted.
                   1082: See also
                   1083: .Cm ListenAddress .
                   1084: .It Cm PrintLastLog
                   1085: Specifies whether
1.52      jmc      1086: .Xr sshd 8
1.36      jaredy   1087: should print the date and time of the last user login when a user logs
                   1088: in interactively.
1.1       stevesk  1089: The default is
                   1090: .Dq yes .
                   1091: .It Cm PrintMotd
                   1092: Specifies whether
1.52      jmc      1093: .Xr sshd 8
1.1       stevesk  1094: should print
                   1095: .Pa /etc/motd
                   1096: when a user logs in interactively.
                   1097: (On some systems it is also printed by the shell,
                   1098: .Pa /etc/profile ,
                   1099: or equivalent.)
                   1100: The default is
                   1101: .Dq yes .
                   1102: .It Cm Protocol
                   1103: Specifies the protocol versions
1.52      jmc      1104: .Xr sshd 8
1.5       stevesk  1105: supports.
1.1       stevesk  1106: The possible values are
1.52      jmc      1107: .Sq 1
1.1       stevesk  1108: and
1.52      jmc      1109: .Sq 2 .
1.1       stevesk  1110: Multiple versions must be comma-separated.
                   1111: The default is
1.109     jmc      1112: .Sq 2 .
1.5       stevesk  1113: Note that the order of the protocol list does not indicate preference,
                   1114: because the client selects among multiple protocol versions offered
                   1115: by the server.
                   1116: Specifying
                   1117: .Dq 2,1
                   1118: is identical to
                   1119: .Dq 1,2 .
1.1       stevesk  1120: .It Cm PubkeyAuthentication
                   1121: Specifies whether public key authentication is allowed.
                   1122: The default is
                   1123: .Dq yes .
                   1124: Note that this option applies to protocol version 2 only.
1.159     dtucker  1125: .It Cm RekeyLimit
                   1126: Specifies the maximum amount of data that may be transmitted before the
                   1127: session key is renegotiated, optionally followed a maximum amount of
                   1128: time that may pass before the session key is renegotiated.
                   1129: The first argument is specified in bytes and may have a suffix of
                   1130: .Sq K ,
                   1131: .Sq M ,
                   1132: or
                   1133: .Sq G
                   1134: to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
                   1135: The default is between
                   1136: .Sq 1G
                   1137: and
                   1138: .Sq 4G ,
                   1139: depending on the cipher.
                   1140: The optional second value is specified in seconds and may use any of the
                   1141: units documented in the
                   1142: .Sx TIME FORMATS
1.160     jmc      1143: section.
1.159     dtucker  1144: The default value for
                   1145: .Cm RekeyLimit
                   1146: is
                   1147: .Dq default none ,
                   1148: which means that rekeying is performed after the cipher's default amount
                   1149: of data has been sent or received and no time based rekeying is done.
                   1150: This option applies to protocol version 2 only.
1.118     djm      1151: .It Cm RevokedKeys
1.154     djm      1152: Specifies revoked public keys.
1.118     djm      1153: Keys listed in this file will be refused for public key authentication.
                   1154: Note that if this file is not readable, then public key authentication will
                   1155: be refused for all users.
1.154     djm      1156: Keys may be specified as a text file, listing one public key per line, or as
                   1157: an OpenSSH Key Revocation List (KRL) as generated by
1.155     jmc      1158: .Xr ssh-keygen 1 .
1.161     jmc      1159: For more information on KRLs, see the KEY REVOCATION LISTS section in
1.154     djm      1160: .Xr ssh-keygen 1 .
1.1       stevesk  1161: .It Cm RhostsRSAAuthentication
                   1162: Specifies whether rhosts or /etc/hosts.equiv authentication together
                   1163: with successful RSA host authentication is allowed.
                   1164: The default is
                   1165: .Dq no .
                   1166: This option applies to protocol version 1 only.
                   1167: .It Cm RSAAuthentication
                   1168: Specifies whether pure RSA authentication is allowed.
                   1169: The default is
                   1170: .Dq yes .
                   1171: This option applies to protocol version 1 only.
                   1172: .It Cm ServerKeyBits
                   1173: Defines the number of bits in the ephemeral protocol version 1 server key.
1.96      djm      1174: The minimum value is 512, and the default is 1024.
1.1       stevesk  1175: .It Cm StrictModes
                   1176: Specifies whether
1.52      jmc      1177: .Xr sshd 8
1.1       stevesk  1178: should check file modes and ownership of the
                   1179: user's files and home directory before accepting login.
                   1180: This is normally desirable because novices sometimes accidentally leave their
                   1181: directory or files world-writable.
                   1182: The default is
                   1183: .Dq yes .
1.112     djm      1184: Note that this does not apply to
                   1185: .Cm ChrootDirectory ,
                   1186: whose permissions and ownership are checked unconditionally.
1.1       stevesk  1187: .It Cm Subsystem
1.51      jmc      1188: Configures an external subsystem (e.g. file transfer daemon).
1.59      djm      1189: Arguments should be a subsystem name and a command (with optional arguments)
                   1190: to execute upon subsystem request.
1.80      djm      1191: .Pp
1.1       stevesk  1192: The command
                   1193: .Xr sftp-server 8
                   1194: implements the
                   1195: .Dq sftp
                   1196: file transfer subsystem.
1.80      djm      1197: .Pp
                   1198: Alternately the name
                   1199: .Dq internal-sftp
                   1200: implements an in-process
                   1201: .Dq sftp
                   1202: server.
                   1203: This may simplify configurations using
                   1204: .Cm ChrootDirectory
                   1205: to force a different filesystem root on clients.
                   1206: .Pp
1.1       stevesk  1207: By default no subsystems are defined.
                   1208: Note that this option applies to protocol version 2 only.
                   1209: .It Cm SyslogFacility
                   1210: Gives the facility code that is used when logging messages from
1.53      jmc      1211: .Xr sshd 8 .
1.1       stevesk  1212: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
                   1213: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
                   1214: The default is AUTH.
1.27      markus   1215: .It Cm TCPKeepAlive
                   1216: Specifies whether the system should send TCP keepalive messages to the
                   1217: other side.
                   1218: If they are sent, death of the connection or crash of one
                   1219: of the machines will be properly noticed.
                   1220: However, this means that
                   1221: connections will die if the route is down temporarily, and some people
                   1222: find it annoying.
                   1223: On the other hand, if TCP keepalives are not sent,
                   1224: sessions may hang indefinitely on the server, leaving
                   1225: .Dq ghost
                   1226: users and consuming server resources.
                   1227: .Pp
                   1228: The default is
                   1229: .Dq yes
                   1230: (to send TCP keepalive messages), and the server will notice
                   1231: if the network goes down or the client host crashes.
                   1232: This avoids infinitely hanging sessions.
                   1233: .Pp
                   1234: To disable TCP keepalive messages, the value should be set to
                   1235: .Dq no .
1.118     djm      1236: .It Cm TrustedUserCAKeys
                   1237: Specifies a file containing public keys of certificate authorities that are
1.120     djm      1238: trusted to sign user certificates for authentication.
1.119     jmc      1239: Keys are listed one per line; empty lines and comments starting with
1.118     djm      1240: .Ql #
                   1241: are allowed.
                   1242: If a certificate is presented for authentication and has its signing CA key
                   1243: listed in this file, then it may be used for authentication for any user
                   1244: listed in the certificate's principals list.
                   1245: Note that certificates that lack a list of principals will not be permitted
                   1246: for authentication using
                   1247: .Cm TrustedUserCAKeys .
1.161     jmc      1248: For more details on certificates, see the CERTIFICATES section in
1.118     djm      1249: .Xr ssh-keygen 1 .
1.18      markus   1250: .It Cm UseDNS
                   1251: Specifies whether
1.52      jmc      1252: .Xr sshd 8
1.40      jmc      1253: should look up the remote host name and check that
1.18      markus   1254: the resolved host name for the remote IP address maps back to the
                   1255: very same IP address.
                   1256: The default is
                   1257: .Dq yes .
1.1       stevesk  1258: .It Cm UseLogin
                   1259: Specifies whether
                   1260: .Xr login 1
                   1261: is used for interactive login sessions.
                   1262: The default is
                   1263: .Dq no .
                   1264: Note that
                   1265: .Xr login 1
                   1266: is never used for remote command execution.
                   1267: Note also, that if this is enabled,
                   1268: .Cm X11Forwarding
                   1269: will be disabled because
                   1270: .Xr login 1
                   1271: does not know how to handle
                   1272: .Xr xauth 1
1.15      jmc      1273: cookies.
                   1274: If
1.1       stevesk  1275: .Cm UsePrivilegeSeparation
                   1276: is specified, it will be disabled after authentication.
                   1277: .It Cm UsePrivilegeSeparation
                   1278: Specifies whether
1.52      jmc      1279: .Xr sshd 8
1.2       stevesk  1280: separates privileges by creating an unprivileged child process
1.15      jmc      1281: to deal with incoming network traffic.
                   1282: After successful authentication, another process will be created that has
                   1283: the privilege of the authenticated user.
                   1284: The goal of privilege separation is to prevent privilege
1.1       stevesk  1285: escalation by containing any corruption within the unprivileged processes.
                   1286: The default is
                   1287: .Dq yes .
1.134     djm      1288: If
                   1289: .Cm UsePrivilegeSeparation
                   1290: is set to
                   1291: .Dq sandbox
                   1292: then the pre-authentication unprivileged process is subject to additional
                   1293: restrictions.
1.137     djm      1294: .It Cm VersionAddendum
                   1295: Optionally specifies additional text to append to the SSH protocol banner
                   1296: sent by the server upon connection.
                   1297: The default is
                   1298: .Dq none .
1.1       stevesk  1299: .It Cm X11DisplayOffset
                   1300: Specifies the first display number available for
1.52      jmc      1301: .Xr sshd 8 Ns 's
1.1       stevesk  1302: X11 forwarding.
1.52      jmc      1303: This prevents sshd from interfering with real X11 servers.
1.1       stevesk  1304: The default is 10.
                   1305: .It Cm X11Forwarding
                   1306: Specifies whether X11 forwarding is permitted.
1.13      stevesk  1307: The argument must be
                   1308: .Dq yes
                   1309: or
                   1310: .Dq no .
1.1       stevesk  1311: The default is
                   1312: .Dq no .
1.13      stevesk  1313: .Pp
                   1314: When X11 forwarding is enabled, there may be additional exposure to
                   1315: the server and to client displays if the
1.52      jmc      1316: .Xr sshd 8
1.13      stevesk  1317: proxy display is configured to listen on the wildcard address (see
                   1318: .Cm X11UseLocalhost
1.52      jmc      1319: below), though this is not the default.
1.13      stevesk  1320: Additionally, the authentication spoofing and authentication data
                   1321: verification and substitution occur on the client side.
                   1322: The security risk of using X11 forwarding is that the client's X11
1.52      jmc      1323: display server may be exposed to attack when the SSH client requests
1.13      stevesk  1324: forwarding (see the warnings for
                   1325: .Cm ForwardX11
                   1326: in
1.19      jmc      1327: .Xr ssh_config 5 ) .
1.13      stevesk  1328: A system administrator may have a stance in which they want to
                   1329: protect clients that may expose themselves to attack by unwittingly
                   1330: requesting X11 forwarding, which can warrant a
                   1331: .Dq no
                   1332: setting.
                   1333: .Pp
                   1334: Note that disabling X11 forwarding does not prevent users from
                   1335: forwarding X11 traffic, as users can always install their own forwarders.
1.1       stevesk  1336: X11 forwarding is automatically disabled if
                   1337: .Cm UseLogin
                   1338: is enabled.
                   1339: .It Cm X11UseLocalhost
                   1340: Specifies whether
1.52      jmc      1341: .Xr sshd 8
1.1       stevesk  1342: should bind the X11 forwarding server to the loopback address or to
1.15      jmc      1343: the wildcard address.
                   1344: By default,
1.52      jmc      1345: sshd binds the forwarding server to the loopback address and sets the
1.1       stevesk  1346: hostname part of the
                   1347: .Ev DISPLAY
                   1348: environment variable to
                   1349: .Dq localhost .
1.8       stevesk  1350: This prevents remote hosts from connecting to the proxy display.
1.1       stevesk  1351: However, some older X11 clients may not function with this
                   1352: configuration.
                   1353: .Cm X11UseLocalhost
                   1354: may be set to
                   1355: .Dq no
                   1356: to specify that the forwarding server should be bound to the wildcard
                   1357: address.
                   1358: The argument must be
                   1359: .Dq yes
                   1360: or
                   1361: .Dq no .
                   1362: The default is
                   1363: .Dq yes .
                   1364: .It Cm XAuthLocation
1.11      stevesk  1365: Specifies the full pathname of the
1.1       stevesk  1366: .Xr xauth 1
                   1367: program.
                   1368: The default is
                   1369: .Pa /usr/X11R6/bin/xauth .
                   1370: .El
1.55      jmc      1371: .Sh TIME FORMATS
1.53      jmc      1372: .Xr sshd 8
1.1       stevesk  1373: command-line arguments and configuration file options that specify time
                   1374: may be expressed using a sequence of the form:
                   1375: .Sm off
1.7       stevesk  1376: .Ar time Op Ar qualifier ,
1.1       stevesk  1377: .Sm on
                   1378: where
                   1379: .Ar time
                   1380: is a positive integer value and
                   1381: .Ar qualifier
                   1382: is one of the following:
                   1383: .Pp
                   1384: .Bl -tag -width Ds -compact -offset indent
1.64      jmc      1385: .It Aq Cm none
1.1       stevesk  1386: seconds
                   1387: .It Cm s | Cm S
                   1388: seconds
                   1389: .It Cm m | Cm M
                   1390: minutes
                   1391: .It Cm h | Cm H
                   1392: hours
                   1393: .It Cm d | Cm D
                   1394: days
                   1395: .It Cm w | Cm W
                   1396: weeks
                   1397: .El
                   1398: .Pp
                   1399: Each member of the sequence is added together to calculate
                   1400: the total time value.
                   1401: .Pp
                   1402: Time format examples:
                   1403: .Pp
                   1404: .Bl -tag -width Ds -compact -offset indent
                   1405: .It 600
                   1406: 600 seconds (10 minutes)
                   1407: .It 10m
                   1408: 10 minutes
                   1409: .It 1h30m
                   1410: 1 hour 30 minutes (90 minutes)
                   1411: .El
                   1412: .Sh FILES
                   1413: .Bl -tag -width Ds
                   1414: .It Pa /etc/ssh/sshd_config
                   1415: Contains configuration data for
1.53      jmc      1416: .Xr sshd 8 .
1.1       stevesk  1417: This file should be writable by root only, but it is recommended
                   1418: (though not necessary) that it be world-readable.
                   1419: .El
1.19      jmc      1420: .Sh SEE ALSO
                   1421: .Xr sshd 8
1.1       stevesk  1422: .Sh AUTHORS
                   1423: OpenSSH is a derivative of the original and free
                   1424: ssh 1.2.12 release by Tatu Ylonen.
                   1425: Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
                   1426: Theo de Raadt and Dug Song
                   1427: removed many bugs, re-added newer features and
                   1428: created OpenSSH.
                   1429: Markus Friedl contributed the support for SSH
                   1430: protocol versions 1.5 and 2.0.
                   1431: Niels Provos and Markus Friedl contributed support
                   1432: for privilege separation.