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

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