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

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.268   ! jmc        36: .\" $OpenBSD: sshd_config.5,v 1.267 2018/06/01 03:33:53 djm Exp $
        !            37: .Dd $Mdocdate: June 1 2018 $
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 DESCRIPTION
1.53      jmc        44: .Xr sshd 8
1.1       stevesk    45: reads configuration data from
                     46: .Pa /etc/ssh/sshd_config
                     47: (or the file specified with
                     48: .Fl f
                     49: on the command line).
                     50: The file contains keyword-argument pairs, one per line.
1.254     benno      51: For each keyword, the first obtained value will be used.
1.1       stevesk    52: Lines starting with
                     53: .Ql #
                     54: and empty lines are interpreted as comments.
1.56      dtucker    55: Arguments may optionally be enclosed in double quotes
                     56: .Pq \&"
                     57: in order to represent arguments containing spaces.
1.1       stevesk    58: .Pp
                     59: The possible
                     60: keywords and their meanings are as follows (note that
                     61: keywords are case-insensitive and arguments are case-sensitive):
                     62: .Bl -tag -width Ds
1.30      djm        63: .It Cm AcceptEnv
                     64: Specifies what environment variables sent by the client will be copied into
                     65: the session's
                     66: .Xr environ 7 .
                     67: See
                     68: .Cm SendEnv
                     69: in
                     70: .Xr ssh_config 5
                     71: for how to configure the client.
1.219     jmc        72: The
1.197     dtucker    73: .Ev TERM
1.199     jmc        74: environment variable is always sent whenever the client
1.204     djm        75: requests a pseudo-terminal as it is required by the protocol.
1.30      djm        76: Variables are specified by name, which may contain the wildcard characters
1.51      jmc        77: .Ql *
1.30      djm        78: and
                     79: .Ql \&? .
1.31      djm        80: Multiple environment variables may be separated by whitespace or spread
1.30      djm        81: across multiple
                     82: .Cm AcceptEnv
                     83: directives.
1.31      djm        84: Be warned that some environment variables could be used to bypass restricted
1.30      djm        85: user environments.
                     86: For this reason, care should be taken in the use of this directive.
                     87: The default is not to accept any environment variables.
1.37      djm        88: .It Cm AddressFamily
                     89: Specifies which address family should be used by
1.53      jmc        90: .Xr sshd 8 .
1.37      djm        91: Valid arguments are
1.237     jmc        92: .Cm any
                     93: (the default),
                     94: .Cm inet
1.52      jmc        95: (use IPv4 only), or
1.237     jmc        96: .Cm inet6
1.37      djm        97: (use IPv6 only).
1.89      jmc        98: .It Cm AllowAgentForwarding
                     99: Specifies whether
                    100: .Xr ssh-agent 1
                    101: forwarding is permitted.
                    102: The default is
1.237     jmc       103: .Cm yes .
1.89      jmc       104: Note that disabling agent forwarding does not improve security
                    105: unless users are also denied shell access, as they can always install
                    106: their own forwarders.
1.1       stevesk   107: .It Cm AllowGroups
                    108: This keyword can be followed by a list of group name patterns, separated
                    109: by spaces.
                    110: If specified, login is allowed only for users whose primary
                    111: group or supplementary group list matches one of the patterns.
                    112: Only group names are valid; a numerical group ID is not recognized.
                    113: By default, login is allowed for all groups.
1.54      jmc       114: The allow/deny directives are processed in the following order:
                    115: .Cm DenyUsers ,
                    116: .Cm AllowUsers ,
                    117: .Cm DenyGroups ,
                    118: and finally
                    119: .Cm AllowGroups .
1.49      jmc       120: .Pp
1.161     jmc       121: See PATTERNS in
1.49      jmc       122: .Xr ssh_config 5
                    123: for more information on patterns.
1.231     jmc       124: .It Cm AllowStreamLocalForwarding
                    125: Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
1.150     djm       126: The available options are
1.237     jmc       127: .Cm yes
                    128: (the default)
1.150     djm       129: or
1.237     jmc       130: .Cm all
1.231     jmc       131: to allow StreamLocal forwarding,
1.237     jmc       132: .Cm no
1.231     jmc       133: to prevent all StreamLocal forwarding,
1.237     jmc       134: .Cm local
1.150     djm       135: to allow local (from the perspective of
1.151     jmc       136: .Xr ssh 1 )
                    137: forwarding only or
1.237     jmc       138: .Cm remote
1.150     djm       139: to allow remote forwarding only.
1.231     jmc       140: Note that disabling StreamLocal forwarding does not improve security unless
1.1       stevesk   141: users are also denied shell access, as they can always install their
                    142: own forwarders.
1.231     jmc       143: .It Cm AllowTcpForwarding
                    144: Specifies whether TCP forwarding is permitted.
1.175     millert   145: The available options are
1.237     jmc       146: .Cm yes
                    147: (the default)
1.175     millert   148: or
1.237     jmc       149: .Cm all
1.231     jmc       150: to allow TCP forwarding,
1.237     jmc       151: .Cm no
1.231     jmc       152: to prevent all TCP forwarding,
1.237     jmc       153: .Cm local
1.175     millert   154: to allow local (from the perspective of
                    155: .Xr ssh 1 )
                    156: forwarding only or
1.237     jmc       157: .Cm remote
1.175     millert   158: to allow remote forwarding only.
1.231     jmc       159: Note that disabling TCP forwarding does not improve security unless
1.175     millert   160: users are also denied shell access, as they can always install their
                    161: own forwarders.
1.1       stevesk   162: .It Cm AllowUsers
                    163: This keyword can be followed by a list of user name patterns, separated
                    164: by spaces.
1.14      jmc       165: If specified, login is allowed only for user names that
1.1       stevesk   166: match one of the patterns.
                    167: Only user names are valid; a numerical user ID is not recognized.
                    168: By default, login is allowed for all users.
                    169: If the pattern takes the form USER@HOST then USER and HOST
                    170: are separately checked, restricting logins to particular
                    171: users from particular hosts.
1.222     jmc       172: HOST criteria may additionally contain addresses to match in CIDR
                    173: address/masklen format.
1.54      jmc       174: The allow/deny directives are processed in the following order:
                    175: .Cm DenyUsers ,
                    176: .Cm AllowUsers ,
                    177: .Cm DenyGroups ,
                    178: and finally
                    179: .Cm AllowGroups .
1.49      jmc       180: .Pp
1.161     jmc       181: See PATTERNS in
1.49      jmc       182: .Xr ssh_config 5
                    183: for more information on patterns.
1.149     djm       184: .It Cm AuthenticationMethods
                    185: Specifies the authentication methods that must be successfully completed
                    186: for a user to be granted access.
                    187: This option must be followed by one or more comma-separated lists of
1.224     djm       188: authentication method names, or by the single string
1.237     jmc       189: .Cm any
1.224     djm       190: to indicate the default behaviour of accepting any single authentication
1.225     jmc       191: method.
1.237     jmc       192: If the default is overridden, then successful authentication requires
1.224     djm       193: completion of every method in at least one of these lists.
1.149     djm       194: .Pp
1.237     jmc       195: For example,
                    196: .Qq publickey,password publickey,keyboard-interactive
1.149     djm       197: would require the user to complete public key authentication, followed by
                    198: either password or keyboard interactive authentication.
                    199: Only methods that are next in one or more lists are offered at each stage,
1.237     jmc       200: so for this example it would not be possible to attempt password or
1.149     djm       201: keyboard-interactive authentication before public key.
1.157     markus    202: .Pp
                    203: For keyboard interactive authentication it is also possible to
                    204: restrict authentication to a specific device by appending a
                    205: colon followed by the device identifier
1.237     jmc       206: .Cm bsdauth ,
                    207: .Cm pam ,
1.157     markus    208: or
1.237     jmc       209: .Cm skey ,
1.157     markus    210: depending on the server configuration.
                    211: For example,
1.237     jmc       212: .Qq keyboard-interactive:bsdauth
1.157     markus    213: would restrict keyboard interactive authentication to the
1.237     jmc       214: .Cm bsdauth
1.157     markus    215: device.
1.185     djm       216: .Pp
1.237     jmc       217: If the publickey method is listed more than once,
1.185     djm       218: .Xr sshd 8
                    219: verifies that keys that have been used successfully are not reused for
                    220: subsequent authentications.
1.237     jmc       221: For example,
                    222: .Qq publickey,publickey
                    223: requires successful authentication using two different public keys.
1.181     djm       224: .Pp
1.149     djm       225: Note that each authentication method listed should also be explicitly enabled
                    226: in the configuration.
1.251     djm       227: .Pp
                    228: The available authentication methods are:
                    229: .Qq gssapi-with-mic ,
                    230: .Qq hostbased ,
                    231: .Qq keyboard-interactive ,
                    232: .Qq none
                    233: (used for access to password-less accounts when
1.266     jmc       234: .Cm PermitEmptyPasswords
1.251     djm       235: is enabled),
                    236: .Qq password
                    237: and
                    238: .Qq publickey .
1.146     djm       239: .It Cm AuthorizedKeysCommand
1.147     jmc       240: Specifies a program to be used to look up the user's public keys.
1.201     djm       241: The program must be owned by root, not writable by group or others and
                    242: specified by an absolute path.
                    243: Arguments to
                    244: .Cm AuthorizedKeysCommand
1.235     jmc       245: accept the tokens described in the
                    246: .Sx TOKENS
                    247: section.
                    248: If no arguments are specified then the username of the target user is used.
1.201     djm       249: .Pp
                    250: The program should produce on standard output zero or
