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