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

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.182   ! djm        36: .\" $OpenBSD: sshd_config.5,v 1.181 2014/12/11 05:25:06 djm Exp $
        !            37: .Dd $Mdocdate: December 11 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.67      dtucker   489: .It Cm ForceCommand
                    490: Forces the execution of the command specified by
                    491: .Cm ForceCommand ,
1.84      djm       492: ignoring any command supplied by the client and
                    493: .Pa ~/.ssh/rc
                    494: if present.
1.67      dtucker   495: The command is invoked by using the user's login shell with the -c option.
                    496: This applies to shell, command, or subsystem execution.
                    497: It is most useful inside a
                    498: .Cm Match
                    499: block.
                    500: The command originally supplied by the client is available in the
                    501: .Ev SSH_ORIGINAL_COMMAND
                    502: environment variable.
1.82      djm       503: Specifying a command of
                    504: .Dq internal-sftp
                    505: will force the use of an in-process sftp server that requires no support
                    506: files when used with
                    507: .Cm ChrootDirectory .
1.1       stevesk   508: .It Cm GatewayPorts
                    509: Specifies whether remote hosts are allowed to connect to ports
                    510: forwarded for the client.
                    511: By default,
1.52      jmc       512: .Xr sshd 8
1.15      jmc       513: binds remote port forwardings to the loopback address.
                    514: This prevents other remote hosts from connecting to forwarded ports.
1.1       stevesk   515: .Cm GatewayPorts
1.52      jmc       516: can be used to specify that sshd
1.39      djm       517: should allow remote port forwardings to bind to non-loopback addresses, thus
                    518: allowing other hosts to connect.
                    519: The argument may be
                    520: .Dq no
                    521: to force remote port forwardings to be available to the local host only,
1.1       stevesk   522: .Dq yes
1.39      djm       523: to force remote port forwardings to bind to the wildcard address, or
                    524: .Dq clientspecified
                    525: to allow the client to select the address to which the forwarding is bound.
1.1       stevesk   526: The default is
                    527: .Dq no .
1.23      markus    528: .It Cm GSSAPIAuthentication
1.25      markus    529: Specifies whether user authentication based on GSSAPI is allowed.
1.26      djm       530: The default is
1.23      markus    531: .Dq no .
                    532: Note that this option applies to protocol version 2 only.
                    533: .It Cm GSSAPICleanupCredentials
                    534: Specifies whether to automatically destroy the user's credentials cache
                    535: on logout.
                    536: The default is
                    537: .Dq yes .
                    538: Note that this option applies to protocol version 2 only.
1.1       stevesk   539: .It Cm HostbasedAuthentication
                    540: Specifies whether rhosts or /etc/hosts.equiv authentication together
                    541: with successful public key client host authentication is allowed
1.50      jmc       542: (host-based authentication).
1.1       stevesk   543: This option is similar to
                    544: .Cm RhostsRSAAuthentication
                    545: and applies to protocol version 2 only.
1.70      dtucker   546: The default is
                    547: .Dq no .
                    548: .It Cm HostbasedUsesNameFromPacketOnly
                    549: Specifies whether or not the server will attempt to perform a reverse
                    550: name lookup when matching the name in the
                    551: .Pa ~/.shosts ,
                    552: .Pa ~/.rhosts ,
                    553: and
                    554: .Pa /etc/hosts.equiv
                    555: files during
                    556: .Cm HostbasedAuthentication .
                    557: A setting of
                    558: .Dq yes
                    559: means that
                    560: .Xr sshd 8
                    561: uses the name supplied by the client rather than
                    562: attempting to resolve the name from the TCP connection itself.
1.1       stevesk   563: The default is
                    564: .Dq no .
1.117     djm       565: .It Cm HostCertificate
                    566: Specifies a file containing a public host certificate.
                    567: The certificate's public key must match a private host key already specified
                    568: by
                    569: .Cm HostKey .
                    570: The default behaviour of
                    571: .Xr sshd 8
                    572: is not to load any certificates.
1.1       stevesk   573: .It Cm HostKey
                    574: Specifies a file containing a private host key
                    575: used by SSH.
                    576: The default is
                    577: .Pa /etc/ssh/ssh_host_key
                    578: for protocol version 1, and
1.126     djm       579: .Pa /etc/ssh/ssh_host_dsa_key ,
1.169     naddy     580: .Pa /etc/ssh/ssh_host_ecdsa_key ,
                    581: .Pa /etc/ssh/ssh_host_ed25519_key
1.126     djm       582: and
1.1       stevesk   583: .Pa /etc/ssh/ssh_host_rsa_key
                    584: for protocol version 2.
                    585: Note that
1.52      jmc       586: .Xr sshd 8
1.1       stevesk   587: will refuse to use a file if it is group/world-accessible.
                    588: It is possible to have multiple host key files.
                    589: .Dq rsa1
                    590: keys are used for version 1 and
1.126     djm       591: .Dq dsa ,
1.169     naddy     592: .Dq ecdsa ,
                    593: .Dq ed25519
1.1       stevesk   594: or
                    595: .Dq rsa
                    596: are used for version 2 of the SSH protocol.
1.162     markus    597: It is also possible to specify public host key files instead.
                    598: In this case operations on the private key will be delegated
                    599: to an
                    600: .Xr ssh-agent 1 .
                    601: .It Cm HostKeyAgent
                    602: Identifies the UNIX-domain socket used to communicate
                    603: with an agent that has access to the private host keys.
                    604: If
                    605: .Dq SSH_AUTH_SOCK
                    606: is specified, the location of the socket will be read from the
                    607: .Ev SSH_AUTH_SOCK
                    608: environment variable.
