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

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