1.235     jmc       251: more lines of authorized_keys output (see
                    252: .Sx AUTHORIZED_KEYS
                    253: in
1.147     jmc       254: .Xr sshd 8 ) .
1.235     jmc       255: If a key supplied by
                    256: .Cm AuthorizedKeysCommand
                    257: does not successfully authenticate
1.146     djm       258: and authorize the user then public key authentication continues using the usual
                    259: .Cm AuthorizedKeysFile
                    260: files.
1.237     jmc       261: By default, no
                    262: .Cm AuthorizedKeysCommand
                    263: is run.
1.146     djm       264: .It Cm AuthorizedKeysCommandUser
1.237     jmc       265: Specifies the user under whose account the
                    266: .Cm AuthorizedKeysCommand
                    267: is run.
1.146     djm       268: It is recommended to use a dedicated user that has no other role on the host
                    269: than running authorized keys commands.
1.186     djm       270: If
1.181     djm       271: .Cm AuthorizedKeysCommand
1.186     djm       272: is specified but
                    273: .Cm AuthorizedKeysCommandUser
                    274: is not, then
                    275: .Xr sshd 8
                    276: will refuse to start.
1.1       stevesk   277: .It Cm AuthorizedKeysFile
1.235     jmc       278: Specifies the file that contains the public keys used for user authentication.
1.124     djm       279: The format is described in the
1.235     jmc       280: .Sx AUTHORIZED_KEYS FILE FORMAT
1.124     djm       281: section of
                    282: .Xr sshd 8 .
1.235     jmc       283: Arguments to
1.1       stevesk   284: .Cm AuthorizedKeysFile
1.235     jmc       285: accept the tokens described in the
                    286: .Sx TOKENS
                    287: section.
1.1       stevesk   288: After expansion,
                    289: .Cm AuthorizedKeysFile
                    290: is taken to be an absolute path or one relative to the user's home
                    291: directory.
1.133     jmc       292: Multiple files may be listed, separated by whitespace.
1.212     djm       293: Alternately this option may be set to
1.237     jmc       294: .Cm none
1.212     djm       295: to skip checking for user keys in files.
1.133     jmc       296: The default is
1.237     jmc       297: .Qq .ssh/authorized_keys .ssh/authorized_keys2 .
1.202     djm       298: .It Cm AuthorizedPrincipalsCommand
                    299: Specifies a program to be used to generate the list of allowed
                    300: certificate principals as per
                    301: .Cm AuthorizedPrincipalsFile .
                    302: The program must be owned by root, not writable by group or others and
                    303: specified by an absolute path.
                    304: Arguments to
                    305: .Cm AuthorizedPrincipalsCommand
1.235     jmc       306: accept the tokens described in the
                    307: .Sx TOKENS
                    308: section.
                    309: If no arguments are specified then the username of the target user is used.
1.202     djm       310: .Pp
                    311: The program should produce on standard output zero or
                    312: more lines of
                    313: .Cm AuthorizedPrincipalsFile
                    314: output.
                    315: If either
                    316: .Cm AuthorizedPrincipalsCommand
                    317: or
                    318: .Cm AuthorizedPrincipalsFile
                    319: is specified, then certificates offered by the client for authentication
                    320: must contain a principal that is listed.
1.235     jmc       321: By default, no
                    322: .Cm AuthorizedPrincipalsCommand
                    323: is run.
1.202     djm       324: .It Cm AuthorizedPrincipalsCommandUser
1.235     jmc       325: Specifies the user under whose account the
                    326: .Cm AuthorizedPrincipalsCommand
                    327: is run.
1.202     djm       328: It is recommended to use a dedicated user that has no other role on the host
                    329: than running authorized principals commands.
                    330: If
                    331: .Cm AuthorizedPrincipalsCommand
                    332: is specified but
                    333: .Cm AuthorizedPrincipalsCommandUser
                    334: is not, then
                    335: .Xr sshd 8
                    336: will refuse to start.
1.121     djm       337: .It Cm AuthorizedPrincipalsFile
                    338: Specifies a file that lists principal names that are accepted for
                    339: certificate authentication.
                    340: When using certificates signed by a key listed in
                    341: .Cm TrustedUserCAKeys ,
                    342: this file lists names, one of which must appear in the certificate for it
                    343: to be accepted for authentication.
1.235     jmc       344: Names are listed one per line preceded by key options (as described in
                    345: .Sx AUTHORIZED_KEYS FILE FORMAT
                    346: in
1.125     jmc       347: .Xr sshd 8 ) .
1.124     djm       348: Empty lines and comments starting with
1.121     djm       349: .Ql #
                    350: are ignored.
                    351: .Pp
1.235     jmc       352: Arguments to
1.121     djm       353: .Cm AuthorizedPrincipalsFile
1.235     jmc       354: accept the tokens described in the
                    355: .Sx TOKENS
                    356: section.
1.121     djm       357: After expansion,
                    358: .Cm AuthorizedPrincipalsFile