1.1       stevesk   609: .It Cm IgnoreRhosts
                    610: Specifies that
                    611: .Pa .rhosts
                    612: and
                    613: .Pa .shosts
                    614: files will not be used in
                    615: .Cm RhostsRSAAuthentication
                    616: or
                    617: .Cm HostbasedAuthentication .
                    618: .Pp
                    619: .Pa /etc/hosts.equiv
                    620: and
                    621: .Pa /etc/shosts.equiv
                    622: are still used.
                    623: The default is
                    624: .Dq yes .
                    625: .It Cm IgnoreUserKnownHosts
                    626: Specifies whether
1.52      jmc       627: .Xr sshd 8
1.1       stevesk   628: should ignore the user's
1.41      djm       629: .Pa ~/.ssh/known_hosts
1.1       stevesk   630: during
                    631: .Cm RhostsRSAAuthentication
                    632: or
                    633: .Cm HostbasedAuthentication .
                    634: The default is
                    635: .Dq no .
1.129     djm       636: .It Cm IPQoS
                    637: Specifies the IPv4 type-of-service or DSCP class for the connection.
                    638: Accepted values are
                    639: .Dq af11 ,
                    640: .Dq af12 ,
                    641: .Dq af13 ,
1.136     djm       642: .Dq af21 ,
1.129     djm       643: .Dq af22 ,
                    644: .Dq af23 ,
                    645: .Dq af31 ,
                    646: .Dq af32 ,
                    647: .Dq af33 ,
                    648: .Dq af41 ,
                    649: .Dq af42 ,
                    650: .Dq af43 ,
                    651: .Dq cs0 ,
                    652: .Dq cs1 ,
                    653: .Dq cs2 ,
                    654: .Dq cs3 ,
                    655: .Dq cs4 ,
                    656: .Dq cs5 ,
                    657: .Dq cs6 ,
                    658: .Dq cs7 ,
                    659: .Dq ef ,
                    660: .Dq lowdelay ,
                    661: .Dq throughput ,
                    662: .Dq reliability ,
                    663: or a numeric value.
1.131     djm       664: This option may take one or two arguments, separated by whitespace.
1.129     djm       665: If one argument is specified, it is used as the packet class unconditionally.
                    666: If two values are specified, the first is automatically selected for
                    667: interactive sessions and the second for non-interactive sessions.
                    668: The default is
                    669: .Dq lowdelay
                    670: for interactive sessions and
                    671: .Dq throughput
                    672: for non-interactive sessions.
1.171     jmc       673: .It Cm KbdInteractiveAuthentication
                    674: Specifies whether to allow keyboard-interactive authentication.
                    675: The argument to this keyword must be
                    676: .Dq yes
                    677: or
                    678: .Dq no .
                    679: The default is to use whatever value
                    680: .Cm ChallengeResponseAuthentication
                    681: is set to
                    682: (by default
                    683: .Dq yes ) .
1.1       stevesk   684: .It Cm KerberosAuthentication
1.24      markus    685: Specifies whether the password provided by the user for
1.1       stevesk   686: .Cm PasswordAuthentication
1.24      markus    687: will be validated through the Kerberos KDC.
1.1       stevesk   688: To use this option, the server needs a
                    689: Kerberos servtab which allows the verification of the KDC's identity.
1.52      jmc       690: The default is
1.29      dtucker   691: .Dq no .
                    692: .It Cm KerberosGetAFSToken
1.45      djm       693: If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
1.29      dtucker   694: an AFS token before accessing the user's home directory.
1.52      jmc       695: The default is
1.1       stevesk   696: .Dq no .
                    697: .It Cm KerberosOrLocalPasswd
1.52      jmc       698: If password authentication through Kerberos fails then
1.1       stevesk   699: the password will be validated via any additional local mechanism
                    700: such as
                    701: .Pa /etc/passwd .
1.52      jmc       702: The default is
1.1       stevesk   703: .Dq yes .
                    704: .It Cm KerberosTicketCleanup
                    705: Specifies whether to automatically destroy the user's ticket cache
                    706: file on logout.
1.52      jmc       707: The default is
1.1       stevesk   708: .Dq yes .
1.127     djm       709: .It Cm KexAlgorithms
                    710: Specifies the available KEX (Key Exchange) algorithms.
                    711: Multiple algorithms must be comma-separated.
1.173     naddy     712: The supported algorithms are:
                    713: .Pp
                    714: .Bl -item -compact -offset indent
                    715: .It
                    716: curve25519-sha256@libssh.org
                    717: .It
                    718: diffie-hellman-group1-sha1
                    719: .It
                    720: diffie-hellman-group14-sha1
                    721: .It
                    722: diffie-hellman-group-exchange-sha1
                    723: .It
                    724: diffie-hellman-group-exchange-sha256
                    725: .It
                    726: ecdh-sha2-nistp256
                    727: .It
                    728: ecdh-sha2-nistp384
                    729: .It
                    730: ecdh-sha2-nistp521
                    731: .El
                    732: .Pp
                    733: The default is:
1.170     dtucker   734: .Bd -literal -offset indent
                    735: curve25519-sha256@libssh.org,
                    736: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
                    737: diffie-hellman-group-exchange-sha256,
