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

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