1SSHD_CONFIG(5)              BSD File Formats Manual             SSHD_CONFIG(5)
2

NAME

4     sshd_config — OpenSSH SSH daemon configuration file
5

SYNOPSIS

7     /etc/ssh/sshd_config
8

DESCRIPTION

10     sshd(8) reads configuration data from /etc/ssh/sshd_config (or the file
11     specified with -f on the command line).  The file contains keyword-argu‐
12     ment pairs, one per line.  Lines starting with ‘#’ and empty lines are
13     interpreted as comments.  Arguments may optionally be enclosed in double
14     quotes (") in order to represent arguments containing spaces.
15
16     The possible keywords and their meanings are as follows (note that key‐
17     words are case-insensitive and arguments are case-sensitive):
18
19     AcceptEnv
20             Specifies what environment variables sent by the client will be
21             copied into the session's environ(7).  See SendEnv in
22             ssh_config(5) for how to configure the client.  Note that envi‐
23             ronment passing is only supported for protocol 2, and that the
24             TERM environment variable is always sent whenever the client
25             requests a pseudo-terminal as it is required by the protocol.
26             Variables are specified by name, which may contain the wildcard
27             characters ‘*’ and ‘?’.  Multiple environment variables may be
28             separated by whitespace or spread across multiple AcceptEnv
29             directives.  Be warned that some environment variables could be
30             used to bypass restricted user environments.  For this reason,
31             care should be taken in the use of this directive.  The default
32             is not to accept any environment variables.
33
34     AddressFamily
35             Specifies which address family should be used by sshd(8).  Valid
36             arguments are “any”, “inet” (use IPv4 only), or “inet6” (use IPv6
37             only).  The default is “any”.
38
39     AllowAgentForwarding
40             Specifies whether ssh-agent(1) forwarding is permitted.  The
41             default is “yes”.  Note that disabling agent forwarding does not
42             improve security unless users are also denied shell access, as
43             they can always install their own forwarders.
44
45     AllowGroups
46             This keyword can be followed by a list of group name patterns,
47             separated by spaces.  If specified, login is allowed only for
48             users whose primary group or supplementary group list matches one
49             of the patterns.  Only group names are valid; a numerical group
50             ID is not recognized.  By default, login is allowed for all
51             groups.  The allow/deny directives are processed in the following
52             order: DenyUsers, AllowUsers, DenyGroups, and finally
53             AllowGroups.  All of the specified user and group tests must suc‐
54             ceed, before user is allowed to log in.
55
56             See PATTERNS in ssh_config(5) for more information on patterns.
57
58     AllowTcpForwarding
59             Specifies whether TCP forwarding is permitted.  The default is
60             “yes”.  Note that disabling TCP forwarding does not improve secu‐
61             rity unless users are also denied shell access, as they can
62             always install their own forwarders.
63
64     AllowUsers
65             This keyword can be followed by a list of user name patterns,
66             separated by spaces.  If specified, login is allowed only for
67             user names that match one of the patterns.  Only user names are
68             valid; a numerical user ID is not recognized.  By default, login
69             is allowed for all users.  If the pattern takes the form
70             USER@HOST then USER and HOST are separately checked, restricting
71             logins to particular users from particular hosts.  The allow/deny
72             directives are processed in the following order: DenyUsers,
73             AllowUsers, DenyGroups, and finally AllowGroups.  All of the
74             specified user and group tests must succeed, before user is
75             allowed to log in.
76
77             See PATTERNS in ssh_config(5) for more information on patterns.
78
79     AuthorizedKeysFile
80             Specifies the file that contains the public keys that can be used
81             for user authentication.  AuthorizedKeysFile may contain tokens
82             of the form %T which are substituted during connection setup.
83             The following tokens are defined: %% is replaced by a literal
84             '%', %h is replaced by the home directory of the user being
85             authenticated, and %u is replaced by the username of that user.
86             After expansion, AuthorizedKeysFile is taken to be an absolute
87             path or one relative to the user's home directory.  The default
88             is “.ssh/authorized_keys”.
89
90     AuthorizedPrincipalsFile
91             Specifies a file that lists principal names that are accepted for
92             certificate authentication.  When using certificates signed by a
93             key listed in TrustedUserCAKeys, this file lists names, one of
94             which must appear in the certificate for it to be accepted for
95             authentication.  Names are listed one per line; empty lines and
96             comments starting with ‘#’ are ignored.
97
98             AuthorizedPrincipalsFile may contain tokens of the form %T which
99             are substituted during connection setup.  The following tokens
100             are defined: %% is replaced by a literal '%', %h is replaced by
101             the home directory of the user being authenticated, and %u is
102             replaced by the username of that user.  After expansion,
103             AuthorizedPrincipalsFile is taken to be an absolute path or one
104             relative to the user's home directory.
105
106             The default is not to use a principals file – in this case, the
107             username of the user must appear in a certificate's principals
108             list for it to be accepted.  Note that AuthorizedPrincipalsFile
109             is only used when authentication proceeds using a CA listed in
110             TrustedUserCAKeys and is not consulted for certification authori‐
111             ties trusted via ~/.ssh/authorized_keys, though the principals=
112             key option offers a similar facility (see sshd(8) for details).
113
114     Banner  The contents of the specified file are sent to the remote user
115             before authentication is allowed.  If the argument is “none” then
116             no banner is displayed.  This option is only available for proto‐
117             col version 2.  By default, no banner is displayed.
118
119     ChallengeResponseAuthentication
120             Specifies whether challenge-response authentication is allowed
121             (e.g. via PAM or though authentication styles supported in
122             login.conf(5)) The default is “yes”.
123
124     ChrootDirectory
125             Specifies a path to chroot(2) to after authentication.  This
126             path, and all its components, must be root-owned directories that
127             are not writable by any other user or group.  After the chroot,
128             sshd(8) changes the working directory to the user's home direc‐
129             tory.
130
131             The path may contain the following tokens that are expanded at
132             runtime once the connecting user has been authenticated: %% is
133             replaced by a literal '%', %h is replaced by the home directory
134             of the user being authenticated, and %u is replaced by the user‐
135             name of that user.
136
137             The ChrootDirectory must contain the necessary files and directo‐
138             ries to support the user's session.  For an interactive session
139             this requires at least a shell, typically sh(1), and basic /dev
140             nodes such as null(4), zero(4), stdin(4), stdout(4), stderr(4),
141             arandom(4) and tty(4) devices.  For file transfer sessions using
142             “sftp”, no additional configuration of the environment is neces‐
143             sary if the in-process sftp server is used, though sessions which
144             use logging do require /dev/log inside the chroot directory (see
145             sftp-server(8) for details).
146
147             The default is not to chroot(2).
148
149     Ciphers
150             Specifies the ciphers allowed for protocol version 2.  Multiple
151             ciphers must be comma-separated.  The supported ciphers are
152             “3des-cbc”, “aes128-cbc”, “aes192-cbc”, “aes256-cbc”,
153             “aes128-ctr”, “aes192-ctr”, “aes256-ctr”, “arcfour128”,
154             “arcfour256”, “arcfour”, “blowfish-cbc”,
155             “rijndael-cbc@lysator.liu.se”, and “cast128-cbc”.  The default
156             is:
157
158                aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,
159                aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,
160                aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
161
162     ClientAliveCountMax
163             Sets the number of client alive messages (see below) which may be
164             sent without sshd(8) receiving any messages back from the client.
165             If this threshold is reached while client alive messages are
166             being sent, sshd will disconnect the client, terminating the ses‐
167             sion.  It is important to note that the use of client alive mes‐
168             sages is very different from TCPKeepAlive (below).  The client
169             alive messages are sent through the encrypted channel and there‐
170             fore will not be spoofable.  The TCP keepalive option enabled by
171             TCPKeepAlive is spoofable.  The client alive mechanism is valu‐
172             able when the client or server depend on knowing when a connec‐
173             tion has become inactive.
174
175             The default value is 3.  If ClientAliveInterval (see below) is
176             set to 15, and ClientAliveCountMax is left at the default, unre‐
177             sponsive SSH clients will be disconnected after approximately 45
178             seconds.  This option applies to protocol version 2 only.
179
180     ClientAliveInterval
181             Sets a timeout interval in seconds after which if no data has
182             been received from the client, sshd(8) will send a message
183             through the encrypted channel to request a response from the
184             client.  The default is 0, indicating that these messages will
185             not be sent to the client.  This option applies to protocol ver‐
186             sion 2 only.
187
188     Compression
189             Specifies whether compression is allowed, or delayed until the
190             user has authenticated successfully.  The argument must be “yes”,
191             “delayed”, or “no”.  The default is “delayed”.
192
193     DenyGroups
194             This keyword can be followed by a list of group name patterns,
195             separated by spaces.  Login is disallowed for users whose primary
196             group or supplementary group list matches one of the patterns.
197             Only group names are valid; a numerical group ID is not recog‐
198             nized.  By default, login is allowed for all groups.  The
199             allow/deny directives are processed in the following order:
200             DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.  All
201             of the specified user and group tests must succeed, before user
202             is allowed to log in.
203
204             See PATTERNS in ssh_config(5) for more information on patterns.
205
206     DenyUsers
207             This keyword can be followed by a list of user name patterns,
208             separated by spaces.  Login is disallowed for user names that
209             match one of the patterns.  Only user names are valid; a numeri‐
210             cal user ID is not recognized.  By default, login is allowed for
211             all users.  If the pattern takes the form USER@HOST then USER and
212             HOST are separately checked, restricting logins to particular
213             users from particular hosts.  The allow/deny directives are pro‐
214             cessed in the following order: DenyUsers, AllowUsers, DenyGroups,
215             and finally AllowGroups.  All of the specified user and group
216             tests must succeed, before user is allowed to log in.
217
218             See PATTERNS in ssh_config(5) for more information on patterns.
219
220     ForceCommand
221             Forces the execution of the command specified by ForceCommand,
222             ignoring any command supplied by the client and ~/.ssh/rc if
223             present.  The command is invoked by using the user's login shell
224             with the -c option.  This applies to shell, command, or subsystem
225             execution.  It is most useful inside a Match block.  The command
226             originally supplied by the client is available in the
227             SSH_ORIGINAL_COMMAND environment variable.  Specifying a command
228             of “internal-sftp” will force the use of an in-process sftp
229             server that requires no support files when used with
230             ChrootDirectory.
231
232     GatewayPorts
233             Specifies whether remote hosts are allowed to connect to ports
234             forwarded for the client.  By default, sshd(8) binds remote port
235             forwardings to the loopback address.  This prevents other remote
236             hosts from connecting to forwarded ports.  GatewayPorts can be
237             used to specify that sshd should allow remote port forwardings to
238             bind to non-loopback addresses, thus allowing other hosts to con‐
239             nect.  The argument may be “no” to force remote port forwardings
240             to be available to the local host only, “yes” to force remote
241             port forwardings to bind to the wildcard address, or
242             “clientspecified” to allow the client to select the address to
243             which the forwarding is bound.  The default is “no”.
244
245     GSSAPIAuthentication
246             Specifies whether user authentication based on GSSAPI is allowed.
247             The default is “no”.  Note that this option applies to protocol
248             version 2 only.
249
250     GSSAPIKeyExchange
251             Specifies whether key exchange based on GSSAPI is allowed. GSSAPI
252             key exchange doesn't rely on ssh keys to verify host identity.
253             The default is “no”.  Note that this option applies to protocol
254             version 2 only.
255
256     GSSAPICleanupCredentials
257             Specifies whether to automatically destroy the user's credentials
258             cache on logout.  The default is “yes”.  Note that this option
259             applies to protocol version 2 only.
260
261     GSSAPIStrictAcceptorCheck
262             Determines whether to be strict about the identity of the GSSAPI
263             acceptor a client authenticates against. If “yes” then the client
264             must authenticate against the host service on the current host‐
265             name. If “no” then the client may authenticate against any ser‐
266             vice key stored in the machine's default store. This facility is
267             provided to assist with operation on multi homed machines.  The
268             default is “yes”.  Note that this option applies only to protocol
269             version 2 GSSAPI connections, and setting it to “no” may only
270             work with recent Kerberos GSSAPI libraries.
271
272     GSSAPIStoreCredentialsOnRekey
273             Controls whether the user's GSSAPI credentials should be updated
274             following a successful connection rekeying. This option can be
275             used to accepted renewed or updated credentials from a compatible
276             client. The default is “no”.
277
278     GSSAPIKexAlgorithms
279             The list of key exchange algorithms that are accepted by GSSAPI
280             key exchange. Possible values are
281
282                gss-group1-sha1-,
283                gss-group14-sha1-,
284                gss-gex-sha1-
285
286             The default is
287             “gss-group1-sha1-,gss-group14-sha1-,gss-gex-sha1-”.  This option
288             only applies to protocol version 2 connections using GSSAPI.
289
290     HostbasedAuthentication
291             Specifies whether rhosts or /etc/hosts.equiv authentication
292             together with successful public key client host authentication is
293             allowed (host-based authentication).  This option is similar to
294             RhostsRSAAuthentication and applies to protocol version 2 only.
295             The default is “no”.
296
297     HostbasedUsesNameFromPacketOnly
298             Specifies whether or not the server will attempt to perform a
299             reverse name lookup when matching the name in the ~/.shosts,
300             ~/.rhosts, and /etc/hosts.equiv files during
301             HostbasedAuthentication.  A setting of “yes” means that sshd(8)
302             uses the name supplied by the client rather than attempting to
303             resolve the name from the TCP connection itself.  The default is
304             “no”.
305
306     HostCertificate
307             Specifies a file containing a public host certificate.  The cer‐
308             tificate's public key must match a private host key already spec‐
309             ified by HostKey.  The default behaviour of sshd(8) is not to
310             load any certificates.
311
312     HostKey
313             Specifies a file containing a private host key used by SSH.  The
314             default is /etc/ssh/ssh_host_key for protocol version 1, and
315             /etc/ssh/ssh_host_dsa_key and /etc/ssh/ssh_host_rsa_key for pro‐
316             tocol version 2.  Note that sshd(8) will refuse to use a file if
317             it is group/world-accessible.  It is possible to have multiple
318             host key files.  “rsa1” keys are used for version 1 and “dsa”,
319             “ecdsa” or “rsa” are used for version 2 of the SSH protocol.
320
321     IgnoreRhosts
322             Specifies that .rhosts and .shosts files will not be used in
323             RhostsRSAAuthentication or HostbasedAuthentication.
324
325             /etc/hosts.equiv and /etc/ssh/shosts.equiv are still used.  The
326             default is “yes”.
327
328     IgnoreUserKnownHosts
329             Specifies whether sshd(8) should ignore the user's
330             ~/.ssh/known_hosts during RhostsRSAAuthentication or
331             HostbasedAuthentication.  The default is “no”.
332
333     KbdInteractiveAuthentication
334             Specifies whether to allow keyboard-interactive authentication.
335             The argument to this keyword must be “yes” or “no”.  The default
336             is to use whatever value ChallengeResponseAuthentication is set
337             to (by default “yes”).
338
339     KerberosAuthentication
340             Specifies whether the password provided by the user for
341             PasswordAuthentication will be validated through the Kerberos
342             KDC.  To use this option, the server needs a Kerberos servtab
343             which allows the verification of the KDC's identity.  The default
344             is “no”.
345
346     KerberosGetAFSToken
347             If AFS is active and the user has a Kerberos 5 TGT, attempt to
348             acquire an AFS token before accessing the user's home directory.
349             The default is “no”.
350
351     KerberosOrLocalPasswd
352             If password authentication through Kerberos fails then the pass‐
353             word will be validated via any additional local mechanism such as
354             /etc/passwd.  The default is “yes”.
355
356     KerberosTicketCleanup
357             Specifies whether to automatically destroy the user's ticket
358             cache file on logout.  The default is “yes”.
359
360     KerberosUseKuserok
361             Specifies whether to look at .k5login file for user's aliases.
362             The default is “yes”.
363
364     KexAlgorithms
365             Specifies the available KEX (Key Exchange) algorithms.  Multiple
366             algorithms must be comma-separated.  The default is
367             “diffie-hellman-group-exchange-sha256”,
368             “diffie-hellman-group-exchange-sha1”,
369             “diffie-hellman-group14-sha1”, “diffie-hellman-group1-sha1”.
370
371     KeyRegenerationInterval
372             In protocol version 1, the ephemeral server key is automatically
373             regenerated after this many seconds (if it has been used).  The
374             purpose of regeneration is to prevent decrypting captured ses‐
375             sions by later breaking into the machine and stealing the keys.
376             The key is never stored anywhere.  If the value is 0, the key is
377             never regenerated.  The default is 3600 (seconds).
378
379     ListenAddress
380             Specifies the local addresses sshd(8) should listen on.  The fol‐
381             lowing forms may be used:
382
383                   ListenAddress host|IPv4_addr|IPv6_addr
384                   ListenAddress host|IPv4_addr:port
385                   ListenAddress [host|IPv6_addr]:port
386
387             If port is not specified, sshd will listen on the address and all
388             prior Port options specified.  The default is to listen on all
389             local addresses.  Multiple ListenAddress options are permitted.
390             Additionally, any Port options must precede this option for non-
391             port qualified addresses.
392
393     LoginGraceTime
394             The server disconnects after this time if the user has not suc‐
395             cessfully logged in.  If the value is 0, there is no time limit.
396             The default is 120 seconds.
397
398     LogLevel
399             Gives the verbosity level that is used when logging messages from
400             sshd(8).  The possible values are: QUIET, FATAL, ERROR, INFO,
401             VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.  The default is INFO.
402             DEBUG and DEBUG1 are equivalent.  DEBUG2 and DEBUG3 each specify
403             higher levels of debugging output.  Logging with a DEBUG level
404             violates the privacy of users and is not recommended.
405
406     MACs    Specifies the available MAC (message authentication code) algo‐
407             rithms.  The MAC algorithm is used in protocol version 2 for data
408             integrity protection.  Multiple algorithms must be comma-sepa‐
409             rated.  The default is:
410
411                   hmac-md5,hmac-sha1,umac-64@openssh.com,
412                   hmac-ripemd160,hmac-sha1-96,hmac-md5-96,
413                   hmac-sha2-256,hmac-sha2-512,hmac-ripemd160@openssh.com
414
415     Match   Introduces a conditional block.  If all of the criteria on the
416             Match line are satisfied, the keywords on the following lines
417             override those set in the global section of the config file,
418             until either another Match line or the end of the file.  If a
419             keyword appears in multiple Match blocks that are satisfied, only
420             the first instance of the keyword is applied.
421
422             The arguments to Match are one or more criteria-pattern pairs.
423             The available criteria are User, Group, Host, LocalAddress,
424             LocalPort, and Address.  The match patterns may consist of single
425             entries or comma-separated lists and may use the wildcard and
426             negation operators described in the PATTERNS section of
427             ssh_config(5).
428
429             The patterns in an Address criteria may additionally contain
430             addresses to match in CIDR address/masklen format, e.g.
431             “192.0.2.0/24” or “3ffe:ffff::/32”.  Note that the mask length
432             provided must be consistent with the address - it is an error to
433             specify a mask length that is too long for the address or one
434             with bits set in this host portion of the address.  For example,
435             “192.0.2.0/33” and “192.0.2.0/8” respectively.
436
437             Only a subset of keywords may be used on the lines following a
438             Match keyword.  Available keywords are AllowAgentForwarding,
439             AllowTcpForwarding, Banner, ChrootDirectory, ForceCommand,
440             GatewayPorts, GSSAPIAuthentication, HostbasedAuthentication,
441             KbdInteractiveAuthentication, KerberosAuthentication,
442             KerberosUseKuserok, MaxAuthTries, MaxSessions,
443             PubkeyAuthentication, AuthorizedKeysCommand,
444             AuthorizedKeysCommandRunAs, PasswordAuthentication,
445             PermitEmptyPasswords, PermitOpen, PermitRootLogin,
446             RequiredAuthentications1, RequiredAuthentications2,
447             RhostsRSAAuthentication, RSAAuthentication, X11DisplayOffset,
448             X11Forwarding and X11UseLocalHost.
449
450     MaxAuthTries
451             Specifies the maximum number of authentication attempts permitted
452             per connection.  Once the number of failures reaches half this
453             value, additional failures are logged.  The default is 6.
454
455     MaxSessions
456             Specifies the maximum number of open sessions permitted per net‐
457             work connection.  The default is 10.
458
459     MaxStartups
460             Specifies the maximum number of concurrent unauthenticated con‐
461             nections to the SSH daemon.  Additional connections will be
462             dropped until authentication succeeds or the LoginGraceTime
463             expires for a connection.  The default is 10:30:100.
464
465             Alternatively, random early drop can be enabled by specifying the
466             three colon separated values “start:rate:full” (e.g. "10:30:60").
467             sshd(8) will refuse connection attempts with a probability of
468             “rate/100” (30%) if there are currently “start” (10) unauthenti‐
469             cated connections.  The probability increases linearly and all
470             connection attempts are refused if the number of unauthenticated
471             connections reaches “full” (60).
472
473     PasswordAuthentication
474             Specifies whether password authentication is allowed.  The
475             default is “yes”.
476
477     PermitEmptyPasswords
478             When password authentication is allowed, it specifies whether the
479             server allows login to accounts with empty password strings.  The
480             default is “no”.
481
482     PermitOpen
483             Specifies the destinations to which TCP port forwarding is per‐
484             mitted.  The forwarding specification must be one of the follow‐
485             ing forms:
486
487                   PermitOpen host:port
488                   PermitOpen IPv4_addr:port
489                   PermitOpen [IPv6_addr]:port
490
491             Multiple forwards may be specified by separating them with white‐
492             space.  An argument of “any” can be used to remove all restric‐
493             tions and permit any forwarding requests.  By default all port
494             forwarding requests are permitted.
495
496     PermitRootLogin
497             Specifies whether root can log in using ssh(1).  The argument
498             must be “yes”, “without-password”, “forced-commands-only”, or
499             “no”.  The default is “yes”.
500
501             If this option is set to “without-password”, password authentica‐
502             tion is disabled for root.
503
504             If this option is set to “forced-commands-only”, root login with
505             public key authentication will be allowed, but only if the
506             command option has been specified (which may be useful for taking
507             remote backups even if root login is normally not allowed).  All
508             other authentication methods are disabled for root.
509
510             If this option is set to “no”, root is not allowed to log in.
511
512     PermitTunnel
513             Specifies whether tun(4) device forwarding is allowed.  The argu‐
514             ment must be “yes”, “point-to-point” (layer 3), “ethernet” (layer
515             2), or “no”.  Specifying “yes” permits both “point-to-point” and
516             “ethernet”.  The default is “no”.
517
518     PermitUserEnvironment
519             Specifies whether ~/.ssh/environment and environment= options in
520             ~/.ssh/authorized_keys are processed by sshd(8).  The default is
521             “no”.  Enabling environment processing may enable users to bypass
522             access restrictions in some configurations using mechanisms such
523             as LD_PRELOAD.
524
525     PidFile
526             Specifies the file that contains the process ID of the SSH dae‐
527             mon.  The default is /var/run/sshd.pid.
528
529     Port    Specifies the port number that sshd(8) listens on.  The default
530             is 22.  Multiple options of this type are permitted.  See also
531             ListenAddress.
532
533     PrintLastLog
534             Specifies whether sshd(8) should print the date and time of the
535             last user login when a user logs in interactively.  The default
536             is “yes”.
537
538     PrintMotd
539             Specifies whether sshd(8) should print /etc/motd when a user logs
540             in interactively.  (On some systems it is also printed by the
541             shell, /etc/profile, or equivalent.)  The default is “yes”.
542
543     Protocol
544             Specifies the protocol versions sshd(8) supports.  The possible
545             values are ‘1’ and ‘2’.  Multiple versions must be comma-sepa‐
546             rated.  The default is “2,1”.  Note that the order of the proto‐
547             col list does not indicate preference, because the client selects
548             among multiple protocol versions offered by the server.  Specify‐
549             ing “2,1” is identical to “1,2”.
550
551     PubkeyAuthentication
552             Specifies whether public key authentication is allowed.  The
553             default is “yes”.  Note that this option applies to protocol ver‐
554             sion 2 only.
555
556     AuthorizedKeysCommand
557             Specifies a program to be used for lookup of the user's public
558             keys.  The program will be invoked with its first argument the
559             name of the user being authorized, and should produce on standard
560             output AuthorizedKeys lines (see AUTHORIZED_KEYS in sshd(8)).  By
561             default (or when set to the empty string) there is no Authorized‐
562             KeysCommand run.  If the AuthorizedKeysCommand does not success‐
563             fully authorize the user, authorization falls through to the
564             AuthorizedKeysFile.  Note that this option has an effect only
565             with PubkeyAuthentication turned on.
566
567     AuthorizedKeysCommandRunAs
568             Specifies the user under whose account the AuthorizedKeysCommand
569             is run. Empty string (the default value) means the user being
570             authorized is used.
571
572     RequiredAuthentications[12]
573             Specifies required methods of authentications that has to succeed
574             before authorizing the connection.  (RequiredAuthentication1 for
575             Protocol version 1, and RequiredAuthentication2 for v2)
576
577                 RequiredAuthentications1 method[,method...]
578                 RequiredAuthentications2 method[,method...]
579
580             Example 1:
581
582                 RequiredAuthentications2 password,hostbased
583
584             Example 2:
585
586                 RequiredAuthentications2 publickey,password
587
588             Available methods:
589
590                password, keyboard-interactive, publickey, hostbased, gssapi-keyex, gssapi-with-mic
591
592     RevokedKeys
593             Specifies a list of revoked public keys.  Keys listed in this
594             file will be refused for public key authentication.  Note that if
595             this file is not readable, then public key authentication will be
596             refused for all users.
597
598     RhostsRSAAuthentication
599             Specifies whether rhosts or /etc/hosts.equiv authentication
600             together with successful RSA host authentication is allowed.  The
601             default is “no”.  This option applies to protocol version 1 only.
602
603     RSAAuthentication
604             Specifies whether pure RSA authentication is allowed.  The
605             default is “yes”.  This option applies to protocol version 1
606             only.
607
608     ServerKeyBits
609             Defines the number of bits in the ephemeral protocol version 1
610             server key.  The minimum value is 512, and the default is 1024.
611
612     ShowPatchLevel
613             Specifies whether sshd will display the patch level of the binary
614             in the identification string.  The patch level is set at compile-
615             time.  The default is “no”.  This option applies to protocol ver‐
616             sion 1 only.
617
618     StrictModes
619             Specifies whether sshd(8) should check file modes and ownership
620             of the user's files and home directory before accepting login.
621             This is normally desirable because novices sometimes accidentally
622             leave their directory or files world-writable.  The default is
623             “yes”.
624
625     Subsystem
626             Configures an external subsystem (e.g. file transfer daemon).
627             Arguments should be a subsystem name and a command (with optional
628             arguments) to execute upon subsystem request.
629
630             The command sftp-server(8) implements the “sftp” file transfer
631             subsystem.
632
633             Alternately the name “internal-sftp” implements an in-process
634             “sftp” server.  This may simplify configurations using
635             ChrootDirectory to force a different filesystem root on clients.
636
637             By default no subsystems are defined.  Note that this option
638             applies to protocol version 2 only.
639
640     SyslogFacility
641             Gives the facility code that is used when logging messages from
642             sshd(8).  The possible values are: DAEMON, USER, AUTH, AUTHPRIV,
643             LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
644             The default is AUTH.
645
646     TCPKeepAlive
647             Specifies whether the system should send TCP keepalive messages
648             to the other side.  If they are sent, death of the connection or
649             crash of one of the machines will be properly noticed.  However,
650             this means that connections will die if the route is down tempo‐
651             rarily, and some people find it annoying.  On the other hand, if
652             TCP keepalives are not sent, sessions may hang indefinitely on
653             the server, leaving “ghost” users and consuming server resources.
654
655             The default is “yes” (to send TCP keepalive messages), and the
656             server will notice if the network goes down or the client host
657             crashes.  This avoids infinitely hanging sessions.
658
659             To disable TCP keepalive messages, the value should be set to
660             “no”.
661
662     TrustedUserCAKeys
663             Specifies a file containing public keys of certificate authori‐
664             ties that are trusted sign user certificates for authentication.
665             Keys are listed one per line, empty lines and comments starting
666             with ‘#’ are allowed.  If a certificate is presented for authen‐
667             tication and has its signing CA key listed in this file, then it
668             may be used for authentication for any user listed in the cer‐
669             tificate's principals list.  Note that certificates that lack a
670             list of principals will not be permitted for authentication using
671             TrustedUserCAKeys.  For more details in certificates, please see
672             the CERTIFICATES section in ssh-keygen(1).
673
674     UseDNS  Specifies whether sshd(8) should look up the remote host name and
675             check that the resolved host name for the remote IP address maps
676             back to the very same IP address.  The default is “yes”.
677
678     UseLogin
679             Specifies whether login(1) is used for interactive login ses‐
680             sions.  The default is “no”.  Note that login(1) is never used
681             for remote command execution.  Note also, that if this is
682             enabled, X11Forwarding will be disabled because login(1) does not
683             know how to handle xauth(1) cookies.  If UsePrivilegeSeparation
684             is specified, it will be disabled after authentication.
685
686     UsePAM  Enables the Pluggable Authentication Module interface.  If set to
687             “yes” this will enable PAM authentication using
688             ChallengeResponseAuthentication and PasswordAuthentication in
689             addition to PAM account and session module processing for all
690             authentication types.
691
692             Because PAM challenge-response authentication usually serves an
693             equivalent role to password authentication, you should disable
694             either PasswordAuthentication or ChallengeResponseAuthentication.
695
696             If UsePAM is enabled, you will not be able to run sshd(8) as a
697             non-root user.  The default is “no”.
698
699     UsePrivilegeSeparation
700             Specifies whether sshd(8) separates privileges by creating an
701             unprivileged child process to deal with incoming network traffic.
702             After successful authentication, another process will be created
703             that has the privilege of the authenticated user.  The goal of
704             privilege separation is to prevent privilege escalation by con‐
705             taining any corruption within the unprivileged processes.  The
706             default is “yes”.
707
708     X11DisplayOffset
709             Specifies the first display number available for sshd(8)'s X11
710             forwarding.  This prevents sshd from interfering with real X11
711             servers.  The default is 10.
712
713     X11Forwarding
714             Specifies whether X11 forwarding is permitted.  The argument must
715             be “yes” or “no”.  The default is “no”.
716
717             When X11 forwarding is enabled, there may be additional exposure
718             to the server and to client displays if the sshd(8) proxy display
719             is configured to listen on the wildcard address (see
720             X11UseLocalhost below), though this is not the default.  Addi‐
721             tionally, the authentication spoofing and authentication data
722             verification and substitution occur on the client side.  The
723             security risk of using X11 forwarding is that the client's X11
724             display server may be exposed to attack when the SSH client
725             requests forwarding (see the warnings for ForwardX11 in
726             ssh_config(5)).  A system administrator may have a stance in
727             which they want to protect clients that may expose themselves to
728             attack by unwittingly requesting X11 forwarding, which can war‐
729             rant a “no” setting.
730
731             Note that disabling X11 forwarding does not prevent users from
732             forwarding X11 traffic, as users can always install their own
733             forwarders.  X11 forwarding is automatically disabled if UseLogin
734             is enabled.
735
736     X11UseLocalhost
737             Specifies whether sshd(8) should bind the X11 forwarding server
738             to the loopback address or to the wildcard address.  By default,
739             sshd binds the forwarding server to the loopback address and sets
740             the hostname part of the DISPLAY environment variable to
741             “localhost”.  This prevents remote hosts from connecting to the
742             proxy display.  However, some older X11 clients may not function
743             with this configuration.  X11UseLocalhost may be set to “no” to
744             specify that the forwarding server should be bound to the wild‐
745             card address.  The argument must be “yes” or “no”.  The default
746             is “yes”.
747
748     XAuthLocation
749             Specifies the full pathname of the xauth(1) program.  The default
750             is /usr/bin/xauth.
751

TIME FORMATS

753     sshd(8) command-line arguments and configuration file options that spec‐
754     ify time may be expressed using a sequence of the form: time[qualifier],
755     where time is a positive integer value and qualifier is one of the fol‐
756     lowing:
757
758none⟩  seconds
759           s | S   seconds
760           m | M   minutes
761           h | H   hours
762           d | D   days
763           w | W   weeks
764
765     Each member of the sequence is added together to calculate the total time
766     value.
767
768     Time format examples:
769
770           600     600 seconds (10 minutes)
771           10m     10 minutes
772           1h30m   1 hour 30 minutes (90 minutes)
773

FILES

775     /etc/ssh/sshd_config
776             Contains configuration data for sshd(8).  This file should be
777             writable by root only, but it is recommended (though not neces‐
778             sary) that it be world-readable.
779

SEE ALSO

781     sshd(8)
782

AUTHORS

784     OpenSSH is a derivative of the original and free ssh 1.2.12 release by
785     Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
786     de Raadt and Dug Song removed many bugs, re-added newer features and cre‐
787     ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
788     versions 1.5 and 2.0.  Niels Provos and Markus Friedl contributed support
789     for privilege separation.
790
791BSD                              June 21, 2019                             BSD
Impressum