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

1.1       stevesk     1: .\"  -*- nroff -*-
                      2: .\"
                      3: .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
                      4: .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
                      5: .\"                    All rights reserved
                      6: .\"
                      7: .\" As far as I am concerned, the code I have written for this software
                      8: .\" can be used freely for any purpose.  Any derived versions of this
                      9: .\" software must be clearly marked as such, and if the derived work is
                     10: .\" incompatible with the protocol description in the RFC file, it must be
                     11: .\" called by a name other than "ssh" or "Secure Shell".
                     12: .\"
                     13: .\" Copyright (c) 1999,2000 Markus Friedl.  All rights reserved.
                     14: .\" Copyright (c) 1999 Aaron Campbell.  All rights reserved.
                     15: .\" Copyright (c) 1999 Theo de Raadt.  All rights reserved.
                     16: .\"
                     17: .\" Redistribution and use in source and binary forms, with or without
                     18: .\" modification, are permitted provided that the following conditions
                     19: .\" are met:
                     20: .\" 1. Redistributions of source code must retain the above copyright
                     21: .\"    notice, this list of conditions and the following disclaimer.
                     22: .\" 2. Redistributions in binary form must reproduce the above copyright
                     23: .\"    notice, this list of conditions and the following disclaimer in the
                     24: .\"    documentation and/or other materials provided with the distribution.
                     25: .\"
                     26: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     27: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     28: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     29: .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
                     30: .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     31: .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     32: .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     33: .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     34: .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
                     35: .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     36: .\"
1.55    ! jmc        37: .\" $OpenBSD: sshd_config.5,v 1.54 2006/02/25 12:28:34 jmc Exp $
1.1       stevesk    38: .Dd September 25, 1999
                     39: .Dt SSHD_CONFIG 5
                     40: .Os
                     41: .Sh NAME
                     42: .Nm sshd_config
                     43: .Nd OpenSSH SSH daemon configuration file
                     44: .Sh SYNOPSIS
                     45: .Bl -tag -width Ds -compact
                     46: .It Pa /etc/ssh/sshd_config
                     47: .El
                     48: .Sh DESCRIPTION
1.53      jmc        49: .Xr sshd 8
1.1       stevesk    50: reads configuration data from
                     51: .Pa /etc/ssh/sshd_config
                     52: (or the file specified with
                     53: .Fl f
                     54: on the command line).
                     55: The file contains keyword-argument pairs, one per line.
                     56: Lines starting with
                     57: .Ql #
                     58: and empty lines are interpreted as comments.
                     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.1       stevesk    97: .It Cm AllowGroups
                     98: This keyword can be followed by a list of group name patterns, separated
                     99: by spaces.
                    100: If specified, login is allowed only for users whose primary
                    101: group or supplementary group list matches one of the patterns.
                    102: Only group names are valid; a numerical group ID is not recognized.
                    103: By default, login is allowed for all groups.
1.54      jmc       104: The allow/deny directives are processed in the following order:
                    105: .Cm DenyUsers ,
                    106: .Cm AllowUsers ,
                    107: .Cm DenyGroups ,
                    108: and finally
                    109: .Cm AllowGroups .
1.49      jmc       110: .Pp
                    111: See
                    112: .Sx PATTERNS
                    113: in
                    114: .Xr ssh_config 5
                    115: for more information on patterns.
1.1       stevesk   116: .It Cm AllowTcpForwarding
                    117: Specifies whether TCP forwarding is permitted.
                    118: The default is
                    119: .Dq yes .
                    120: Note that disabling TCP forwarding does not improve security unless
                    121: users are also denied shell access, as they can always install their
                    122: own forwarders.
                    123: .It Cm AllowUsers
                    124: This keyword can be followed by a list of user name patterns, separated
                    125: by spaces.
1.14      jmc       126: If specified, login is allowed only for user names that
1.1       stevesk   127: match one of the patterns.
                    128: Only user names are valid; a numerical user ID is not recognized.
                    129: By default, login is allowed for all users.
                    130: If the pattern takes the form USER@HOST then USER and HOST
                    131: are separately checked, restricting logins to particular
                    132: users from particular hosts.
1.54      jmc       133: The allow/deny directives are processed in the following order:
                    134: .Cm DenyUsers ,
                    135: .Cm AllowUsers ,
                    136: .Cm DenyGroups ,
                    137: and finally
                    138: .Cm AllowGroups .