1.173     naddy     738: diffie-hellman-group14-sha1
1.170     dtucker   739: .Ed
1.1       stevesk   740: .It Cm KeyRegenerationInterval
                    741: In protocol version 1, the ephemeral server key is automatically regenerated
                    742: after this many seconds (if it has been used).
                    743: The purpose of regeneration is to prevent
                    744: decrypting captured sessions by later breaking into the machine and
                    745: stealing the keys.
                    746: The key is never stored anywhere.
                    747: If the value is 0, the key is never regenerated.
                    748: The default is 3600 (seconds).
                    749: .It Cm ListenAddress
                    750: Specifies the local addresses
1.52      jmc       751: .Xr sshd 8
1.1       stevesk   752: should listen on.
                    753: The following forms may be used:
                    754: .Pp
                    755: .Bl -item -offset indent -compact
                    756: .It
                    757: .Cm ListenAddress
                    758: .Sm off
1.180     jmc       759: .Ar host | Ar IPv4_addr | Ar IPv6_addr
1.1       stevesk   760: .Sm on
                    761: .It
                    762: .Cm ListenAddress
                    763: .Sm off
1.180     jmc       764: .Ar host | Ar IPv4_addr : Ar port
1.1       stevesk   765: .Sm on
                    766: .It
                    767: .Cm ListenAddress
                    768: .Sm off
                    769: .Oo
1.180     jmc       770: .Ar host | Ar IPv6_addr Oc : Ar port
1.1       stevesk   771: .Sm on
                    772: .El
                    773: .Pp
                    774: If
                    775: .Ar port
                    776: is not specified,
1.52      jmc       777: sshd will listen on the address and all prior
1.1       stevesk   778: .Cm Port
1.17      jmc       779: options specified.
                    780: The default is to listen on all local addresses.
1.15      jmc       781: Multiple
1.1       stevesk   782: .Cm ListenAddress
1.17      jmc       783: options are permitted.
                    784: Additionally, any
1.1       stevesk   785: .Cm Port
1.52      jmc       786: options must precede this option for non-port qualified addresses.
1.1       stevesk   787: .It Cm LoginGraceTime
                    788: The server disconnects after this time if the user has not
                    789: successfully logged in.
                    790: If the value is 0, there is no time limit.
1.12      stevesk   791: The default is 120 seconds.
1.1       stevesk   792: .It Cm LogLevel
                    793: Gives the verbosity level that is used when logging messages from
1.53      jmc       794: .Xr sshd 8 .
1.1       stevesk   795: The possible values are:
1.52      jmc       796: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1.15      jmc       797: The default is INFO.
                    798: DEBUG and DEBUG1 are equivalent.
                    799: DEBUG2 and DEBUG3 each specify higher levels of debugging output.
                    800: Logging with a DEBUG level violates the privacy of users and is not recommended.
1.1       stevesk   801: .It Cm MACs
                    802: Specifies the available MAC (message authentication code) algorithms.
                    803: The MAC algorithm is used in protocol version 2
                    804: for data integrity protection.
                    805: Multiple algorithms must be comma-separated.
1.152     markus    806: The algorithms that contain
                    807: .Dq -etm
                    808: calculate the MAC after encryption (encrypt-then-mac).
                    809: These are considered safer and their use recommended.
1.173     naddy     810: The supported MACs are:
                    811: .Pp
                    812: .Bl -item -compact -offset indent
                    813: .It
                    814: hmac-md5
                    815: .It
                    816: hmac-md5-96
                    817: .It
                    818: hmac-ripemd160
                    819: .It
                    820: hmac-sha1
                    821: .It
                    822: hmac-sha1-96
                    823: .It
                    824: hmac-sha2-256
                    825: .It
                    826: hmac-sha2-512
                    827: .It
                    828: umac-64@openssh.com
                    829: .It
                    830: umac-128@openssh.com
                    831: .It
                    832: hmac-md5-etm@openssh.com
                    833: .It
                    834: hmac-md5-96-etm@openssh.com
                    835: .It
                    836: hmac-ripemd160-etm@openssh.com
                    837: .It
                    838: hmac-sha1-etm@openssh.com
                    839: .It
                    840: hmac-sha1-96-etm@openssh.com
                    841: .It
                    842: hmac-sha2-256-etm@openssh.com
                    843: .It
                    844: hmac-sha2-512-etm@openssh.com
                    845: .It
                    846: umac-64-etm@openssh.com
                    847: .It
                    848: umac-128-etm@openssh.com
                    849: .El
                    850: .Pp
1.52      jmc       851: The default is:
1.77      jmc       852: .Bd -literal -offset indent
1.152     markus    853: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
                    854: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1.173     naddy     855: umac-64@openssh.com,umac-128@openssh.com,
                    856: hmac-sha2-256,hmac-sha2-512
1.77      jmc       857: .Ed
1.60      dtucker   858: .It Cm Match
1.61      jmc       859: Introduces a conditional block.
1.65      dtucker   860: If all of the criteria on the
1.60      dtucker   861: .Cm Match
1.65      dtucker   862: line are satisfied, the keywords on the following lines override those
                    863: set in the global section of the config file, until either another
1.60      dtucker   864: .Cm Match
1.65      dtucker   865: line or the end of the file.
1.172     djm       866: If a keyword appears in multiple
                    867: .Cm Match
1.177     sobrado   868: blocks that are satisfied, only the first instance of the keyword is
1.172     djm       869: applied.
1.91      djm       870: .Pp
1.61      jmc       871: The arguments to
1.60      dtucker   872: .Cm Match
1.163     dtucker   873: are one or more criteria-pattern pairs or the single token
                    874: .Cm All
                    875: which matches all criteria.
