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

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