1.49      jmc       139: .Pp
                    140: See
                    141: .Sx PATTERNS
                    142: in
                    143: .Xr ssh_config 5
                    144: for more information on patterns.
1.1       stevesk   145: .It Cm AuthorizedKeysFile
                    146: Specifies the file that contains the public keys that can be used
                    147: for user authentication.
                    148: .Cm AuthorizedKeysFile
                    149: may contain tokens of the form %T which are substituted during connection
1.52      jmc       150: setup.
1.17      jmc       151: The following tokens are defined: %% is replaced by a literal '%',
1.52      jmc       152: %h is replaced by the home directory of the user being authenticated, and
1.1       stevesk   153: %u is replaced by the username of that user.
                    154: After expansion,
                    155: .Cm AuthorizedKeysFile
                    156: is taken to be an absolute path or one relative to the user's home
                    157: directory.
                    158: The default is
                    159: .Dq .ssh/authorized_keys .
                    160: .It Cm Banner
                    161: In some jurisdictions, sending a warning message before authentication
                    162: may be relevant for getting legal protection.
                    163: The contents of the specified file are sent to the remote user before
                    164: authentication is allowed.
                    165: This option is only available for protocol version 2.
                    166: By default, no banner is displayed.
                    167: .It Cm ChallengeResponseAuthentication
1.50      jmc       168: Specifies whether challenge-response authentication is allowed.
1.1       stevesk   169: All authentication styles from
                    170: .Xr login.conf 5
                    171: are supported.
                    172: The default is
                    173: .Dq yes .
                    174: .It Cm Ciphers
                    175: Specifies the ciphers allowed for protocol version 2.
                    176: Multiple ciphers must be comma-separated.
1.34      dtucker   177: The supported ciphers are
                    178: .Dq 3des-cbc ,
                    179: .Dq aes128-cbc ,
                    180: .Dq aes192-cbc ,
                    181: .Dq aes256-cbc ,
                    182: .Dq aes128-ctr ,
                    183: .Dq aes192-ctr ,
                    184: .Dq aes256-ctr ,
1.43      djm       185: .Dq arcfour128 ,
                    186: .Dq arcfour256 ,
1.34      dtucker   187: .Dq arcfour ,
                    188: .Dq blowfish-cbc ,
                    189: and
                    190: .Dq cast128-cbc .
1.52      jmc       191: The default is:
                    192: .Bd -literal -offset 3n
                    193: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
                    194: arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
                    195: aes192-ctr,aes256-ctr
1.1       stevesk   196: .Ed
                    197: .It Cm ClientAliveCountMax
1.48      jmc       198: Sets the number of client alive messages (see below) which may be
1.1       stevesk   199: sent without
1.52      jmc       200: .Xr sshd 8
1.17      jmc       201: receiving any messages back from the client.
                    202: If this threshold is reached while client alive messages are being sent,
1.52      jmc       203: sshd will disconnect the client, terminating the session.
1.17      jmc       204: It is important to note that the use of client alive messages is very
                    205: different from
1.27      markus    206: .Cm TCPKeepAlive
1.17      jmc       207: (below).
                    208: The client alive messages are sent through the encrypted channel
                    209: and therefore will not be spoofable.
                    210: The TCP keepalive option enabled by
1.27      markus    211: .Cm TCPKeepAlive
1.17      jmc       212: is spoofable.
                    213: The client alive mechanism is valuable when the client or
1.1       stevesk   214: server depend on knowing when a connection has become inactive.
                    215: .Pp
1.17      jmc       216: The default value is 3.
                    217: If
1.1       stevesk   218: .Cm ClientAliveInterval
1.48      jmc       219: (see below) is set to 15, and
1.1       stevesk   220: .Cm ClientAliveCountMax
1.52      jmc       221: is left at the default, unresponsive SSH clients
1.1       stevesk   222: will be disconnected after approximately 45 seconds.
1.42      djm       223: .It Cm ClientAliveInterval
                    224: Sets a timeout interval in seconds after which if no data has been received
                    225: from the client,
1.52      jmc       226: .Xr sshd 8
1.42      djm       227: will send a message through the encrypted
                    228: channel to request a response from the client.
                    229: The default
                    230: is 0, indicating that these messages will not be sent to the client.
                    231: This option applies to protocol version 2 only.