1.60      dtucker   876: The available criteria are
                    877: .Cm User ,
1.69      dtucker   878: .Cm Group ,
1.60      dtucker   879: .Cm Host ,
1.139     dtucker   880: .Cm LocalAddress ,
                    881: .Cm LocalPort ,
1.60      dtucker   882: and
                    883: .Cm Address .
1.91      djm       884: The match patterns may consist of single entries or comma-separated
                    885: lists and may use the wildcard and negation operators described in the
1.161     jmc       886: PATTERNS section of
1.92      djm       887: .Xr ssh_config 5 .
1.91      djm       888: .Pp
                    889: The patterns in an
                    890: .Cm Address
                    891: criteria may additionally contain addresses to match in CIDR
1.93      jmc       892: address/masklen format, e.g.\&
1.91      djm       893: .Dq 192.0.2.0/24
                    894: or
                    895: .Dq 3ffe:ffff::/32 .
                    896: Note that the mask length provided must be consistent with the address -
                    897: it is an error to specify a mask length that is too long for the address
1.93      jmc       898: or one with bits set in this host portion of the address.
                    899: For example,
1.91      djm       900: .Dq 192.0.2.0/33
                    901: and
1.93      jmc       902: .Dq 192.0.2.0/8
1.91      djm       903: respectively.
                    904: .Pp
1.60      dtucker   905: Only a subset of keywords may be used on the lines following a
                    906: .Cm Match
                    907: keyword.
                    908: Available keywords are
1.142     jmc       909: .Cm AcceptEnv ,
1.99      okan      910: .Cm AllowAgentForwarding ,
1.142     jmc       911: .Cm AllowGroups ,
1.62      dtucker   912: .Cm AllowTcpForwarding ,
1.141     markus    913: .Cm AllowUsers ,
1.149     djm       914: .Cm AuthenticationMethods ,
1.146     djm       915: .Cm AuthorizedKeysCommand ,
                    916: .Cm AuthorizedKeysCommandUser ,
1.147     jmc       917: .Cm AuthorizedKeysFile ,
1.123     djm       918: .Cm AuthorizedPrincipalsFile ,
1.72      dtucker   919: .Cm Banner ,
1.85      djm       920: .Cm ChrootDirectory ,
1.141     markus    921: .Cm DenyGroups ,
                    922: .Cm DenyUsers ,
1.67      dtucker   923: .Cm ForceCommand ,
1.142     jmc       924: .Cm GatewayPorts ,
1.141     markus    925: .Cm GSSAPIAuthentication ,
1.87      djm       926: .Cm HostbasedAuthentication ,
1.123     djm       927: .Cm HostbasedUsesNameFromPacketOnly ,
1.74      jmc       928: .Cm KbdInteractiveAuthentication ,
1.72      dtucker   929: .Cm KerberosAuthentication ,
1.95      dtucker   930: .Cm MaxAuthTries ,
1.94      dtucker   931: .Cm MaxSessions ,
1.72      dtucker   932: .Cm PasswordAuthentication ,
1.97      djm       933: .Cm PermitEmptyPasswords ,
1.66      dtucker   934: .Cm PermitOpen ,
1.79      dtucker   935: .Cm PermitRootLogin ,
1.164     djm       936: .Cm PermitTTY ,
1.123     djm       937: .Cm PermitTunnel ,
1.174     djm       938: .Cm PermitUserRC ,
1.107     dtucker   939: .Cm PubkeyAuthentication ,
1.159     dtucker   940: .Cm RekeyLimit ,
1.142     jmc       941: .Cm RhostsRSAAuthentication ,
1.141     markus    942: .Cm RSAAuthentication ,
1.66      dtucker   943: .Cm X11DisplayOffset ,
1.101     djm       944: .Cm X11Forwarding
1.60      dtucker   945: and
1.102     djm       946: .Cm X11UseLocalHost .
1.33      dtucker   947: .It Cm MaxAuthTries
                    948: Specifies the maximum number of authentication attempts permitted per
1.35      jmc       949: connection.
                    950: Once the number of failures reaches half this value,
                    951: additional failures are logged.
                    952: The default is 6.
1.90      djm       953: .It Cm MaxSessions
                    954: Specifies the maximum number of open sessions permitted per network connection.
                    955: The default is 10.
1.1       stevesk   956: .It Cm MaxStartups
                    957: Specifies the maximum number of concurrent unauthenticated connections to the
1.52      jmc       958: SSH daemon.
1.1       stevesk   959: Additional connections will be dropped until authentication succeeds or the
                    960: .Cm LoginGraceTime
                    961: expires for a connection.
1.156     dtucker   962: The default is 10:30:100.
1.1       stevesk   963: .Pp
                    964: Alternatively, random early drop can be enabled by specifying
                    965: the three colon separated values
                    966: .Dq start:rate:full
1.51      jmc       967: (e.g. "10:30:60").
1.53      jmc       968: .Xr sshd 8
1.1       stevesk   969: will refuse connection attempts with a probability of
                    970: .Dq rate/100
                    971: (30%)
                    972: if there are currently
                    973: .Dq start
                    974: (10)
                    975: unauthenticated connections.
                    976: The probability increases linearly and all connection attempts
                    977: are refused if the number of unauthenticated connections reaches
                    978: .Dq full
                    979: (60).
                    980: .It Cm PasswordAuthentication
                    981: Specifies whether password authentication is allowed.
                    982: The default is
                    983: .Dq yes .
                    984: .It Cm PermitEmptyPasswords
                    985: When password authentication is allowed, it specifies whether the
                    986: server allows login to accounts with empty password strings.
                    987: The default is
                    988: .Dq no .