1.235     jmc       359: is taken to be an absolute path or one relative to the user's home directory.
1.138     djm       360: The default is
1.237     jmc       361: .Cm none ,
1.138     djm       362: i.e. not to use a principals file \(en in this case, the username
1.121     djm       363: of the user must appear in a certificate's principals list for it to be
                    364: accepted.
1.235     jmc       365: .Pp
1.121     djm       366: Note that
                    367: .Cm AuthorizedPrincipalsFile
                    368: is only used when authentication proceeds using a CA listed in
                    369: .Cm TrustedUserCAKeys
                    370: and is not consulted for certification authorities trusted via
                    371: .Pa ~/.ssh/authorized_keys ,
                    372: though the
                    373: .Cm principals=
                    374: key option offers a similar facility (see
                    375: .Xr sshd 8
                    376: for details).
1.1       stevesk   377: .It Cm Banner
                    378: The contents of the specified file are sent to the remote user before
                    379: authentication is allowed.
1.78      djm       380: If the argument is
1.237     jmc       381: .Cm none
1.78      djm       382: then no banner is displayed.
1.1       stevesk   383: By default, no banner is displayed.
                    384: .It Cm ChallengeResponseAuthentication
1.50      jmc       385: Specifies whether challenge-response authentication is allowed.
1.1       stevesk   386: All authentication styles from
                    387: .Xr login.conf 5
                    388: are supported.
                    389: The default is
1.237     jmc       390: .Cm yes .
1.80      djm       391: .It Cm ChrootDirectory
1.113     stevesk   392: Specifies the pathname of a directory to
1.80      djm       393: .Xr chroot 2
                    394: to after authentication.
1.190     deraadt   395: At session startup
                    396: .Xr sshd 8
                    397: checks that all components of the pathname are root-owned directories
                    398: which are not writable by any other user or group.
1.106     stevesk   399: After the chroot,
                    400: .Xr sshd 8
                    401: changes the working directory to the user's home directory.
1.235     jmc       402: Arguments to
                    403: .Cm ChrootDirectory
                    404: accept the tokens described in the
                    405: .Sx TOKENS
                    406: section.
1.80      djm       407: .Pp
                    408: The
                    409: .Cm ChrootDirectory
                    410: must contain the necessary files and directories to support the
1.103     stevesk   411: user's session.
1.80      djm       412: For an interactive session this requires at least a shell, typically
                    413: .Xr sh 1 ,
                    414: and basic
                    415: .Pa /dev
                    416: nodes such as
                    417: .Xr null 4 ,
                    418: .Xr zero 4 ,
                    419: .Xr stdin 4 ,
                    420: .Xr stdout 4 ,
                    421: .Xr stderr 4 ,
1.180     jmc       422: and
1.80      djm       423: .Xr tty 4
                    424: devices.
1.237     jmc       425: For file transfer sessions using SFTP
                    426: no additional configuration of the environment is necessary if the in-process
                    427: sftp-server is used,
1.176     schwarze  428: though sessions which use logging may require
1.104     stevesk   429: .Pa /dev/log
1.176     schwarze  430: inside the chroot directory on some operating systems (see
1.104     stevesk   431: .Xr sftp-server 8
1.81      jmc       432: for details).
1.190     deraadt   433: .Pp
1.191     jmc       434: For safety, it is very important that the directory hierarchy be
1.190     deraadt   435: prevented from modification by other processes on the system (especially
                    436: those outside the jail).
                    437: Misconfiguration can lead to unsafe environments which
                    438: .Xr sshd 8
                    439: cannot detect.
1.80      djm       440: .Pp
1.215     djm       441: The default is
1.237     jmc       442: .Cm none ,
1.215     djm       443: indicating not to
1.80      djm       444: .Xr chroot 2 .
1.1       stevesk   445: .It Cm Ciphers
1.219     jmc       446: Specifies the ciphers allowed.
1.1       stevesk   447: Multiple ciphers must be comma-separated.
1.208     djm       448: If the specified value begins with a
                    449: .Sq +
                    450: character, then the specified ciphers will be appended to the default set
                    451: instead of replacing them.
1.242     djm       452: If the specified value begins with a
                    453: .Sq -
                    454: character, then the specified ciphers (including wildcards) will be removed
                    455: from the default set instead of replacing them.
1.208     djm       456: .Pp
1.167     djm       457: The supported ciphers are:
                    458: .Pp
1.173     naddy     459: .Bl -item -compact -offset indent
                    460: .It
                    461: 3des-cbc
                    462: .It
                    463: aes128-cbc
                    464: .It
                    465: aes192-cbc
                    466: .It
                    467: aes256-cbc
                    468: .It
                    469: aes128-ctr
                    470: .It
                    471: aes192-ctr
                    472: .It
                    473: aes256-ctr
                    474: .It
                    475: aes128-gcm@openssh.com
                    476: .It
                    477: aes256-gcm@openssh.com
                    478: .It
                    479: chacha20-poly1305@openssh.com
                    480: .El
1.167     djm       481: .Pp
1.52      jmc       482: The default is:
1.173     naddy     483: .Bd -literal -offset indent
1.211     jmc       484: chacha20-poly1305@openssh.com,
1.173     naddy     485: aes128-ctr,aes192-ctr,aes256-ctr,
1.211     jmc       486: aes128-gcm@openssh.com,aes256-gcm@openssh.com
1.1       stevesk   487: .Ed
1.167     djm       488: .Pp
1.237     jmc       489: The list of available ciphers may also be obtained using
                    490: .Qq ssh -Q cipher .
1.1       stevesk   491: .It Cm ClientAliveCountMax
1.237     jmc       492: Sets the number of client alive messages which may be sent without
1.52      jmc       493: .Xr sshd 8
1.17      jmc       494: receiving any messages back from the client.
                    495: If this threshold is reached while client alive messages are being sent,
1.52      jmc       496: sshd will disconnect the client, terminating the session.
1.17      jmc       497: It is important to note that the use of client alive messages is very
                    498: different from
1.237     jmc       499: .Cm TCPKeepAlive .
1.17      jmc       500: The client alive messages are sent through the encrypted channel
                    501: and therefore will not be spoofable.
                    502: The TCP keepalive option enabled by
1.27      markus    503: .Cm TCPKeepAlive
1.17      jmc       504: is spoofable.
                    505: The client alive mechanism is valuable when the client or
1.1       stevesk   506: server depend on knowing when a connection has become inactive.
                    507: .Pp
1.17      jmc       508: The default value is 3.
                    509: If
1.1       stevesk   510: .Cm ClientAliveInterval
1.237     jmc       511: is set to 15, and
1.1       stevesk   512: .Cm ClientAliveCountMax
1.52      jmc       513: is left at the default, unresponsive SSH clients
1.1       stevesk   514: will be disconnected after approximately 45 seconds.
1.42      djm       515: .It Cm ClientAliveInterval
                    516: Sets a timeout interval in seconds after which if no data has been received
                    517: from the client,
1.52      jmc       518: .Xr sshd 8
1.42      djm       519: will send a message through the encrypted
                    520: channel to request a response from the client.
                    521: The default
                    522: is 0, indicating that these messages will not be sent to the client.
1.3       markus    523: .It Cm Compression
1.236     djm       524: Specifies whether compression is enabled after
1.44      markus    525: the user has authenticated successfully.
1.3       markus    526: The argument must be
1.237     jmc       527: .Cm yes ,
                    528: .Cm delayed
1.236     djm       529: (a legacy synonym for
1.237     jmc       530: .Cm yes )
1.3       markus    531: or
1.237     jmc       532: .Cm no .
1.3       markus    533: The default is
1.237     jmc       534: .Cm yes .
1.1       stevesk   535: .It Cm DenyGroups
                    536: This keyword can be followed by a list of group name patterns, separated
                    537: by spaces.
                    538: Login is disallowed for users whose primary group or supplementary
                    539: group list matches one of the patterns.
                    540: Only group names are valid; a numerical group ID is not recognized.
                    541: By default, login is allowed for all groups.
1.54      jmc       542: The allow/deny directives are processed in the following order:
                    543: .Cm DenyUsers ,
                    544: .Cm AllowUsers ,
                    545: .Cm DenyGroups ,
                    546: and finally
                    547: .Cm AllowGroups .
1.49      jmc       548: .Pp
1.161     jmc       549: See PATTERNS in
1.49      jmc       550: .Xr ssh_config 5
                    551: for more information on patterns.
1.1       stevesk   552: .It Cm DenyUsers
                    553: This keyword can be followed by a list of user name patterns, separated
                    554: by spaces.
                    555: Login is disallowed for user names that match one of the patterns.
                    556: Only user names are valid; a numerical user ID is not recognized.
                    557: By default, login is allowed for all users.
                    558: If the pattern takes the form USER@HOST then USER and HOST
                    559: are separately checked, restricting logins to particular
                    560: users from particular hosts.
1.222     jmc       561: HOST criteria may additionally contain addresses to match in CIDR
                    562: address/masklen format.
1.54      jmc       563: The allow/deny directives are processed in the following order:
                    564: .Cm DenyUsers ,
                    565: .Cm AllowUsers ,
                    566: .Cm DenyGroups ,
                    567: and finally
                    568: .Cm AllowGroups .
1.49      jmc       569: .Pp
1.161     jmc       570: See PATTERNS in
1.49      jmc       571: .Xr ssh_config 5
                    572: for more information on patterns.
1.239     djm       573: .It Cm DisableForwarding
                    574: Disables all forwarding features, including X11,
                    575: .Xr ssh-agent 1 ,
                    576: TCP and StreamLocal.
                    577: This option overrides all other forwarding-related options and may
                    578: simplify restricted configurations.
1.246     djm       579: .It Cm ExposeAuthInfo
1.253     jmc       580: Writes a temporary file containing a list of authentication methods and
1.246     djm       581: public credentials (e.g. keys) used to authenticate the user.
1.247     jmc       582: The location of the file is exposed to the user session through the
1.248     djm       583: .Ev SSH_USER_AUTH
1.247     jmc       584: environment variable.
1.253     jmc       585: The default is
                    586: .Cm no .
1.183     djm       587: .It Cm FingerprintHash
                    588: Specifies the hash algorithm used when logging key fingerprints.
                    589: Valid options are:
1.237     jmc       590: .Cm md5
1.183     djm       591: and
1.237     jmc       592: .Cm sha256 .
1.183     djm       593: The default is
1.237     jmc       594: .Cm sha256 .
1.67      dtucker   595: .It Cm ForceCommand
                    596: Forces the execution of the command specified by
                    597: .Cm ForceCommand ,
1.84      djm       598: ignoring any command supplied by the client and
                    599: .Pa ~/.ssh/rc
                    600: if present.
1.67      dtucker   601: The command is invoked by using the user's login shell with the -c option.
                    602: This applies to shell, command, or subsystem execution.
                    603: It is most useful inside a
                    604: .Cm Match
                    605: block.
                    606: The command originally supplied by the client is available in the
                    607: .Ev SSH_ORIGINAL_COMMAND
                    608: environment variable.
1.82      djm       609: Specifying a command of
1.237     jmc       610: .Cm internal-sftp
                    611: will force the use of an in-process SFTP server that requires no support
1.82      djm       612: files when used with
                    613: .Cm ChrootDirectory .
1.215     djm       614: The default is
1.237     jmc       615: .Cm none .
1.1       stevesk   616: .It Cm GatewayPorts
                    617: Specifies whether remote hosts are allowed to connect to ports
                    618: forwarded for the client.
                    619: By default,
1.52      jmc       620: .Xr sshd 8
1.15      jmc       621: binds remote port forwardings to the loopback address.
                    622: This prevents other remote hosts from connecting to forwarded ports.
1.1       stevesk   623: .Cm GatewayPorts
1.52      jmc       624: can be used to specify that sshd
1.39      djm       625: should allow remote port forwardings to bind to non-loopback addresses, thus
                    626: allowing other hosts to connect.
                    627: The argument may be
1.237     jmc       628: .Cm no
1.39      djm       629: to force remote port forwardings to be available to the local host only,
1.237     jmc       630: .Cm yes
1.39      djm       631: to force remote port forwardings to bind to the wildcard address, or
1.237     jmc       632: .Cm clientspecified
1.39      djm       633: to allow the client to select the address to which the forwarding is bound.
1.1       stevesk   634: The default is
1.237     jmc       635: .Cm no .
1.23      markus    636: .It Cm GSSAPIAuthentication
1.25      markus    637: Specifies whether user authentication based on GSSAPI is allowed.
1.26      djm       638: The default is
1.237     jmc       639: .Cm no .
1.23      markus    640: .It Cm GSSAPICleanupCredentials
                    641: Specifies whether to automatically destroy the user's credentials cache
                    642: on logout.
                    643: The default is
1.237     jmc       644: .Cm yes .
1.203     djm       645: .It Cm GSSAPIStrictAcceptorCheck
                    646: Determines whether to be strict about the identity of the GSSAPI acceptor
                    647: a client authenticates against.
                    648: If set to
1.237     jmc       649: .Cm yes
                    650: then the client must authenticate against the host
1.203     djm       651: service on the current hostname.
                    652: If set to
1.237     jmc       653: .Cm no
1.203     djm       654: then the client may authenticate against any service key stored in the
                    655: machine's default store.
                    656: This facility is provided to assist with operation on multi homed machines.
                    657: The default is
1.237     jmc       658: .Cm yes .
1.189     djm       659: .It Cm HostbasedAcceptedKeyTypes
                    660: Specifies the key types that will be accepted for hostbased authentication
                    661: as a comma-separated pattern list.
1.208     djm       662: Alternately if the specified value begins with a
                    663: .Sq +
                    664: character, then the specified key types will be appended to the default set
                    665: instead of replacing them.
1.242     djm       666: If the specified value begins with a
                    667: .Sq -
                    668: character, then the specified key types (including wildcards) will be removed
                    669: from the default set instead of replacing them.
1.206     markus    670: The default for this option is:
                    671: .Bd -literal -offset 3n
                    672: ecdsa-sha2-nistp256-cert-v01@openssh.com,
                    673: ecdsa-sha2-nistp384-cert-v01@openssh.com,
                    674: ecdsa-sha2-nistp521-cert-v01@openssh.com,
                    675: ssh-ed25519-cert-v01@openssh.com,
                    676: ssh-rsa-cert-v01@openssh.com,
                    677: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.220     djm       678: ssh-ed25519,ssh-rsa
1.206     markus    679: .Ed
                    680: .Pp
1.237     jmc       681: The list of available key types may also be obtained using
                    682: .Qq ssh -Q key .
1.1       stevesk   683: .It Cm HostbasedAuthentication
                    684: Specifies whether rhosts or /etc/hosts.equiv authentication together
                    685: with successful public key client host authentication is allowed
1.50      jmc       686: (host-based authentication).
1.70      dtucker   687: The default is
1.237     jmc       688: .Cm no .
1.70      dtucker   689: .It Cm HostbasedUsesNameFromPacketOnly
                    690: Specifies whether or not the server will attempt to perform a reverse
                    691: name lookup when matching the name in the
                    692: .Pa ~/.shosts ,
                    693: .Pa ~/.rhosts ,
                    694: and
                    695: .Pa /etc/hosts.equiv
                    696: files during
                    697: .Cm HostbasedAuthentication .
                    698: A setting of
1.237     jmc       699: .Cm yes
1.70      dtucker   700: means that
                    701: .Xr sshd 8
                    702: uses the name supplied by the client rather than
                    703: attempting to resolve the name from the TCP connection itself.
1.1       stevesk   704: The default is
1.237     jmc       705: .Cm no .
1.117     djm       706: .It Cm HostCertificate
                    707: Specifies a file containing a public host certificate.
                    708: The certificate's public key must match a private host key already specified
                    709: by
                    710: .Cm HostKey .
                    711: The default behaviour of
                    712: .Xr sshd 8
                    713: is not to load any certificates.
1.1       stevesk   714: .It Cm HostKey
                    715: Specifies a file containing a private host key
                    716: used by SSH.
1.229     naddy     717: The defaults are
1.169     naddy     718: .Pa /etc/ssh/ssh_host_ecdsa_key ,
                    719: .Pa /etc/ssh/ssh_host_ed25519_key
1.126     djm       720: and
1.229     naddy     721: .Pa /etc/ssh/ssh_host_rsa_key .
1.206     markus    722: .Pp
1.1       stevesk   723: Note that
1.52      jmc       724: .Xr sshd 8
1.206     markus    725: will refuse to use a file if it is group/world-accessible
                    726: and that the
                    727: .Cm HostKeyAlgorithms
                    728: option restricts which of the keys are actually used by
                    729: .Xr sshd 8 .
                    730: .Pp
1.1       stevesk   731: It is possible to have multiple host key files.
1.162     markus    732: It is also possible to specify public host key files instead.
                    733: In this case operations on the private key will be delegated
                    734: to an
                    735: .Xr ssh-agent 1 .
                    736: .It Cm HostKeyAgent
                    737: Identifies the UNIX-domain socket used to communicate
                    738: with an agent that has access to the private host keys.
1.223     markus    739: If the string
1.237     jmc       740: .Qq SSH_AUTH_SOCK
1.162     markus    741: is specified, the location of the socket will be read from the
                    742: .Ev SSH_AUTH_SOCK
                    743: environment variable.
1.206     markus    744: .It Cm HostKeyAlgorithms
1.219     jmc       745: Specifies the host key algorithms
1.206     markus    746: that the server offers.
                    747: The default for this option is:
                    748: .Bd -literal -offset 3n
                    749: ecdsa-sha2-nistp256-cert-v01@openssh.com,
                    750: ecdsa-sha2-nistp384-cert-v01@openssh.com,
                    751: ecdsa-sha2-nistp521-cert-v01@openssh.com,
                    752: ssh-ed25519-cert-v01@openssh.com,
                    753: ssh-rsa-cert-v01@openssh.com,
                    754: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.220     djm       755: ssh-ed25519,ssh-rsa
1.206     markus    756: .Ed
                    757: .Pp
1.237     jmc       758: The list of available key types may also be obtained using
                    759: .Qq ssh -Q key .
1.1       stevesk   760: .It Cm IgnoreRhosts
                    761: Specifies that
                    762: .Pa .rhosts
                    763: and
                    764: .Pa .shosts
                    765: files will not be used in
                    766: .Cm HostbasedAuthentication .
                    767: .Pp
                    768: .Pa /etc/hosts.equiv
                    769: and
                    770: .Pa /etc/shosts.equiv
                    771: are still used.
                    772: The default is
1.237     jmc       773: .Cm yes .
1.1       stevesk   774: .It Cm IgnoreUserKnownHosts
                    775: Specifies whether
1.52      jmc       776: .Xr sshd 8
1.1       stevesk   777: should ignore the user's
1.41      djm       778: .Pa ~/.ssh/known_hosts
1.1       stevesk   779: during
1.261     djm       780: .Cm HostbasedAuthentication
                    781: and use only the system-wide known hosts file
                    782: .Pa /etc/ssh/known_hosts .
1.1       stevesk   783: The default is
1.237     jmc       784: .Cm no .
1.129     djm       785: .It Cm IPQoS
                    786: Specifies the IPv4 type-of-service or DSCP class for the connection.
                    787: Accepted values are
1.237     jmc       788: .Cm af11 ,
                    789: .Cm af12 ,
                    790: .Cm af13 ,
                    791: .Cm af21 ,
                    792: .Cm af22 ,
                    793: .Cm af23 ,
                    794: .Cm af31 ,
                    795: .Cm af32 ,
                    796: .Cm af33 ,
                    797: .Cm af41 ,
                    798: .Cm af42 ,
                    799: .Cm af43 ,
                    800: .Cm cs0 ,
                    801: .Cm cs1 ,
                    802: .Cm cs2 ,
                    803: .Cm cs3 ,
                    804: .Cm cs4 ,
                    805: .Cm cs5 ,
                    806: .Cm cs6 ,
                    807: .Cm cs7 ,
                    808: .Cm ef ,
                    809: .Cm lowdelay ,
                    810: .Cm throughput ,
                    811: .Cm reliability ,
1.250     djm       812: a numeric value, or
                    813: .Cm none
                    814: to use the operating system default.
1.131     djm       815: This option may take one or two arguments, separated by whitespace.
1.129     djm       816: If one argument is specified, it is used as the packet class unconditionally.
                    817: If two values are specified, the first is automatically selected for
                    818: interactive sessions and the second for non-interactive sessions.
                    819: The default is
1.264     job       820: .Cm af21
1.265     jmc       821: (Low-Latency Data)
1.129     djm       822: for interactive sessions and
1.264     job       823: .Cm cs1
1.265     jmc       824: (Lower Effort)
1.129     djm       825: for non-interactive sessions.
1.171     jmc       826: .It Cm KbdInteractiveAuthentication
                    827: Specifies whether to allow keyboard-interactive authentication.
                    828: The argument to this keyword must be
1.237     jmc       829: .Cm yes
1.171     jmc       830: or
1.237     jmc       831: .Cm no .
1.171     jmc       832: The default is to use whatever value
                    833: .Cm ChallengeResponseAuthentication
                    834: is set to
                    835: (by default
1.237     jmc       836: .Cm yes ) .
1.1       stevesk   837: .It Cm KerberosAuthentication
1.24      markus    838: Specifies whether the password provided by the user for
1.1       stevesk   839: .Cm PasswordAuthentication
1.24      markus    840: will be validated through the Kerberos KDC.
1.1       stevesk   841: To use this option, the server needs a
                    842: Kerberos servtab which allows the verification of the KDC's identity.
1.52      jmc       843: The default is
1.237     jmc       844: .Cm no .
1.29      dtucker   845: .It Cm KerberosGetAFSToken
1.45      djm       846: If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
1.29      dtucker   847: an AFS token before accessing the user's home directory.
1.52      jmc       848: The default is
1.237     jmc       849: .Cm no .
1.1       stevesk   850: .It Cm KerberosOrLocalPasswd
1.52      jmc       851: If password authentication through Kerberos fails then
1.1       stevesk   852: the password will be validated via any additional local mechanism
                    853: such as
                    854: .Pa /etc/passwd .
1.52      jmc       855: The default is
1.237     jmc       856: .Cm yes .
1.1       stevesk   857: .It Cm KerberosTicketCleanup
                    858: Specifies whether to automatically destroy the user's ticket cache
                    859: file on logout.
1.52      jmc       860: The default is
1.237     jmc       861: .Cm yes .
1.127     djm       862: .It Cm KexAlgorithms
                    863: Specifies the available KEX (Key Exchange) algorithms.
                    864: Multiple algorithms must be comma-separated.
1.208     djm       865: Alternately if the specified value begins with a
                    866: .Sq +
                    867: character, then the specified methods will be appended to the default set
                    868: instead of replacing them.
1.242     djm       869: If the specified value begins with a
                    870: .Sq -
                    871: character, then the specified methods (including wildcards) will be removed
                    872: from the default set instead of replacing them.
1.173     naddy     873: The supported algorithms are:
                    874: .Pp
                    875: .Bl -item -compact -offset indent
                    876: .It
1.234     djm       877: curve25519-sha256
                    878: .It
1.173     naddy     879: curve25519-sha256@libssh.org
                    880: .It
                    881: diffie-hellman-group1-sha1
                    882: .It
                    883: diffie-hellman-group14-sha1
                    884: .It
1.263     djm       885: diffie-hellman-group14-sha256
                    886: .It
                    887: diffie-hellman-group16-sha512
                    888: .It
                    889: diffie-hellman-group18-sha512
                    890: .It
1.173     naddy     891: diffie-hellman-group-exchange-sha1
                    892: .It
                    893: diffie-hellman-group-exchange-sha256
                    894: .It
                    895: ecdh-sha2-nistp256
                    896: .It
                    897: ecdh-sha2-nistp384
                    898: .It
                    899: ecdh-sha2-nistp521
                    900: .El
                    901: .Pp
                    902: The default is:
1.170     dtucker   903: .Bd -literal -offset indent
1.234     djm       904: curve25519-sha256,curve25519-sha256@libssh.org,
1.170     dtucker   905: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
                    906: diffie-hellman-group-exchange-sha256,
1.263     djm       907: diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,
                    908: diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
1.170     dtucker   909: .Ed
1.188     djm       910: .Pp
1.237     jmc       911: The list of available key exchange algorithms may also be obtained using
                    912: .Qq ssh -Q kex .
1.1       stevesk   913: .It Cm ListenAddress
                    914: Specifies the local addresses
1.52      jmc       915: .Xr sshd 8
1.1       stevesk   916: should listen on.
                    917: The following forms may be used:
                    918: .Pp
                    919: .Bl -item -offset indent -compact
                    920: .It
                    921: .Cm ListenAddress
                    922: .Sm off
1.259     jmc       923: .Ar hostname | address
1.1       stevesk   924: .Sm on
1.260     jmc       925: .Op Cm rdomain Ar domain
1.1       stevesk   926: .It
                    927: .Cm ListenAddress
                    928: .Sm off
1.259     jmc       929: .Ar hostname : port
1.1       stevesk   930: .Sm on
1.260     jmc       931: .Op Cm rdomain Ar domain
1.256     djm       932: .It
                    933: .Cm ListenAddress
                    934: .Sm off
1.259     jmc       935: .Ar IPv4_address : port
1.256     djm       936: .Sm on
1.260     jmc       937: .Op Cm rdomain Ar domain
1.1       stevesk   938: .It
                    939: .Cm ListenAddress
                    940: .Sm off
1.259     jmc       941: .Oo Ar hostname | address Oc : Ar port
1.1       stevesk   942: .Sm on
1.260     jmc       943: .Op Cm rdomain Ar domain
1.1       stevesk   944: .El
                    945: .Pp
1.256     djm       946: The optional
                    947: .Cm rdomain
                    948: qualifier requests
                    949: .Xr sshd 8
                    950: listen in an explicit routing domain.
1.1       stevesk   951: If
                    952: .Ar port
                    953: is not specified,
1.200     dtucker   954: sshd will listen on the address and all
1.1       stevesk   955: .Cm Port
1.17      jmc       956: options specified.
1.256     djm       957: The default is to listen on all local addresses on the current default
                    958: routing domain.
1.15      jmc       959: Multiple
1.1       stevesk   960: .Cm ListenAddress
1.17      jmc       961: options are permitted.
1.256     djm       962: For more information on routing domains, see
1.259     jmc       963: .Xr rdomain 4 .
1.1       stevesk   964: .It Cm LoginGraceTime
                    965: The server disconnects after this time if the user has not
                    966: successfully logged in.
                    967: If the value is 0, there is no time limit.
1.12      stevesk   968: The default is 120 seconds.
1.1       stevesk   969: .It Cm LogLevel
                    970: Gives the verbosity level that is used when logging messages from
1.53      jmc       971: .Xr sshd 8 .
1.1       stevesk   972: The possible values are:
1.52      jmc       973: QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1.15      jmc       974: The default is INFO.
                    975: DEBUG and DEBUG1 are equivalent.
                    976: DEBUG2 and DEBUG3 each specify higher levels of debugging output.
                    977: Logging with a DEBUG level violates the privacy of users and is not recommended.
1.1       stevesk   978: .It Cm MACs
                    979: Specifies the available MAC (message authentication code) algorithms.
1.219     jmc       980: The MAC algorithm is used for data integrity protection.
1.1       stevesk   981: Multiple algorithms must be comma-separated.
1.208     djm       982: If the specified value begins with a
                    983: .Sq +
                    984: character, then the specified algorithms will be appended to the default set
                    985: instead of replacing them.
1.242     djm       986: If the specified value begins with a
                    987: .Sq -
                    988: character, then the specified algorithms (including wildcards) will be removed
                    989: from the default set instead of replacing them.
1.208     djm       990: .Pp
1.152     markus    991: The algorithms that contain
1.237     jmc       992: .Qq -etm
1.152     markus    993: calculate the MAC after encryption (encrypt-then-mac).
                    994: These are considered safer and their use recommended.
1.173     naddy     995: The supported MACs are:
                    996: .Pp
                    997: .Bl -item -compact -offset indent
                    998: .It
                    999: hmac-md5
                   1000: .It
                   1001: hmac-md5-96
                   1002: .It
                   1003: hmac-sha1
                   1004: .It
                   1005: hmac-sha1-96
                   1006: .It
                   1007: hmac-sha2-256
                   1008: .It
                   1009: hmac-sha2-512
                   1010: .It
                   1011: umac-64@openssh.com
                   1012: .It
                   1013: umac-128@openssh.com
                   1014: .It
                   1015: hmac-md5-etm@openssh.com
                   1016: .It
                   1017: hmac-md5-96-etm@openssh.com
                   1018: .It
                   1019: hmac-sha1-etm@openssh.com
                   1020: .It
                   1021: hmac-sha1-96-etm@openssh.com
                   1022: .It
                   1023: hmac-sha2-256-etm@openssh.com
                   1024: .It
                   1025: hmac-sha2-512-etm@openssh.com
                   1026: .It
                   1027: umac-64-etm@openssh.com
                   1028: .It
                   1029: umac-128-etm@openssh.com
                   1030: .El
                   1031: .Pp
1.52      jmc      1032: The default is:
1.77      jmc      1033: .Bd -literal -offset indent
1.152     markus   1034: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
                   1035: hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
1.217     djm      1036: hmac-sha1-etm@openssh.com,
1.173     naddy    1037: umac-64@openssh.com,umac-128@openssh.com,
1.217     djm      1038: hmac-sha2-256,hmac-sha2-512,hmac-sha1
1.77      jmc      1039: .Ed
1.188     djm      1040: .Pp
1.237     jmc      1041: The list of available MAC algorithms may also be obtained using
                   1042: .Qq ssh -Q mac .
1.60      dtucker  1043: .It Cm Match
1.61      jmc      1044: Introduces a conditional block.
1.65      dtucker  1045: If all of the criteria on the
1.60      dtucker  1046: .Cm Match
1.65      dtucker  1047: line are satisfied, the keywords on the following lines override those
                   1048: set in the global section of the config file, until either another
1.60      dtucker  1049: .Cm Match
1.65      dtucker  1050: line or the end of the file.
1.172     djm      1051: If a keyword appears in multiple
                   1052: .Cm Match
1.177     sobrado  1053: blocks that are satisfied, only the first instance of the keyword is
1.172     djm      1054: applied.
1.91      djm      1055: .Pp
1.61      jmc      1056: The arguments to
1.60      dtucker  1057: .Cm Match
1.163     dtucker  1058: are one or more criteria-pattern pairs or the single token
                   1059: .Cm All
                   1060: which matches all criteria.
1.60      dtucker  1061: The available criteria are
                   1062: .Cm User ,
1.69      dtucker  1063: .Cm Group ,
1.60      dtucker  1064: .Cm Host ,
1.139     dtucker  1065: .Cm LocalAddress ,
                   1066: .Cm LocalPort ,
1.258     djm      1067: .Cm RDomain ,
1.60      dtucker  1068: and
1.258     djm      1069: .Cm Address
                   1070: (with
                   1071: .Cm RDomain
                   1072: representing the
                   1073: .Xr rdomain 4
                   1074: on which the connection was received.)
                   1075: .Pp
1.91      djm      1076: The match patterns may consist of single entries or comma-separated
                   1077: lists and may use the wildcard and negation operators described in the
1.237     jmc      1078: .Sx PATTERNS
                   1079: section of
1.92      djm      1080: .Xr ssh_config 5 .
1.91      djm      1081: .Pp
                   1082: The patterns in an
                   1083: .Cm Address
                   1084: criteria may additionally contain addresses to match in CIDR
1.237     jmc      1085: address/masklen format,
                   1086: such as 192.0.2.0/24 or 2001:db8::/32.
1.91      djm      1087: Note that the mask length provided must be consistent with the address -
                   1088: it is an error to specify a mask length that is too long for the address
1.93      jmc      1089: or one with bits set in this host portion of the address.
1.237     jmc      1090: For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
1.91      djm      1091: .Pp
1.60      dtucker  1092: Only a subset of keywords may be used on the lines following a
                   1093: .Cm Match
                   1094: keyword.
                   1095: Available keywords are
1.142     jmc      1096: .Cm AcceptEnv ,
1.99      okan     1097: .Cm AllowAgentForwarding ,
1.142     jmc      1098: .Cm AllowGroups ,
1.193     djm      1099: .Cm AllowStreamLocalForwarding ,
1.62      dtucker  1100: .Cm AllowTcpForwarding ,
1.141     markus   1101: .Cm AllowUsers ,
1.149     djm      1102: .Cm AuthenticationMethods ,
1.146     djm      1103: .Cm AuthorizedKeysCommand ,
                   1104: .Cm AuthorizedKeysCommandUser ,
1.147     jmc      1105: .Cm AuthorizedKeysFile ,
1.214     djm      1106: .Cm AuthorizedPrincipalsCommand ,
                   1107: .Cm AuthorizedPrincipalsCommandUser ,
1.123     djm      1108: .Cm AuthorizedPrincipalsFile ,
1.72      dtucker  1109: .Cm Banner ,
1.85      djm      1110: .Cm ChrootDirectory ,
1.238     markus   1111: .Cm ClientAliveCountMax ,
                   1112: .Cm ClientAliveInterval ,
1.141     markus   1113: .Cm DenyGroups ,
                   1114: .Cm DenyUsers ,
1.67      dtucker  1115: .Cm ForceCommand ,
1.194     djm      1116: .Cm GatewayPorts ,
1.193     djm      1117: .Cm GSSAPIAuthentication ,
1.189     djm      1118: .Cm HostbasedAcceptedKeyTypes ,
1.87      djm      1119: .Cm HostbasedAuthentication ,
1.123     djm      1120: .Cm HostbasedUsesNameFromPacketOnly ,
1.193     djm      1121: .Cm IPQoS ,
1.74      jmc      1122: .Cm KbdInteractiveAuthentication ,
1.72      dtucker  1123: .Cm KerberosAuthentication ,
1.245     djm      1124: .Cm LogLevel ,
1.95      dtucker  1125: .Cm MaxAuthTries ,
1.94      dtucker  1126: .Cm MaxSessions ,
1.72      dtucker  1127: .Cm PasswordAuthentication ,
1.97      djm      1128: .Cm PermitEmptyPasswords ,
1.66      dtucker  1129: .Cm PermitOpen ,
1.79      dtucker  1130: .Cm PermitRootLogin ,
1.164     djm      1131: .Cm PermitTTY ,
1.123     djm      1132: .Cm PermitTunnel ,
1.174     djm      1133: .Cm PermitUserRC ,
1.189     djm      1134: .Cm PubkeyAcceptedKeyTypes ,
1.107     dtucker  1135: .Cm PubkeyAuthentication ,
1.159     dtucker  1136: .Cm RekeyLimit ,
1.193     djm      1137: .Cm RevokedKeys ,
1.257     djm      1138: .Cm RDomain ,
1.193     djm      1139: .Cm StreamLocalBindMask ,
                   1140: .Cm StreamLocalBindUnlink ,
                   1141: .Cm TrustedUserCAKeys ,
1.66      dtucker  1142: .Cm X11DisplayOffset ,
1.101     djm      1143: .Cm X11Forwarding
1.60      dtucker  1144: and
1.102     djm      1145: .Cm X11UseLocalHost .
1.33      dtucker  1146: .It Cm MaxAuthTries
                   1147: Specifies the maximum number of authentication attempts permitted per
1.35      jmc      1148: connection.
                   1149: Once the number of failures reaches half this value,
                   1150: additional failures are logged.
                   1151: The default is 6.
1.90      djm      1152: .It Cm MaxSessions
1.216     djm      1153: Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
                   1154: sessions permitted per network connection.
                   1155: Multiple sessions may be established by clients that support connection
                   1156: multiplexing.
                   1157: Setting
                   1158: .Cm MaxSessions
                   1159: to 1 will effectively disable session multiplexing, whereas setting it to 0
                   1160: will prevent all shell, login and subsystem sessions while still permitting
                   1161: forwarding.
1.90      djm      1162: The default is 10.
1.1       stevesk  1163: .It Cm MaxStartups
                   1164: Specifies the maximum number of concurrent unauthenticated connections to the
1.52      jmc      1165: SSH daemon.
1.1       stevesk  1166: Additional connections will be dropped until authentication succeeds or the
                   1167: .Cm LoginGraceTime
                   1168: expires for a connection.
1.156     dtucker  1169: The default is 10:30:100.
1.1       stevesk  1170: .Pp
                   1171: Alternatively, random early drop can be enabled by specifying
                   1172: the three colon separated values
1.237     jmc      1173: start:rate:full (e.g. "10:30:60").
1.53      jmc      1174: .Xr sshd 8
1.237     jmc      1175: will refuse connection attempts with a probability of rate/100 (30%)
                   1176: if there are currently start (10) unauthenticated connections.
1.1       stevesk  1177: The probability increases linearly and all connection attempts
1.237     jmc      1178: are refused if the number of unauthenticated connections reaches full (60).
1.1       stevesk  1179: .It Cm PasswordAuthentication
                   1180: Specifies whether password authentication is allowed.
                   1181: The default is
1.237     jmc      1182: .Cm yes .
1.1       stevesk  1183: .It Cm PermitEmptyPasswords
                   1184: When password authentication is allowed, it specifies whether the
                   1185: server allows login to accounts with empty password strings.
                   1186: The default is
1.237     jmc      1187: .Cm no .
1.62      dtucker  1188: .It Cm PermitOpen
                   1189: Specifies the destinations to which TCP port forwarding is permitted.
                   1190: The forwarding specification must be one of the following forms:
                   1191: .Pp
                   1192: .Bl -item -offset indent -compact
                   1193: .It
                   1194: .Cm PermitOpen
                   1195: .Sm off
                   1196: .Ar host : port
                   1197: .Sm on
                   1198: .It
                   1199: .Cm PermitOpen
                   1200: .Sm off
                   1201: .Ar IPv4_addr : port
                   1202: .Sm on
                   1203: .It
                   1204: .Cm PermitOpen
                   1205: .Sm off
                   1206: .Ar \&[ IPv6_addr \&] : port
                   1207: .Sm on
                   1208: .El
                   1209: .Pp
1.68      dtucker  1210: Multiple forwards may be specified by separating them with whitespace.
1.62      dtucker  1211: An argument of
1.237     jmc      1212: .Cm any
1.62      dtucker  1213: can be used to remove all restrictions and permit any forwarding requests.
1.140     dtucker  1214: An argument of
1.237     jmc      1215: .Cm none
1.140     dtucker  1216: can be used to prohibit all forwarding requests.
1.227     jmc      1217: The wildcard
1.237     jmc      1218: .Sq *
1.227     jmc      1219: can be used for host or port to allow all hosts or ports, respectively.
1.63      jmc      1220: By default all port forwarding requests are permitted.
1.1       stevesk  1221: .It Cm PermitRootLogin
1.38      jmc      1222: Specifies whether root can log in using
1.1       stevesk  1223: .Xr ssh 1 .
                   1224: The argument must be
1.237     jmc      1225: .Cm yes ,
                   1226: .Cm prohibit-password ,
                   1227: .Cm forced-commands-only ,
1.1       stevesk  1228: or
1.237     jmc      1229: .Cm no .
1.1       stevesk  1230: The default is
1.237     jmc      1231: .Cm prohibit-password .
1.1       stevesk  1232: .Pp
                   1233: If this option is set to
1.237     jmc      1234: .Cm prohibit-password
1.255     jmc      1235: (or its deprecated alias,
                   1236: .Cm without-password ) ,
1.210     deraadt  1237: password and keyboard-interactive authentication are disabled for root.
1.1       stevesk  1238: .Pp
                   1239: If this option is set to
1.237     jmc      1240: .Cm forced-commands-only ,
1.1       stevesk  1241: root login with public key authentication will be allowed,
                   1242: but only if the
                   1243: .Ar command
                   1244: option has been specified
                   1245: (which may be useful for taking remote backups even if root login is
1.17      jmc      1246: normally not allowed).
                   1247: All other authentication methods are disabled for root.
1.1       stevesk  1248: .Pp
                   1249: If this option is set to
1.237     jmc      1250: .Cm no ,
1.38      jmc      1251: root is not allowed to log in.
1.231     jmc      1252: .It Cm PermitTTY
                   1253: Specifies whether
                   1254: .Xr pty 4
                   1255: allocation is permitted.
                   1256: The default is
1.237     jmc      1257: .Cm yes .
1.46      reyk     1258: .It Cm PermitTunnel
                   1259: Specifies whether
                   1260: .Xr tun 4
                   1261: device forwarding is allowed.
1.47      reyk     1262: The argument must be
1.237     jmc      1263: .Cm yes ,
                   1264: .Cm point-to-point
1.58      stevesk  1265: (layer 3),
1.237     jmc      1266: .Cm ethernet
1.58      stevesk  1267: (layer 2), or
1.237     jmc      1268: .Cm no .
1.58      stevesk  1269: Specifying
1.237     jmc      1270: .Cm yes
1.58      stevesk  1271: permits both
1.237     jmc      1272: .Cm point-to-point
1.58      stevesk  1273: and
1.237     jmc      1274: .Cm ethernet .
1.46      reyk     1275: The default is
1.237     jmc      1276: .Cm no .
1.178     djm      1277: .Pp
                   1278: Independent of this setting, the permissions of the selected
                   1279: .Xr tun 4
                   1280: device must allow access to the user.
1.6       markus   1281: .It Cm PermitUserEnvironment
                   1282: Specifies whether
                   1283: .Pa ~/.ssh/environment
1.9       stevesk  1284: and
1.6       markus   1285: .Cm environment=
                   1286: options in
                   1287: .Pa ~/.ssh/authorized_keys
1.9       stevesk  1288: are processed by
1.52      jmc      1289: .Xr sshd 8 .
1.6       markus   1290: The default is
1.237     jmc      1291: .Cm no .
1.9       stevesk  1292: Enabling environment processing may enable users to bypass access
                   1293: restrictions in some configurations using mechanisms such as
                   1294: .Ev LD_PRELOAD .
1.174     djm      1295: .It Cm PermitUserRC
                   1296: Specifies whether any
                   1297: .Pa ~/.ssh/rc
                   1298: file is executed.
                   1299: The default is
1.237     jmc      1300: .Cm yes .
1.1       stevesk  1301: .It Cm PidFile
1.4       stevesk  1302: Specifies the file that contains the process ID of the
1.195     dtucker  1303: SSH daemon, or
1.237     jmc      1304: .Cm none
1.195     dtucker  1305: to not write one.
1.1       stevesk  1306: The default is
                   1307: .Pa /var/run/sshd.pid .
                   1308: .It Cm Port
                   1309: Specifies the port number that
1.52      jmc      1310: .Xr sshd 8
1.1       stevesk  1311: listens on.
                   1312: The default is 22.
                   1313: Multiple options of this type are permitted.
                   1314: See also
                   1315: .Cm ListenAddress .
                   1316: .It Cm PrintLastLog
                   1317: Specifies whether
1.52      jmc      1318: .Xr sshd 8
1.36      jaredy   1319: should print the date and time of the last user login when a user logs
                   1320: in interactively.
1.1       stevesk  1321: The default is
1.237     jmc      1322: .Cm yes .
1.1       stevesk  1323: .It Cm PrintMotd
                   1324: Specifies whether
1.52      jmc      1325: .Xr sshd 8
1.1       stevesk  1326: should print
                   1327: .Pa /etc/motd
                   1328: when a user logs in interactively.
                   1329: (On some systems it is also printed by the shell,
                   1330: .Pa /etc/profile ,
                   1331: or equivalent.)
                   1332: The default is
1.237     jmc      1333: .Cm yes .
1.189     djm      1334: .It Cm PubkeyAcceptedKeyTypes
                   1335: Specifies the key types that will be accepted for public key authentication
                   1336: as a comma-separated pattern list.
1.208     djm      1337: Alternately if the specified value begins with a
                   1338: .Sq +
                   1339: character, then the specified key types will be appended to the default set
                   1340: instead of replacing them.
1.242     djm      1341: If the specified value begins with a
                   1342: .Sq -
                   1343: character, then the specified key types (including wildcards) will be removed
                   1344: from the default set instead of replacing them.
1.206     markus   1345: The default for this option is:
                   1346: .Bd -literal -offset 3n
                   1347: ecdsa-sha2-nistp256-cert-v01@openssh.com,
                   1348: ecdsa-sha2-nistp384-cert-v01@openssh.com,
                   1349: ecdsa-sha2-nistp521-cert-v01@openssh.com,
                   1350: ssh-ed25519-cert-v01@openssh.com,
                   1351: ssh-rsa-cert-v01@openssh.com,
                   1352: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
1.220     djm      1353: ssh-ed25519,ssh-rsa
1.206     markus   1354: .Ed
                   1355: .Pp
1.237     jmc      1356: The list of available key types may also be obtained using
                   1357: .Qq ssh -Q key .
1.1       stevesk  1358: .It Cm PubkeyAuthentication
                   1359: Specifies whether public key authentication is allowed.
                   1360: The default is
1.237     jmc      1361: .Cm yes .
1.159     dtucker  1362: .It Cm RekeyLimit
                   1363: Specifies the maximum amount of data that may be transmitted before the
                   1364: session key is renegotiated, optionally followed a maximum amount of
                   1365: time that may pass before the session key is renegotiated.
                   1366: The first argument is specified in bytes and may have a suffix of
                   1367: .Sq K ,
                   1368: .Sq M ,
                   1369: or
                   1370: .Sq G
                   1371: to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
                   1372: The default is between
                   1373: .Sq 1G
                   1374: and
                   1375: .Sq 4G ,
                   1376: depending on the cipher.
                   1377: The optional second value is specified in seconds and may use any of the
                   1378: units documented in the
                   1379: .Sx TIME FORMATS
1.160     jmc      1380: section.
1.159     dtucker  1381: The default value for
                   1382: .Cm RekeyLimit
                   1383: is
1.237     jmc      1384: .Cm default none ,
1.159     dtucker  1385: which means that rekeying is performed after the cipher's default amount
                   1386: of data has been sent or received and no time based rekeying is done.
1.118     djm      1387: .It Cm RevokedKeys
1.195     dtucker  1388: Specifies revoked public keys file, or
1.237     jmc      1389: .Cm none
1.195     dtucker  1390: to not use one.
1.118     djm      1391: Keys listed in this file will be refused for public key authentication.
                   1392: Note that if this file is not readable, then public key authentication will
                   1393: be refused for all users.
1.154     djm      1394: Keys may be specified as a text file, listing one public key per line, or as
                   1395: an OpenSSH Key Revocation List (KRL) as generated by
1.155     jmc      1396: .Xr ssh-keygen 1 .
1.161     jmc      1397: For more information on KRLs, see the KEY REVOCATION LISTS section in
1.154     djm      1398: .Xr ssh-keygen 1 .
1.257     djm      1399: .It Cm RDomain
                   1400: Specifies an explicit routing domain that is applied after authentication
                   1401: has completed.
1.259     jmc      1402: The user session, as well and any forwarded or listening IP sockets,
                   1403: will be bound to this
1.257     djm      1404: .Xr rdomain 4 .
                   1405: If the routing domain is set to
                   1406: .Cm \&%D ,
1.259     jmc      1407: then the domain in which the incoming connection was received will be applied.
1.175     millert  1408: .It Cm StreamLocalBindMask
                   1409: Sets the octal file creation mode mask
                   1410: .Pq umask
                   1411: used when creating a Unix-domain socket file for local or remote
                   1412: port forwarding.
                   1413: This option is only used for port forwarding to a Unix-domain socket file.
                   1414: .Pp
                   1415: The default value is 0177, which creates a Unix-domain socket file that is
                   1416: readable and writable only by the owner.
                   1417: Note that not all operating systems honor the file mode on Unix-domain
                   1418: socket files.
                   1419: .It Cm StreamLocalBindUnlink
                   1420: Specifies whether to remove an existing Unix-domain socket file for local
                   1421: or remote port forwarding before creating a new one.
                   1422: If the socket file already exists and
                   1423: .Cm StreamLocalBindUnlink
                   1424: is not enabled,
                   1425: .Nm sshd
                   1426: will be unable to forward the port to the Unix-domain socket file.
                   1427: This option is only used for port forwarding to a Unix-domain socket file.
                   1428: .Pp
                   1429: The argument must be
1.237     jmc      1430: .Cm yes
1.175     millert  1431: or
1.237     jmc      1432: .Cm no .
1.175     millert  1433: The default is
1.237     jmc      1434: .Cm no .
1.1       stevesk  1435: .It Cm StrictModes
                   1436: Specifies whether
1.52      jmc      1437: .Xr sshd 8
1.1       stevesk  1438: should check file modes and ownership of the
                   1439: user's files and home directory before accepting login.
                   1440: This is normally desirable because novices sometimes accidentally leave their
                   1441: directory or files world-writable.
                   1442: The default is
1.237     jmc      1443: .Cm yes .
1.112     djm      1444: Note that this does not apply to
                   1445: .Cm ChrootDirectory ,
                   1446: whose permissions and ownership are checked unconditionally.
1.1       stevesk  1447: .It Cm Subsystem
1.51      jmc      1448: Configures an external subsystem (e.g. file transfer daemon).
1.59      djm      1449: Arguments should be a subsystem name and a command (with optional arguments)
                   1450: to execute upon subsystem request.
1.80      djm      1451: .Pp
1.1       stevesk  1452: The command
1.237     jmc      1453: .Cm sftp-server
                   1454: implements the SFTP file transfer subsystem.
1.80      djm      1455: .Pp
                   1456: Alternately the name
1.237     jmc      1457: .Cm internal-sftp
                   1458: implements an in-process SFTP server.
1.80      djm      1459: This may simplify configurations using
                   1460: .Cm ChrootDirectory
                   1461: to force a different filesystem root on clients.
                   1462: .Pp
1.1       stevesk  1463: By default no subsystems are defined.
                   1464: .It Cm SyslogFacility
                   1465: Gives the facility code that is used when logging messages from
1.53      jmc      1466: .Xr sshd 8 .
1.1       stevesk  1467: The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
                   1468: LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
                   1469: The default is AUTH.
1.27      markus   1470: .It Cm TCPKeepAlive
                   1471: Specifies whether the system should send TCP keepalive messages to the
                   1472: other side.
                   1473: If they are sent, death of the connection or crash of one
                   1474: of the machines will be properly noticed.
                   1475: However, this means that
                   1476: connections will die if the route is down temporarily, and some people
                   1477: find it annoying.
                   1478: On the other hand, if TCP keepalives are not sent,
                   1479: sessions may hang indefinitely on the server, leaving
1.237     jmc      1480: .Qq ghost
1.27      markus   1481: users and consuming server resources.
                   1482: .Pp
                   1483: The default is
1.237     jmc      1484: .Cm yes
1.27      markus   1485: (to send TCP keepalive messages), and the server will notice
                   1486: if the network goes down or the client host crashes.
                   1487: This avoids infinitely hanging sessions.
                   1488: .Pp
                   1489: To disable TCP keepalive messages, the value should be set to
1.237     jmc      1490: .Cm no .
1.118     djm      1491: .It Cm TrustedUserCAKeys
                   1492: Specifies a file containing public keys of certificate authorities that are
1.195     dtucker  1493: trusted to sign user certificates for authentication, or
1.237     jmc      1494: .Cm none
1.195     dtucker  1495: to not use one.
1.119     jmc      1496: Keys are listed one per line; empty lines and comments starting with
1.118     djm      1497: .Ql #
                   1498: are allowed.
                   1499: If a certificate is presented for authentication and has its signing CA key
                   1500: listed in this file, then it may be used for authentication for any user
                   1501: listed in the certificate's principals list.
                   1502: Note that certificates that lack a list of principals will not be permitted
                   1503: for authentication using
                   1504: .Cm TrustedUserCAKeys .
1.161     jmc      1505: For more details on certificates, see the CERTIFICATES section in
1.118     djm      1506: .Xr ssh-keygen 1 .
1.18      markus   1507: .It Cm UseDNS
                   1508: Specifies whether
1.52      jmc      1509: .Xr sshd 8
1.207     djm      1510: should look up the remote host name, and to check that
1.18      markus   1511: the resolved host name for the remote IP address maps back to the
                   1512: very same IP address.
1.207     djm      1513: .Pp
                   1514: If this option is set to
1.237     jmc      1515: .Cm no
1.207     djm      1516: (the default) then only addresses and not host names may be used in
1.221     djm      1517: .Pa ~/.ssh/authorized_keys
1.207     djm      1518: .Cm from
                   1519: and
1.211     jmc      1520: .Nm
1.207     djm      1521: .Cm Match
                   1522: .Cm Host
                   1523: directives.
1.137     djm      1524: .It Cm VersionAddendum
                   1525: Optionally specifies additional text to append to the SSH protocol banner
                   1526: sent by the server upon connection.
                   1527: The default is
1.237     jmc      1528: .Cm none .
1.1       stevesk  1529: .It Cm X11DisplayOffset
                   1530: Specifies the first display number available for
1.52      jmc      1531: .Xr sshd 8 Ns 's
1.1       stevesk  1532: X11 forwarding.
1.52      jmc      1533: This prevents sshd from interfering with real X11 servers.
1.1       stevesk  1534: The default is 10.
                   1535: .It Cm X11Forwarding
                   1536: Specifies whether X11 forwarding is permitted.
1.13      stevesk  1537: The argument must be
1.237     jmc      1538: .Cm yes
1.13      stevesk  1539: or
1.237     jmc      1540: .Cm no .
1.1       stevesk  1541: The default is
1.237     jmc      1542: .Cm no .
1.13      stevesk  1543: .Pp
                   1544: When X11 forwarding is enabled, there may be additional exposure to
                   1545: the server and to client displays if the
1.52      jmc      1546: .Xr sshd 8
1.13      stevesk  1547: proxy display is configured to listen on the wildcard address (see
1.237     jmc      1548: .Cm X11UseLocalhost ) ,
                   1549: though this is not the default.
1.13      stevesk  1550: Additionally, the authentication spoofing and authentication data
                   1551: verification and substitution occur on the client side.
                   1552: The security risk of using X11 forwarding is that the client's X11
1.52      jmc      1553: display server may be exposed to attack when the SSH client requests
1.13      stevesk  1554: forwarding (see the warnings for
                   1555: .Cm ForwardX11
                   1556: in
1.19      jmc      1557: .Xr ssh_config 5 ) .
1.13      stevesk  1558: A system administrator may have a stance in which they want to
                   1559: protect clients that may expose themselves to attack by unwittingly
                   1560: requesting X11 forwarding, which can warrant a
1.237     jmc      1561: .Cm no
1.13      stevesk  1562: setting.
                   1563: .Pp
                   1564: Note that disabling X11 forwarding does not prevent users from
                   1565: forwarding X11 traffic, as users can always install their own forwarders.
1.1       stevesk  1566: .It Cm X11UseLocalhost
                   1567: Specifies whether
1.52      jmc      1568: .Xr sshd 8
1.1       stevesk  1569: should bind the X11 forwarding server to the loopback address or to
1.15      jmc      1570: the wildcard address.
                   1571: By default,
1.52      jmc      1572: sshd binds the forwarding server to the loopback address and sets the
1.1       stevesk  1573: hostname part of the
                   1574: .Ev DISPLAY
                   1575: environment variable to
1.237     jmc      1576: .Cm localhost .
1.8       stevesk  1577: This prevents remote hosts from connecting to the proxy display.
1.1       stevesk  1578: However, some older X11 clients may not function with this
                   1579: configuration.
                   1580: .Cm X11UseLocalhost
                   1581: may be set to
1.237     jmc      1582: .Cm no
1.1       stevesk  1583: to specify that the forwarding server should be bound to the wildcard
                   1584: address.
                   1585: The argument must be
1.237     jmc      1586: .Cm yes
1.1       stevesk  1587: or
1.237     jmc      1588: .Cm no .
1.1       stevesk  1589: The default is
1.237     jmc      1590: .Cm yes .
1.1       stevesk  1591: .It Cm XAuthLocation
1.11      stevesk  1592: Specifies the full pathname of the
1.1       stevesk  1593: .Xr xauth 1
1.195     dtucker  1594: program, or
1.237     jmc      1595: .Cm none
1.195     dtucker  1596: to not use one.
1.1       stevesk  1597: The default is
                   1598: .Pa /usr/X11R6/bin/xauth .
                   1599: .El
1.55      jmc      1600: .Sh TIME FORMATS
1.53      jmc      1601: .Xr sshd 8
1.1       stevesk  1602: command-line arguments and configuration file options that specify time
                   1603: may be expressed using a sequence of the form:
                   1604: .Sm off
1.7       stevesk  1605: .Ar time Op Ar qualifier ,
1.1       stevesk  1606: .Sm on
                   1607: where
                   1608: .Ar time
                   1609: is a positive integer value and
                   1610: .Ar qualifier
                   1611: is one of the following:
                   1612: .Pp
                   1613: .Bl -tag -width Ds -compact -offset indent
1.64      jmc      1614: .It Aq Cm none
1.1       stevesk  1615: seconds
                   1616: .It Cm s | Cm S
                   1617: seconds
                   1618: .It Cm m | Cm M
                   1619: minutes
                   1620: .It Cm h | Cm H
                   1621: hours
                   1622: .It Cm d | Cm D
                   1623: days
                   1624: .It Cm w | Cm W
                   1625: weeks
                   1626: .El
                   1627: .Pp
                   1628: Each member of the sequence is added together to calculate
                   1629: the total time value.
                   1630: .Pp
                   1631: Time format examples:
                   1632: .Pp
                   1633: .Bl -tag -width Ds -compact -offset indent
                   1634: .It 600
                   1635: 600 seconds (10 minutes)
                   1636: .It 10m
                   1637: 10 minutes
                   1638: .It 1h30m
                   1639: 1 hour 30 minutes (90 minutes)
                   1640: .El
1.235     jmc      1641: .Sh TOKENS
                   1642: Arguments to some keywords can make use of tokens,
                   1643: which are expanded at runtime:
                   1644: .Pp
                   1645: .Bl -tag -width XXXX -offset indent -compact
                   1646: .It %%
                   1647: A literal
                   1648: .Sq % .
1.257     djm      1649: .It \&%D
                   1650: The routing domain in which the incoming connection was received.
1.235     jmc      1651: .It %F
                   1652: The fingerprint of the CA key.
                   1653: .It %f
                   1654: The fingerprint of the key or certificate.
                   1655: .It %h
                   1656: The home directory of the user.
                   1657: .It %i
                   1658: The key ID in the certificate.
                   1659: .It %K
                   1660: The base64-encoded CA key.
                   1661: .It %k
                   1662: The base64-encoded key or certificate for authentication.
                   1663: .It %s
                   1664: The serial number of the certificate.
                   1665: .It \&%T
                   1666: The type of the CA key.
                   1667: .It %t
                   1668: The key or certificate type.
1.268   ! jmc      1669: .It \&%U
        !          1670: The numeric user ID of the target user.
1.235     jmc      1671: .It %u
                   1672: The username.
                   1673: .El
                   1674: .Pp
                   1675: .Cm AuthorizedKeysCommand
1.267     djm      1676: accepts the tokens %%, %f, %h, %k, %t, %U and %u.
1.235     jmc      1677: .Pp
                   1678: .Cm AuthorizedKeysFile
1.267     djm      1679: accepts the tokens %%, %h, %U and %u.
1.235     jmc      1680: .Pp
                   1681: .Cm AuthorizedPrincipalsCommand
1.267     djm      1682: accepts the tokens %%, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U and %u.
1.235     jmc      1683: .Pp
                   1684: .Cm AuthorizedPrincipalsFile
1.267     djm      1685: accepts the tokens %%, %h, and %U %u.
1.235     jmc      1686: .Pp
                   1687: .Cm ChrootDirectory
1.267     djm      1688: accepts the tokens %%, %h, and %U %u.
1.257     djm      1689: .Pp
                   1690: .Cm RoutingDomain
                   1691: accepts the token %D.
1.1       stevesk  1692: .Sh FILES
                   1693: .Bl -tag -width Ds
                   1694: .It Pa /etc/ssh/sshd_config
                   1695: Contains configuration data for
1.53      jmc      1696: .Xr sshd 8 .
1.1       stevesk  1697: This file should be writable by root only, but it is recommended
                   1698: (though not necessary) that it be world-readable.
                   1699: .El
1.19      jmc      1700: .Sh SEE ALSO
1.237     jmc      1701: .Xr sftp-server 8 ,
1.19      jmc      1702: .Xr sshd 8
1.1       stevesk  1703: .Sh AUTHORS
1.237     jmc      1704: .An -nosplit
1.1       stevesk  1705: OpenSSH is a derivative of the original and free
1.237     jmc      1706: ssh 1.2.12 release by
                   1707: .An Tatu Ylonen .
                   1708: .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
                   1709: .An Theo de Raadt
                   1710: and
                   1711: .An Dug Song
1.1       stevesk  1712: removed many bugs, re-added newer features and
                   1713: created OpenSSH.
1.237     jmc      1714: .An Markus Friedl
                   1715: contributed the support for SSH protocol versions 1.5 and 2.0.
                   1716: .An Niels Provos
                   1717: and
                   1718: .An Markus Friedl
                   1719: contributed support for privilege separation.