1.3       markus    232: .It Cm Compression
1.44      markus    233: Specifies whether compression is allowed, or delayed until
                    234: the user has authenticated successfully.
1.3       markus    235: The argument must be
1.44      markus    236: .Dq yes ,
                    237: .Dq delayed ,
1.3       markus    238: or
                    239: .Dq no .
                    240: The default is
1.44      markus    241: .Dq delayed .
1.1       stevesk   242: .It Cm DenyGroups
                    243: This keyword can be followed by a list of group name patterns, separated
                    244: by spaces.
                    245: Login is disallowed for users whose primary group or supplementary
                    246: group list matches one of the patterns.
                    247: Only group names are valid; a numerical group ID is not recognized.
                    248: By default, login is allowed for all groups.
1.54      jmc       249: The allow/deny directives are processed in the following order:
                    250: .Cm DenyUsers ,
                    251: .Cm AllowUsers ,
                    252: .Cm DenyGroups ,
                    253: and finally
                    254: .Cm AllowGroups .
1.49      jmc       255: .Pp
                    256: See
                    257: .Sx PATTERNS
                    258: in
                    259: .Xr ssh_config 5
                    260: for more information on patterns.
1.1       stevesk   261: .It Cm DenyUsers
                    262: This keyword can be followed by a list of user name patterns, separated
                    263: by spaces.
                    264: Login is disallowed for user names that match one of the patterns.
                    265: Only user names are valid; a numerical user ID is not recognized.
                    266: By default, login is allowed for all users.
                    267: If the pattern takes the form USER@HOST then USER and HOST
                    268: are separately checked, restricting logins to particular
                    269: users from particular hosts.
1.54      jmc       270: The allow/deny directives are processed in the following order:
                    271: .Cm DenyUsers ,
                    272: .Cm AllowUsers ,
                    273: .Cm DenyGroups ,
                    274: and finally
                    275: .Cm AllowGroups .
1.49      jmc       276: .Pp
                    277: See
                    278: .Sx PATTERNS
                    279: in
                    280: .Xr ssh_config 5
                    281: for more information on patterns.
1.1       stevesk   282: .It Cm GatewayPorts
                    283: Specifies whether remote hosts are allowed to connect to ports
                    284: forwarded for the client.
                    285: By default,
1.52      jmc       286: .Xr sshd 8
1.15      jmc       287: binds remote port forwardings to the loopback address.
                    288: This prevents other remote hosts from connecting to forwarded ports.
1.1       stevesk   289: .Cm GatewayPorts
1.52      jmc       290: can be used to specify that sshd
1.39      djm       291: should allow remote port forwardings to bind to non-loopback addresses, thus
                    292: allowing other hosts to connect.
                    293: The argument may be
                    294: .Dq no
                    295: to force remote port forwardings to be available to the local host only,
1.1       stevesk   296: .Dq yes
1.39      djm       297: to force remote port forwardings to bind to the wildcard address, or
                    298: .Dq clientspecified
                    299: to allow the client to select the address to which the forwarding is bound.
1.1       stevesk   300: The default is
                    301: .Dq no .
1.23      markus    302: .It Cm GSSAPIAuthentication
1.25      markus    303: Specifies whether user authentication based on GSSAPI is allowed.
1.26      djm       304: The default is
1.23      markus    305: .Dq no .
                    306: Note that this option applies to protocol version 2 only.
                    307: .It Cm GSSAPICleanupCredentials
                    308: Specifies whether to automatically destroy the user's credentials cache
                    309: on logout.
                    310: The default is
                    311: .Dq yes .
                    312: Note that this option applies to protocol version 2 only.
1.1       stevesk   313: .It Cm HostbasedAuthentication
                    314: Specifies whether rhosts or /etc/hosts.equiv authentication together
                    315: with successful public key client host authentication is allowed
1.50      jmc       316: (host-based authentication).
1.1       stevesk   317: This option is similar to
                    318: .Cm RhostsRSAAuthentication
                    319: and applies to protocol version 2 only.
                    320: The default is
                    321: .Dq no .
                    322: .It Cm HostKey
                    323: Specifies a file containing a private host key
                    324: used by SSH.
                    325: The default is
                    326: .Pa /etc/ssh/ssh_host_key
                    327: for protocol version 1, and
                    328: .Pa /etc/ssh/ssh_host_rsa_key
                    329: and
                    330: .Pa /etc/ssh/ssh_host_dsa_key
                    331: for protocol version 2.
                    332: Note that