1.62      dtucker   989: .It Cm PermitOpen
                    990: Specifies the destinations to which TCP port forwarding is permitted.
                    991: The forwarding specification must be one of the following forms:
                    992: .Pp
                    993: .Bl -item -offset indent -compact
                    994: .It
                    995: .Cm PermitOpen
                    996: .Sm off
                    997: .Ar host : port
                    998: .Sm on
                    999: .It
                   1000: .Cm PermitOpen
                   1001: .Sm off
                   1002: .Ar IPv4_addr : port
                   1003: .Sm on
                   1004: .It
                   1005: .Cm PermitOpen
                   1006: .Sm off
                   1007: .Ar \&[ IPv6_addr \&] : port
                   1008: .Sm on
                   1009: .El
                   1010: .Pp
1.68      dtucker  1011: Multiple forwards may be specified by separating them with whitespace.
1.62      dtucker  1012: An argument of
                   1013: .Dq any
                   1014: can be used to remove all restrictions and permit any forwarding requests.
1.140     dtucker  1015: An argument of
                   1016: .Dq none
                   1017: can be used to prohibit all forwarding requests.
1.63      jmc      1018: By default all port forwarding requests are permitted.
1.1       stevesk  1019: .It Cm PermitRootLogin
1.38      jmc      1020: Specifies whether root can log in using
1.1       stevesk  1021: .Xr ssh 1 .
                   1022: The argument must be
                   1023: .Dq yes ,
                   1024: .Dq without-password ,
1.52      jmc      1025: .Dq forced-commands-only ,
1.1       stevesk  1026: or
                   1027: .Dq no .
                   1028: The default is
                   1029: .Dq yes .
                   1030: .Pp
                   1031: If this option is set to
1.52      jmc      1032: .Dq without-password ,
1.1       stevesk  1033: password authentication is disabled for root.
                   1034: .Pp
                   1035: If this option is set to
1.52      jmc      1036: .Dq forced-commands-only ,
1.1       stevesk  1037: root login with public key authentication will be allowed,
                   1038: but only if the
                   1039: .Ar command
                   1040: option has been specified
                   1041: (which may be useful for taking remote backups even if root login is
1.17      jmc      1042: normally not allowed).
                   1043: All other authentication methods are disabled for root.
1.1       stevesk  1044: .Pp
                   1045: If this option is set to
1.52      jmc      1046: .Dq no ,
1.38      jmc      1047: root is not allowed to log in.
1.46      reyk     1048: .It Cm PermitTunnel
                   1049: Specifies whether
                   1050: .Xr tun 4
                   1051: device forwarding is allowed.
1.47      reyk     1052: The argument must be
                   1053: .Dq yes ,
1.58      stevesk  1054: .Dq point-to-point
                   1055: (layer 3),
                   1056: .Dq ethernet
                   1057: (layer 2), or
1.47      reyk     1058: .Dq no .
1.58      stevesk  1059: Specifying
                   1060: .Dq yes
                   1061: permits both
                   1062: .Dq point-to-point
                   1063: and
                   1064: .Dq ethernet .
1.46      reyk     1065: The default is
                   1066: .Dq no .
1.178     djm      1067: .Pp
                   1068: Independent of this setting, the permissions of the selected
                   1069: .Xr tun 4
                   1070: device must allow access to the user.
1.164     djm      1071: .It Cm PermitTTY
                   1072: Specifies whether
1.165     jmc      1073: .Xr pty 4
1.164     djm      1074: allocation is permitted.
                   1075: The default is
                   1076: .Dq yes .
1.6       markus   1077: .It Cm PermitUserEnvironment
                   1078: Specifies whether
                   1079: .Pa ~/.ssh/environment
1.9       stevesk  1080: and
1.6       markus   1081: .Cm environment=
                   1082: options in
                   1083: .Pa ~/.ssh/authorized_keys
1.9       stevesk  1084: are processed by
1.52      jmc      1085: .Xr sshd 8 .
1.6       markus   1086: The default is
                   1087: .Dq no .
1.9       stevesk  1088: Enabling environment processing may enable users to bypass access
                   1089: restrictions in some configurations using mechanisms such as
                   1090: .Ev LD_PRELOAD .
1.174     djm      1091: .It Cm PermitUserRC
                   1092: Specifies whether any
                   1093: .Pa ~/.ssh/rc
                   1094: file is executed.
                   1095: The default is
                   1096: .Dq yes .
1.1       stevesk  1097: .It Cm PidFile
1.4       stevesk  1098: Specifies the file that contains the process ID of the
1.53      jmc      1099: SSH daemon.
1.1       stevesk  1100: The default is
                   1101: .Pa /var/run/sshd.pid .
                   1102: .It Cm Port
                   1103: Specifies the port number that
1.52      jmc      1104: .Xr sshd 8
1.1       stevesk  1105: listens on.
                   1106: The default is 22.
                   1107: Multiple options of this type are permitted.
                   1108: See also
                   1109: .Cm ListenAddress .
                   1110: .It Cm PrintLastLog
                   1111: Specifies whether
1.52      jmc      1112: .Xr sshd 8
1.36      jaredy   1113: should print the date and time of the last user login when a user logs
                   1114: in interactively.
1.1       stevesk  1115: The default is
                   1116: .Dq yes .
                   1117: .It Cm PrintMotd
                   1118: Specifies whether