1.52      jmc       333: .Xr sshd 8
1.1       stevesk   334: will refuse to use a file if it is group/world-accessible.
                    335: It is possible to have multiple host key files.
                    336: .Dq rsa1
                    337: keys are used for version 1 and
                    338: .Dq dsa
                    339: or
                    340: .Dq rsa
                    341: are used for version 2 of the SSH protocol.
                    342: .It Cm IgnoreRhosts
                    343: Specifies that
                    344: .Pa .rhosts
                    345: and
                    346: .Pa .shosts
                    347: files will not be used in
                    348: .Cm RhostsRSAAuthentication
                    349: or
                    350: .Cm HostbasedAuthentication .
                    351: .Pp
                    352: .Pa /etc/hosts.equiv
                    353: and
                    354: .Pa /etc/shosts.equiv
                    355: are still used.
                    356: The default is
                    357: .Dq yes .
                    358: .It Cm IgnoreUserKnownHosts
                    359: Specifies whether
1.52      jmc       360: .Xr sshd 8
1.1       stevesk   361: should ignore the user's
1.41      djm       362: .Pa ~/.ssh/known_hosts
1.1       stevesk   363: during
                    364: .Cm RhostsRSAAuthentication
                    365: or
                    366: .Cm HostbasedAuthentication .
                    367: The default is
                    368: .Dq no .
                    369: .It Cm KerberosAuthentication
1.24      markus    370: Specifies whether the password provided by the user for
1.1       stevesk   371: .Cm PasswordAuthentication
1.24      markus    372: will be validated through the Kerberos KDC.
1.1       stevesk   373: To use this option, the server needs a
                    374: Kerberos servtab which allows the verification of the KDC's identity.
1.52      jmc       375: The default is
1.29      dtucker   376: .Dq no .
                    377: .It Cm KerberosGetAFSToken
1.45      djm       378: If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
1.29      dtucker   379: an AFS token before accessing the user's home directory.
1.52      jmc       380: The default is
1.1       stevesk   381: .Dq no .
                    382: .It Cm KerberosOrLocalPasswd
1.52      jmc       383: If password authentication through Kerberos fails then
1.1       stevesk   384: the password will be validated via any additional local mechanism
                    385: such as
                    386: .Pa /etc/passwd .
1.52      jmc       387: The default is
1.1       stevesk   388: .Dq yes .
                    389: .It Cm KerberosTicketCleanup
                    390: Specifies whether to automatically destroy the user's ticket cache
                    391: file on logout.
1.52      jmc       392: The default is
1.1       stevesk   393: .Dq yes .
                    394: .It Cm KeyRegenerationInterval
                    395: In protocol version 1, the ephemeral server key is automatically regenerated
                    396: after this many seconds (if it has been used).
                    397: The purpose of regeneration is to prevent
                    398: decrypting captured sessions by later breaking into the machine and
                    399: stealing the keys.
                    400: The key is never stored anywhere.
                    401: If the value is 0, the key is never regenerated.
                    402: The default is 3600 (seconds).
                    403: .It Cm ListenAddress
                    404: Specifies the local addresses
1.52      jmc       405: .Xr sshd 8
1.1       stevesk   406: should listen on.
                    407: The following forms may be used:
                    408: .Pp
                    409: .Bl -item -offset indent -compact
                    410: .It
                    411: .Cm ListenAddress
                    412: .Sm off
                    413: .Ar host No | Ar IPv4_addr No | Ar IPv6_addr
                    414: .Sm on
                    415: .It
                    416: .Cm ListenAddress
                    417: .Sm off
                    418: .Ar host No | Ar IPv4_addr No : Ar port
                    419: .Sm on
                    420: .It
                    421: .Cm ListenAddress
                    422: .Sm off
                    423: .Oo
                    424: .Ar host No | Ar IPv6_addr Oc : Ar port
                    425: .Sm on
                    426: .El
                    427: .Pp
                    428: If
                    429: .Ar port
                    430: is not specified,
1.52      jmc       431: sshd will listen on the address and all prior
1.1       stevesk   432: .Cm Port
1.17      jmc       433: options specified.
                    434: The default is to listen on all local addresses.
1.15      jmc       435: Multiple
1.1       stevesk   436: .Cm ListenAddress
1.17      jmc       437: options are permitted.
                    438: Additionally, any
1.1       stevesk   439: .Cm Port
1.52      jmc       440: options must precede this option for non-port qualified addresses.
1.1       stevesk   441: .It Cm LoginGraceTime
                    442: The server disconnects after this time if the user has not
                    443: successfully logged in.
                    444: If the value is 0, there is no time limit.
1.12      stevesk   445: The default is 120 seconds.
1.1       stevesk   446: .It Cm LogLevel
                    447: Gives the verbosity level that is used when logging messages from
1.53      jmc       448: .Xr sshd 8 .
1.1       stevesk   449: The possible values are:
1.52      jmc       450: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1.15      jmc       451: The default is INFO.
                    452: DEBUG and DEBUG1 are equivalent.
                    453: DEBUG2 and DEBUG3 each specify higher levels of debugging output.
                    454: Logging with a DEBUG level violates the privacy of users and is not recommended.
1.1       stevesk   455: .It Cm MACs
                    456: Specifies the available MAC (message authentication code) algorithms.
                    457: The MAC algorithm is used in protocol version 2
                    458: for data integrity protection.
                    459: Multiple algorithms must be comma-separated.
1.52      jmc       460: The default is:
1.1       stevesk   461: .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 .
1.33      dtucker   462: .It Cm MaxAuthTries
                    463: Specifies the maximum number of authentication attempts permitted per
1.35      jmc       464: connection.
                    465: Once the number of failures reaches half this value,
                    466: additional failures are logged.
                    467: The default is 6.
1.1       stevesk   468: .It Cm MaxStartups
                    469: Specifies the maximum number of concurrent unauthenticated connections to the
1.52      jmc       470: SSH daemon.
1.1       stevesk   471: Additional connections will be dropped until authentication succeeds or the
                    472: .Cm LoginGraceTime
                    473: expires for a connection.
                    474: The default is 10.
                    475: .Pp
                    476: Alternatively, random early drop can be enabled by specifying
                    477: the three colon separated values
                    478: .Dq start:rate:full
1.51      jmc       479: (e.g. "10:30:60").
1.53      jmc       480: .Xr sshd 8
1.1       stevesk   481: will refuse connection attempts with a probability of
                    482: .Dq rate/100
                    483: (30%)
                    484: if there are currently
                    485: .Dq start
                    486: (10)
                    487: unauthenticated connections.
                    488: The probability increases linearly and all connection attempts
                    489: are refused if the number of unauthenticated connections reaches
                    490: .Dq full
                    491: (60).
                    492: .It Cm PasswordAuthentication
                    493: Specifies whether password authentication is allowed.
                    494: The default is
                    495: .Dq yes .
                    496: .It Cm PermitEmptyPasswords
                    497: When password authentication is allowed, it specifies whether the
                    498: server allows login to accounts with empty password strings.
                    499: The default is
                    500: .Dq no .
                    501: .It Cm PermitRootLogin
1.38      jmc       502: Specifies whether root can log in using
1.1       stevesk   503: .Xr ssh 1 .
                    504: The argument must be
                    505: .Dq yes ,
                    506: .Dq without-password ,
1.52      jmc       507: .Dq forced-commands-only ,
1.1       stevesk   508: or
                    509: .Dq no .
                    510: The default is
                    511: .Dq yes .
                    512: .Pp
                    513: If this option is set to
1.52      jmc       514: .Dq without-password ,
1.1       stevesk   515: password authentication is disabled for root.
                    516: .Pp
                    517: If this option is set to
1.52      jmc       518: .Dq forced-commands-only ,
1.1       stevesk   519: root login with public key authentication will be allowed,
                    520: but only if the
                    521: .Ar command
                    522: option has been specified
                    523: (which may be useful for taking remote backups even if root login is
1.17      jmc       524: normally not allowed).
                    525: All other authentication methods are disabled for root.
1.1       stevesk   526: .Pp
                    527: If this option is set to
1.52      jmc       528: .Dq no ,
1.38      jmc       529: root is not allowed to log in.
1.46      reyk      530: .It Cm PermitTunnel
                    531: Specifies whether
                    532: .Xr tun 4
                    533: device forwarding is allowed.