1.52      jmc      1119: .Xr sshd 8
1.1       stevesk  1120: should print
                   1121: .Pa /etc/motd
                   1122: when a user logs in interactively.
                   1123: (On some systems it is also printed by the shell,
                   1124: .Pa /etc/profile ,
                   1125: or equivalent.)
                   1126: The default is
                   1127: .Dq yes .
                   1128: .It Cm Protocol
                   1129: Specifies the protocol versions
1.52      jmc      1130: .Xr sshd 8
1.5       stevesk  1131: supports.
1.1       stevesk  1132: The possible values are
1.52      jmc      1133: .Sq 1
1.1       stevesk  1134: and
1.52      jmc      1135: .Sq 2 .
1.1       stevesk  1136: Multiple versions must be comma-separated.
                   1137: The default is
1.109     jmc      1138: .Sq 2 .
1.5       stevesk  1139: Note that the order of the protocol list does not indicate preference,
                   1140: because the client selects among multiple protocol versions offered
                   1141: by the server.
                   1142: Specifying
                   1143: .Dq 2,1
                   1144: is identical to
                   1145: .Dq 1,2 .
1.1       stevesk  1146: .It Cm PubkeyAuthentication
                   1147: Specifies whether public key authentication is allowed.
                   1148: The default is
                   1149: .Dq yes .
                   1150: Note that this option applies to protocol version 2 only.
1.159     dtucker  1151: .It Cm RekeyLimit
                   1152: Specifies the maximum amount of data that may be transmitted before the
                   1153: session key is renegotiated, optionally followed a maximum amount of
                   1154: time that may pass before the session key is renegotiated.
                   1155: The first argument is specified in bytes and may have a suffix of
                   1156: .Sq K ,
                   1157: .Sq M ,
                   1158: or
                   1159: .Sq G
                   1160: to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
                   1161: The default is between
                   1162: .Sq 1G
                   1163: and
                   1164: .Sq 4G ,
                   1165: depending on the cipher.
                   1166: The optional second value is specified in seconds and may use any of the
                   1167: units documented in the
                   1168: .Sx TIME FORMATS
1.160     jmc      1169: section.
1.159     dtucker  1170: The default value for
                   1171: .Cm RekeyLimit
                   1172: is
                   1173: .Dq default none ,
                   1174: which means that rekeying is performed after the cipher's default amount
                   1175: of data has been sent or received and no time based rekeying is done.
                   1176: This option applies to protocol version 2 only.
1.118     djm      1177: .It Cm RevokedKeys
1.154     djm      1178: Specifies revoked public keys.
1.118     djm      1179: Keys listed in this file will be refused for public key authentication.
                   1180: Note that if this file is not readable, then public key authentication will
                   1181: be refused for all users.
1.154     djm      1182: Keys may be specified as a text file, listing one public key per line, or as
                   1183: an OpenSSH Key Revocation List (KRL) as generated by
1.155     jmc      1184: .Xr ssh-keygen 1 .
1.161     jmc      1185: For more information on KRLs, see the KEY REVOCATION LISTS section in
1.154     djm      1186: .Xr ssh-keygen 1 .
1.1       stevesk  1187: .It Cm RhostsRSAAuthentication
                   1188: Specifies whether rhosts or /etc/hosts.equiv authentication together
                   1189: with successful RSA host authentication is allowed.
                   1190: The default is
                   1191: .Dq no .
                   1192: This option applies to protocol version 1 only.
                   1193: .It Cm RSAAuthentication
                   1194: Specifies whether pure RSA authentication is allowed.
                   1195: The default is
                   1196: .Dq yes .
                   1197: This option applies to protocol version 1 only.
                   1198: .It Cm ServerKeyBits
                   1199: Defines the number of bits in the ephemeral protocol version 1 server key.
1.96      djm      1200: The minimum value is 512, and the default is 1024.
1.175     millert  1201: .It Cm StreamLocalBindMask
                   1202: Sets the octal file creation mode mask
                   1203: .Pq umask
                   1204: used when creating a Unix-domain socket file for local or remote
                   1205: port forwarding.
                   1206: This option is only used for port forwarding to a Unix-domain socket file.
                   1207: .Pp
                   1208: The default value is 0177, which creates a Unix-domain socket file that is
                   1209: readable and writable only by the owner.
                   1210: Note that not all operating systems honor the file mode on Unix-domain
                   1211: socket files.
                   1212: .It Cm StreamLocalBindUnlink
                   1213: Specifies whether to remove an existing Unix-domain socket file for local
                   1214: or remote port forwarding before creating a new one.
                   1215: If the socket file already exists and
                   1216: .Cm StreamLocalBindUnlink
                   1217: is not enabled,
                   1218: .Nm sshd
                   1219: will be unable to forward the port to the Unix-domain socket file.
                   1220: This option is only used for port forwarding to a Unix-domain socket file.
                   1221: .Pp
                   1222: The argument must be
                   1223: .Dq yes
                   1224: or
                   1225: .Dq no .
                   1226: The default is
                   1227: .Dq no .
1.1       stevesk  1228: .It Cm StrictModes
                   1229: Specifies whether
1.52      jmc      1230: .Xr sshd 8
1.1       stevesk  1231: should check file modes and ownership of the
                   1232: user's files and home directory before accepting login.
                   1233: This is normally desirable because novices sometimes accidentally leave their
                   1234: directory or files world-writable.
                   1235: The default is
                   1236: .Dq yes .