1.47      reyk      534: The argument must be
                    535: .Dq yes ,
                    536: .Dq point-to-point ,
1.52      jmc       537: .Dq ethernet ,
1.47      reyk      538: or
                    539: .Dq no .
1.46      reyk      540: The default is
                    541: .Dq no .
1.6       markus    542: .It Cm PermitUserEnvironment
                    543: Specifies whether
                    544: .Pa ~/.ssh/environment
1.9       stevesk   545: and
1.6       markus    546: .Cm environment=
                    547: options in
                    548: .Pa ~/.ssh/authorized_keys
1.9       stevesk   549: are processed by
1.52      jmc       550: .Xr sshd 8 .
1.6       markus    551: The default is
                    552: .Dq no .
1.9       stevesk   553: Enabling environment processing may enable users to bypass access
                    554: restrictions in some configurations using mechanisms such as
                    555: .Ev LD_PRELOAD .
1.1       stevesk   556: .It Cm PidFile
1.4       stevesk   557: Specifies the file that contains the process ID of the
1.53      jmc       558: SSH daemon.
1.1       stevesk   559: The default is
                    560: .Pa /var/run/sshd.pid .
                    561: .It Cm Port
                    562: Specifies the port number that
1.52      jmc       563: .Xr sshd 8
1.1       stevesk   564: listens on.
                    565: The default is 22.
                    566: Multiple options of this type are permitted.
                    567: See also
                    568: .Cm ListenAddress .
                    569: .It Cm PrintLastLog
                    570: Specifies whether
1.52      jmc       571: .Xr sshd 8
1.36      jaredy    572: should print the date and time of the last user login when a user logs
                    573: in interactively.
1.1       stevesk   574: The default is
                    575: .Dq yes .
                    576: .It Cm PrintMotd
                    577: Specifies whether
1.52      jmc       578: .Xr sshd 8
1.1       stevesk   579: should print
                    580: .Pa /etc/motd
                    581: when a user logs in interactively.
                    582: (On some systems it is also printed by the shell,
                    583: .Pa /etc/profile ,
                    584: or equivalent.)
                    585: The default is
                    586: .Dq yes .
                    587: .It Cm Protocol
                    588: Specifies the protocol versions
1.52      jmc       589: .Xr sshd 8
1.5       stevesk   590: supports.
1.1       stevesk   591: The possible values are
1.52      jmc       592: .Sq 1
1.1       stevesk   593: and
1.52      jmc       594: .Sq 2 .
1.1       stevesk   595: Multiple versions must be comma-separated.
                    596: The default is
                    597: .Dq 2,1 .
1.5       stevesk   598: Note that the order of the protocol list does not indicate preference,
                    599: because the client selects among multiple protocol versions offered
                    600: by the server.
                    601: Specifying
                    602: .Dq 2,1
                    603: is identical to
                    604: .Dq 1,2 .
1.1       stevesk   605: .It Cm PubkeyAuthentication
                    606: Specifies whether public key authentication is allowed.
                    607: The default is
                    608: .Dq yes .
                    609: Note that this option applies to protocol version 2 only.
                    610: .It Cm RhostsRSAAuthentication
                    611: Specifies whether rhosts or /etc/hosts.equiv authentication together
                    612: with successful RSA host authentication is allowed.
                    613: The default is
                    614: .Dq no .
                    615: This option applies to protocol version 1 only.
                    616: .It Cm RSAAuthentication
                    617: Specifies whether pure RSA authentication is allowed.
                    618: The default is
                    619: .Dq yes .
                    620: This option applies to protocol version 1 only.
                    621: .It Cm ServerKeyBits
                    622: Defines the number of bits in the ephemeral protocol version 1 server key.
                    623: The minimum value is 512, and the default is 768.
                    624: .It Cm StrictModes
                    625: Specifies whether
1.52      jmc       626: .Xr sshd 8
1.1       stevesk   627: should check file modes and ownership of the
                    628: user's files and home directory before accepting login.
                    629: This is normally desirable because novices sometimes accidentally leave their
                    630: directory or files world-writable.
                    631: The default is
                    632: .Dq yes .
                    633: .It Cm Subsystem
1.51      jmc       634: Configures an external subsystem (e.g. file transfer daemon).
1.1       stevesk   635: Arguments should be a subsystem name and a command to execute upon subsystem
                    636: request.
                    637: The command
                    638: .Xr sftp-server 8
                    639: implements the
                    640: .Dq sftp
                    641: file transfer subsystem.
                    642: By default no subsystems are defined.
                    643: Note that this option applies to protocol version 2 only.
                    644: .It Cm SyslogFacility
                    645: Gives the facility code that is used when logging messages from
1.53      jmc       646: .Xr sshd 8 .
1.1       stevesk   647: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
                    648: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
                    649: The default is AUTH.
1.27      markus    650: .It Cm TCPKeepAlive
                    651: Specifies whether the system should send TCP keepalive messages to the
                    652: other side.
                    653: If they are sent, death of the connection or crash of one
                    654: of the machines will be properly noticed.
                    655: However, this means that
                    656: connections will die if the route is down temporarily, and some people
                    657: find it annoying.
                    658: On the other hand, if TCP keepalives are not sent,
                    659: sessions may hang indefinitely on the server, leaving
                    660: .Dq ghost
                    661: users and consuming server resources.
                    662: .Pp
                    663: The default is
                    664: .Dq yes
                    665: (to send TCP keepalive messages), and the server will notice
                    666: if the network goes down or the client host crashes.
                    667: This avoids infinitely hanging sessions.
                    668: .Pp
                    669: To disable TCP keepalive messages, the value should be set to
                    670: .Dq no .
1.18      markus    671: .It Cm UseDNS
                    672: Specifies whether
1.52      jmc       673: .Xr sshd 8
1.40      jmc       674: should look up the remote host name and check that
1.18      markus    675: the resolved host name for the remote IP address maps back to the
                    676: very same IP address.
                    677: The default is
                    678: .Dq yes .
1.1       stevesk   679: .It Cm UseLogin
                    680: Specifies whether
                    681: .Xr login 1
                    682: is used for interactive login sessions.
                    683: The default is
                    684: .Dq no .
                    685: Note that
                    686: .Xr login 1
                    687: is never used for remote command execution.
                    688: Note also, that if this is enabled,
                    689: .Cm X11Forwarding
                    690: will be disabled because
                    691: .Xr login 1
                    692: does not know how to handle
                    693: .Xr xauth 1
1.15      jmc       694: cookies.
                    695: If
1.1       stevesk   696: .Cm UsePrivilegeSeparation
                    697: is specified, it will be disabled after authentication.
                    698: .It Cm UsePrivilegeSeparation
                    699: Specifies whether
1.52      jmc       700: .Xr sshd 8
1.2       stevesk   701: separates privileges by creating an unprivileged child process
1.15      jmc       702: to deal with incoming network traffic.
                    703: After successful authentication, another process will be created that has
                    704: the privilege of the authenticated user.
                    705: The goal of privilege separation is to prevent privilege
1.1       stevesk   706: escalation by containing any corruption within the unprivileged processes.
                    707: The default is
                    708: .Dq yes .
                    709: .It Cm X11DisplayOffset
                    710: Specifies the first display number available for
1.52      jmc       711: .Xr sshd 8 Ns 's
1.1       stevesk   712: X11 forwarding.
1.52      jmc       713: This prevents sshd from interfering with real X11 servers.
1.1       stevesk   714: The default is 10.
                    715: .It Cm X11Forwarding
                    716: Specifies whether X11 forwarding is permitted.
1.13      stevesk   717: The argument must be
                    718: .Dq yes
                    719: or
                    720: .Dq no .
1.1       stevesk   721: The default is
                    722: .Dq no .
1.13      stevesk   723: .Pp
                    724: When X11 forwarding is enabled, there may be additional exposure to
                    725: the server and to client displays if the
1.52      jmc       726: .Xr sshd 8
1.13      stevesk   727: proxy display is configured to listen on the wildcard address (see
                    728: .Cm X11UseLocalhost
1.52      jmc       729: below), though this is not the default.
1.13      stevesk   730: Additionally, the authentication spoofing and authentication data
                    731: verification and substitution occur on the client side.
                    732: The security risk of using X11 forwarding is that the client's X11