1.112     djm      1237: Note that this does not apply to
                   1238: .Cm ChrootDirectory ,
                   1239: whose permissions and ownership are checked unconditionally.
1.1       stevesk  1240: .It Cm Subsystem
1.51      jmc      1241: Configures an external subsystem (e.g. file transfer daemon).
1.59      djm      1242: Arguments should be a subsystem name and a command (with optional arguments)
                   1243: to execute upon subsystem request.
1.80      djm      1244: .Pp
1.1       stevesk  1245: The command
                   1246: .Xr sftp-server 8
                   1247: implements the
                   1248: .Dq sftp
                   1249: file transfer subsystem.
1.80      djm      1250: .Pp
                   1251: Alternately the name
                   1252: .Dq internal-sftp
                   1253: implements an in-process
                   1254: .Dq sftp
                   1255: server.
                   1256: This may simplify configurations using
                   1257: .Cm ChrootDirectory
                   1258: to force a different filesystem root on clients.
                   1259: .Pp
1.1       stevesk  1260: By default no subsystems are defined.
                   1261: Note that this option applies to protocol version 2 only.
                   1262: .It Cm SyslogFacility
                   1263: Gives the facility code that is used when logging messages from
1.53      jmc      1264: .Xr sshd 8 .
1.1       stevesk  1265: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
                   1266: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
                   1267: The default is AUTH.
1.27      markus   1268: .It Cm TCPKeepAlive
                   1269: Specifies whether the system should send TCP keepalive messages to the
                   1270: other side.
                   1271: If they are sent, death of the connection or crash of one
                   1272: of the machines will be properly noticed.
                   1273: However, this means that
                   1274: connections will die if the route is down temporarily, and some people
                   1275: find it annoying.
                   1276: On the other hand, if TCP keepalives are not sent,
                   1277: sessions may hang indefinitely on the server, leaving
                   1278: .Dq ghost
                   1279: users and consuming server resources.
                   1280: .Pp
                   1281: The default is
                   1282: .Dq yes
                   1283: (to send TCP keepalive messages), and the server will notice
                   1284: if the network goes down or the client host crashes.
                   1285: This avoids infinitely hanging sessions.
                   1286: .Pp
                   1287: To disable TCP keepalive messages, the value should be set to
                   1288: .Dq no .
1.118     djm      1289: .It Cm TrustedUserCAKeys
                   1290: Specifies a file containing public keys of certificate authorities that are
1.120     djm      1291: trusted to sign user certificates for authentication.
1.119     jmc      1292: Keys are listed one per line; empty lines and comments starting with
1.118     djm      1293: .Ql #
                   1294: are allowed.
                   1295: If a certificate is presented for authentication and has its signing CA key
                   1296: listed in this file, then it may be used for authentication for any user
                   1297: listed in the certificate's principals list.
                   1298: Note that certificates that lack a list of principals will not be permitted
                   1299: for authentication using
                   1300: .Cm TrustedUserCAKeys .
1.161     jmc      1301: For more details on certificates, see the CERTIFICATES section in
1.118     djm      1302: .Xr ssh-keygen 1 .
1.18      markus   1303: .It Cm UseDNS
                   1304: Specifies whether
1.52      jmc      1305: .Xr sshd 8
1.40      jmc      1306: should look up the remote host name and check that
1.18      markus   1307: the resolved host name for the remote IP address maps back to the
                   1308: very same IP address.
                   1309: The default is
                   1310: .Dq yes .
1.1       stevesk  1311: .It Cm UseLogin
                   1312: Specifies whether
                   1313: .Xr login 1
                   1314: is used for interactive login sessions.
                   1315: The default is
                   1316: .Dq no .
                   1317: Note that
                   1318: .Xr login 1
                   1319: is never used for remote command execution.
                   1320: Note also, that if this is enabled,
                   1321: .Cm X11Forwarding
                   1322: will be disabled because
                   1323: .Xr login 1
                   1324: does not know how to handle
                   1325: .Xr xauth 1
1.15      jmc      1326: cookies.
                   1327: If
1.1       stevesk  1328: .Cm UsePrivilegeSeparation
                   1329: is specified, it will be disabled after authentication.
                   1330: .It Cm UsePrivilegeSeparation
                   1331: Specifies whether
1.52      jmc      1332: .Xr sshd 8
1.2       stevesk  1333: separates privileges by creating an unprivileged child process
1.15      jmc      1334: to deal with incoming network traffic.
                   1335: After successful authentication, another process will be created that has
                   1336: the privilege of the authenticated user.
                   1337: The goal of privilege separation is to prevent privilege
1.1       stevesk  1338: escalation by containing any corruption within the unprivileged processes.
                   1339: The default is
                   1340: .Dq yes .
1.134     djm      1341: If
                   1342: .Cm UsePrivilegeSeparation
                   1343: is set to
                   1344: .Dq sandbox
                   1345: then the pre-authentication unprivileged process is subject to additional
                   1346: restrictions.
1.137     djm      1347: .It Cm VersionAddendum
                   1348: Optionally specifies additional text to append to the SSH protocol banner
                   1349: sent by the server upon connection.
                   1350: The default is
                   1351: .Dq none .
1.1       stevesk  1352: .It Cm X11DisplayOffset
                   1353: Specifies the first display number available for
1.52      jmc      1354: .Xr sshd 8 Ns 's
1.1       stevesk  1355: X11 forwarding.
1.52      jmc      1356: This prevents sshd from interfering with real X11 servers.
1.1       stevesk  1357: The default is 10.
                   1358: .It Cm X11Forwarding
                   1359: Specifies whether X11 forwarding is permitted.