1.52      jmc       733: display server may be exposed to attack when the SSH client requests
1.13      stevesk   734: forwarding (see the warnings for
                    735: .Cm ForwardX11
                    736: in
1.19      jmc       737: .Xr ssh_config 5 ) .
1.13      stevesk   738: A system administrator may have a stance in which they want to
                    739: protect clients that may expose themselves to attack by unwittingly
                    740: requesting X11 forwarding, which can warrant a
                    741: .Dq no
                    742: setting.
                    743: .Pp
                    744: Note that disabling X11 forwarding does not prevent users from
                    745: forwarding X11 traffic, as users can always install their own forwarders.
1.1       stevesk   746: X11 forwarding is automatically disabled if
                    747: .Cm UseLogin
                    748: is enabled.
                    749: .It Cm X11UseLocalhost
                    750: Specifies whether
1.52      jmc       751: .Xr sshd 8
1.1       stevesk   752: should bind the X11 forwarding server to the loopback address or to
1.15      jmc       753: the wildcard address.
                    754: By default,
1.52      jmc       755: sshd binds the forwarding server to the loopback address and sets the
1.1       stevesk   756: hostname part of the
                    757: .Ev DISPLAY
                    758: environment variable to
                    759: .Dq localhost .
1.8       stevesk   760: This prevents remote hosts from connecting to the proxy display.
1.1       stevesk   761: However, some older X11 clients may not function with this
                    762: configuration.
                    763: .Cm X11UseLocalhost
                    764: may be set to
                    765: .Dq no
                    766: to specify that the forwarding server should be bound to the wildcard
                    767: address.
                    768: The argument must be
                    769: .Dq yes
                    770: or
                    771: .Dq no .
                    772: The default is
                    773: .Dq yes .
                    774: .It Cm XAuthLocation
1.11      stevesk   775: Specifies the full pathname of the
1.1       stevesk   776: .Xr xauth 1
                    777: program.
                    778: The default is
                    779: .Pa /usr/X11R6/bin/xauth .
                    780: .El
1.55    ! jmc       781: .Sh TIME FORMATS
1.53      jmc       782: .Xr sshd 8
1.1       stevesk   783: command-line arguments and configuration file options that specify time
                    784: may be expressed using a sequence of the form:
                    785: .Sm off
1.7       stevesk   786: .Ar time Op Ar qualifier ,
1.1       stevesk   787: .Sm on
                    788: where
                    789: .Ar time
                    790: is a positive integer value and
                    791: .Ar qualifier
                    792: is one of the following:
                    793: .Pp
                    794: .Bl -tag -width Ds -compact -offset indent
                    795: .It Cm <none>
                    796: seconds
                    797: .It Cm s | Cm S
                    798: seconds
                    799: .It Cm m | Cm M
                    800: minutes
                    801: .It Cm h | Cm H
                    802: hours
                    803: .It Cm d | Cm D
                    804: days
                    805: .It Cm w | Cm W
                    806: weeks
                    807: .El
                    808: .Pp
                    809: Each member of the sequence is added together to calculate
                    810: the total time value.
                    811: .Pp
                    812: Time format examples:
                    813: .Pp
                    814: .Bl -tag -width Ds -compact -offset indent
                    815: .It 600
                    816: 600 seconds (10 minutes)
                    817: .It 10m
                    818: 10 minutes
                    819: .It 1h30m
                    820: 1 hour 30 minutes (90 minutes)
                    821: .El
                    822: .Sh FILES
                    823: .Bl -tag -width Ds
                    824: .It Pa /etc/ssh/sshd_config
                    825: Contains configuration data for
1.53      jmc       826: .Xr sshd 8 .
1.1       stevesk   827: This file should be writable by root only, but it is recommended
                    828: (though not necessary) that it be world-readable.
                    829: .El
1.19      jmc       830: .Sh SEE ALSO
                    831: .Xr sshd 8
1.1       stevesk   832: .Sh AUTHORS
                    833: OpenSSH is a derivative of the original and free
                    834: ssh 1.2.12 release by Tatu Ylonen.
                    835: Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
                    836: Theo de Raadt and Dug Song
                    837: removed many bugs, re-added newer features and
                    838: created OpenSSH.
                    839: Markus Friedl contributed the support for SSH
                    840: protocol versions 1.5 and 2.0.
                    841: Niels Provos and Markus Friedl contributed support
                    842: for privilege separation.