1.13      stevesk  1360: The argument must be
                   1361: .Dq yes
                   1362: or
                   1363: .Dq no .
1.1       stevesk  1364: The default is
                   1365: .Dq no .
1.13      stevesk  1366: .Pp
                   1367: When X11 forwarding is enabled, there may be additional exposure to
                   1368: the server and to client displays if the
1.52      jmc      1369: .Xr sshd 8
1.13      stevesk  1370: proxy display is configured to listen on the wildcard address (see
                   1371: .Cm X11UseLocalhost
1.52      jmc      1372: below), though this is not the default.
1.13      stevesk  1373: Additionally, the authentication spoofing and authentication data
                   1374: verification and substitution occur on the client side.
                   1375: The security risk of using X11 forwarding is that the client's X11
1.52      jmc      1376: display server may be exposed to attack when the SSH client requests
1.13      stevesk  1377: forwarding (see the warnings for
                   1378: .Cm ForwardX11
                   1379: in
1.19      jmc      1380: .Xr ssh_config 5 ) .
1.13      stevesk  1381: A system administrator may have a stance in which they want to
                   1382: protect clients that may expose themselves to attack by unwittingly
                   1383: requesting X11 forwarding, which can warrant a
                   1384: .Dq no
                   1385: setting.
                   1386: .Pp
                   1387: Note that disabling X11 forwarding does not prevent users from
                   1388: forwarding X11 traffic, as users can always install their own forwarders.
1.1       stevesk  1389: X11 forwarding is automatically disabled if
                   1390: .Cm UseLogin
                   1391: is enabled.
                   1392: .It Cm X11UseLocalhost
                   1393: Specifies whether
1.52      jmc      1394: .Xr sshd 8
1.1       stevesk  1395: should bind the X11 forwarding server to the loopback address or to
1.15      jmc      1396: the wildcard address.
                   1397: By default,
1.52      jmc      1398: sshd binds the forwarding server to the loopback address and sets the
1.1       stevesk  1399: hostname part of the
                   1400: .Ev DISPLAY
                   1401: environment variable to
                   1402: .Dq localhost .
1.8       stevesk  1403: This prevents remote hosts from connecting to the proxy display.
1.1       stevesk  1404: However, some older X11 clients may not function with this
                   1405: configuration.
                   1406: .Cm X11UseLocalhost
                   1407: may be set to
                   1408: .Dq no
                   1409: to specify that the forwarding server should be bound to the wildcard
                   1410: address.
                   1411: The argument must be
                   1412: .Dq yes
                   1413: or
                   1414: .Dq no .
                   1415: The default is
                   1416: .Dq yes .
                   1417: .It Cm XAuthLocation
1.11      stevesk  1418: Specifies the full pathname of the
1.1       stevesk  1419: .Xr xauth 1
                   1420: program.
                   1421: The default is
                   1422: .Pa /usr/X11R6/bin/xauth .
                   1423: .El
1.55      jmc      1424: .Sh TIME FORMATS
1.53      jmc      1425: .Xr sshd 8
1.1       stevesk  1426: command-line arguments and configuration file options that specify time
                   1427: may be expressed using a sequence of the form:
                   1428: .Sm off
1.7       stevesk  1429: .Ar time Op Ar qualifier ,
1.1       stevesk  1430: .Sm on
                   1431: where
                   1432: .Ar time
                   1433: is a positive integer value and
                   1434: .Ar qualifier
                   1435: is one of the following:
                   1436: .Pp
                   1437: .Bl -tag -width Ds -compact -offset indent
1.64      jmc      1438: .It Aq Cm none
1.1       stevesk  1439: seconds
                   1440: .It Cm s | Cm S
                   1441: seconds
                   1442: .It Cm m | Cm M
                   1443: minutes
                   1444: .It Cm h | Cm H
                   1445: hours
                   1446: .It Cm d | Cm D
                   1447: days
                   1448: .It Cm w | Cm W
                   1449: weeks
                   1450: .El
                   1451: .Pp
                   1452: Each member of the sequence is added together to calculate
                   1453: the total time value.
                   1454: .Pp
                   1455: Time format examples:
                   1456: .Pp
                   1457: .Bl -tag -width Ds -compact -offset indent
                   1458: .It 600
                   1459: 600 seconds (10 minutes)
                   1460: .It 10m
                   1461: 10 minutes
                   1462: .It 1h30m
                   1463: 1 hour 30 minutes (90 minutes)
                   1464: .El
                   1465: .Sh FILES
                   1466: .Bl -tag -width Ds
                   1467: .It Pa /etc/ssh/sshd_config
                   1468: Contains configuration data for
1.53      jmc      1469: .Xr sshd 8 .
1.1       stevesk  1470: This file should be writable by root only, but it is recommended
                   1471: (though not necessary) that it be world-readable.
                   1472: .El
1.19      jmc      1473: .Sh SEE ALSO
                   1474: .Xr sshd 8
1.1       stevesk  1475: .Sh AUTHORS
                   1476: OpenSSH is a derivative of the original and free
                   1477: ssh 1.2.12 release by Tatu Ylonen.
                   1478: Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
                   1479: Theo de Raadt and Dug Song
                   1480: removed many bugs, re-added newer features and
                   1481: created OpenSSH.
                   1482: Markus Friedl contributed the support for SSH
                   1483: protocol versions 1.5 and 2.0.
                   1484: Niels Provos and Markus Friedl contributed support
                   1485: for privilege separation.