1SSHD_CONFIG(5) BSD File Formats Manual SSHD_CONFIG(5)
2
4 sshd_config — OpenSSH daemon configuration file
5
7 sshd(8) reads configuration data from /etc/ssh/sshd_config (or the file
8 specified with -f on the command line). The file contains keyword-argu‐
9 ment pairs, one per line. Unless noted otherwise, for each keyword, the
10 first obtained value will be used. Lines starting with ‘#’ and empty
11 lines are interpreted as comments. Arguments may optionally be enclosed
12 in double quotes (") in order to represent arguments containing spaces.
13
14 The possible keywords and their meanings are as follows (note that key‐
15 words are case-insensitive and arguments are case-sensitive):
16
17 AcceptEnv
18 Specifies what environment variables sent by the client will be
19 copied into the session's environ(7). See SendEnv and SetEnv in
20 ssh_config(5) for how to configure the client. The TERM environ‐
21 ment variable is always accepted whenever the client requests a
22 pseudo-terminal as it is required by the protocol. Variables are
23 specified by name, which may contain the wildcard characters ‘*’
24 and ‘?’. Multiple environment variables may be separated by
25 whitespace or spread across multiple AcceptEnv directives. Be
26 warned that some environment variables could be used to bypass
27 restricted user environments. For this reason, care should be
28 taken in the use of this directive. The default is not to accept
29 any environment variables.
30
31 AddressFamily
32 Specifies which address family should be used by sshd(8). Valid
33 arguments are any (the default), inet (use IPv4 only), or inet6
34 (use IPv6 only).
35
36 AllowAgentForwarding
37 Specifies whether ssh-agent(1) forwarding is permitted. The de‐
38 fault is yes. Note that disabling agent forwarding does not im‐
39 prove security unless users are also denied shell access, as they
40 can always install their own forwarders.
41
42 AllowGroups
43 This keyword can be followed by a list of group name patterns,
44 separated by spaces. If specified, login is allowed only for
45 users whose primary group or supplementary group list matches one
46 of the patterns. Only group names are valid; a numerical group
47 ID is not recognized. By default, login is allowed for all
48 groups. The allow/deny groups directives are processed in the
49 following order: DenyGroups, AllowGroups.
50
51 See PATTERNS in ssh_config(5) for more information on patterns.
52 This keyword may appear multiple times in sshd_config with each
53 instance appending to the list.
54
55 AllowStreamLocalForwarding
56 Specifies whether StreamLocal (Unix-domain socket) forwarding is
57 permitted. The available options are yes (the default) or all to
58 allow StreamLocal forwarding, no to prevent all StreamLocal for‐
59 warding, local to allow local (from the perspective of ssh(1))
60 forwarding only or remote to allow remote forwarding only. Note
61 that disabling StreamLocal forwarding does not improve security
62 unless users are also denied shell access, as they can always in‐
63 stall their own forwarders.
64
65 AllowTcpForwarding
66 Specifies whether TCP forwarding is permitted. The available op‐
67 tions are yes (the default) or all to allow TCP forwarding, no to
68 prevent all TCP forwarding, local to allow local (from the per‐
69 spective of ssh(1)) forwarding only or remote to allow remote
70 forwarding only. Note that disabling TCP forwarding does not im‐
71 prove security unless users are also denied shell access, as they
72 can always install their own forwarders.
73
74 AllowUsers
75 This keyword can be followed by a list of user name patterns,
76 separated by spaces. If specified, login is allowed only for
77 user names that match one of the patterns. Only user names are
78 valid; a numerical user ID is not recognized. By default, login
79 is allowed for all users. If the pattern takes the form
80 USER@HOST then USER and HOST are separately checked, restricting
81 logins to particular users from particular hosts. HOST criteria
82 may additionally contain addresses to match in CIDR ad‐
83 dress/masklen format. The allow/deny users directives are pro‐
84 cessed in the following order: DenyUsers, AllowUsers.
85
86 See PATTERNS in ssh_config(5) for more information on patterns.
87 This keyword may appear multiple times in sshd_config with each
88 instance appending to the list.
89
90 AuthenticationMethods
91 Specifies the authentication methods that must be successfully
92 completed for a user to be granted access. This option must be
93 followed by one or more lists of comma-separated authentication
94 method names, or by the single string any to indicate the default
95 behaviour of accepting any single authentication method. If the
96 default is overridden, then successful authentication requires
97 completion of every method in at least one of these lists.
98
99 For example, "publickey,password publickey,keyboard-interactive"
100 would require the user to complete public key authentication,
101 followed by either password or keyboard interactive authentica‐
102 tion. Only methods that are next in one or more lists are of‐
103 fered at each stage, so for this example it would not be possible
104 to attempt password or keyboard-interactive authentication before
105 public key.
106
107 For keyboard interactive authentication it is also possible to
108 restrict authentication to a specific device by appending a colon
109 followed by the device identifier bsdauth or pam. depending on
110 the server configuration. For example,
111 "keyboard-interactive:bsdauth" would restrict keyboard interac‐
112 tive authentication to the bsdauth device.
113
114 If the publickey method is listed more than once, sshd(8) veri‐
115 fies that keys that have been used successfully are not reused
116 for subsequent authentications. For example,
117 "publickey,publickey" requires successful authentication using
118 two different public keys.
119
120 Note that each authentication method listed should also be ex‐
121 plicitly enabled in the configuration.
122
123 The available authentication methods are: "gssapi-with-mic",
124 "hostbased", "keyboard-interactive", "none" (used for access to
125 password-less accounts when PermitEmptyPasswords is enabled),
126 "password" and "publickey".
127
128 AuthorizedKeysCommand
129 Specifies a program to be used to look up the user's public keys.
130 The program must be owned by root, not writable by group or oth‐
131 ers and specified by an absolute path. Arguments to
132 AuthorizedKeysCommand accept the tokens described in the TOKENS
133 section. If no arguments are specified then the username of the
134 target user is used.
135
136 The program should produce on standard output zero or more lines
137 of authorized_keys output (see AUTHORIZED_KEYS in sshd(8)).
138 AuthorizedKeysCommand is tried after the usual AuthorizedKeysFile
139 files and will not be executed if a matching key is found there.
140 By default, no AuthorizedKeysCommand is run.
141
142 AuthorizedKeysCommandUser
143 Specifies the user under whose account the AuthorizedKeysCommand
144 is run. It is recommended to use a dedicated user that has no
145 other role on the host than running authorized keys commands. If
146 AuthorizedKeysCommand is specified but AuthorizedKeysCommandUser
147 is not, then sshd(8) will refuse to start.
148
149 AuthorizedKeysFile
150 Specifies the file that contains the public keys used for user
151 authentication. The format is described in the AUTHORIZED_KEYS
152 FILE FORMAT section of sshd(8). Arguments to AuthorizedKeysFile
153 accept the tokens described in the TOKENS section. After expan‐
154 sion, AuthorizedKeysFile is taken to be an absolute path or one
155 relative to the user's home directory. Multiple files may be
156 listed, separated by whitespace. Alternately this option may be
157 set to none to skip checking for user keys in files. The default
158 is ".ssh/authorized_keys .ssh/authorized_keys2".
159
160 AuthorizedPrincipalsCommand
161 Specifies a program to be used to generate the list of allowed
162 certificate principals as per AuthorizedPrincipalsFile. The pro‐
163 gram must be owned by root, not writable by group or others and
164 specified by an absolute path. Arguments to
165 AuthorizedPrincipalsCommand accept the tokens described in the
166 TOKENS section. If no arguments are specified then the username
167 of the target user is used.
168
169 The program should produce on standard output zero or more lines
170 of AuthorizedPrincipalsFile output. If either
171 AuthorizedPrincipalsCommand or AuthorizedPrincipalsFile is speci‐
172 fied, then certificates offered by the client for authentication
173 must contain a principal that is listed. By default, no
174 AuthorizedPrincipalsCommand is run.
175
176 AuthorizedPrincipalsCommandUser
177 Specifies the user under whose account the
178 AuthorizedPrincipalsCommand is run. It is recommended to use a
179 dedicated user that has no other role on the host than running
180 authorized principals commands. If AuthorizedPrincipalsCommand
181 is specified but AuthorizedPrincipalsCommandUser is not, then
182 sshd(8) will refuse to start.
183
184 AuthorizedPrincipalsFile
185 Specifies a file that lists principal names that are accepted for
186 certificate authentication. When using certificates signed by a
187 key listed in TrustedUserCAKeys, this file lists names, one of
188 which must appear in the certificate for it to be accepted for
189 authentication. Names are listed one per line preceded by key
190 options (as described in AUTHORIZED_KEYS FILE FORMAT in sshd(8)).
191 Empty lines and comments starting with ‘#’ are ignored.
192
193 Arguments to AuthorizedPrincipalsFile accept the tokens described
194 in the TOKENS section. After expansion, AuthorizedPrincipalsFile
195 is taken to be an absolute path or one relative to the user's
196 home directory. The default is none, i.e. not to use a princi‐
197 pals file – in this case, the username of the user must appear in
198 a certificate's principals list for it to be accepted.
199
200 Note that AuthorizedPrincipalsFile is only used when authentica‐
201 tion proceeds using a CA listed in TrustedUserCAKeys and is not
202 consulted for certification authorities trusted via
203 ~/.ssh/authorized_keys, though the principals= key option offers
204 a similar facility (see sshd(8) for details).
205
206 Banner The contents of the specified file are sent to the remote user
207 before authentication is allowed. If the argument is none then
208 no banner is displayed. By default, no banner is displayed.
209
210 CASignatureAlgorithms
211 The default is handled system-wide by crypto-policies(7). Infor‐
212 mation about defaults, how to modify the defaults and how to cus‐
213 tomize existing policies with sub-policies are present in manual
214 page update-crypto-policies(8).
215
216 Specifies which algorithms are allowed for signing of certifi‐
217 cates by certificate authorities (CAs). If the specified list
218 begins with a ‘+’ character, then the specified algorithms will
219 be appended to the default set instead of replacing them. If the
220 specified list begins with a ‘-’ character, then the specified
221 algorithms (including wildcards) will be removed from the default
222 set instead of replacing them.
223
224 Certificates signed using other algorithms will not be accepted
225 for public key or host-based authentication.
226
227 ChannelTimeout
228 Specifies whether and how quickly sshd(8) should close inactive
229 channels. Timeouts are specified as one or more “type=interval”
230 pairs separated by whitespace, where the “type” must be a channel
231 type name (as described in the table below), optionally contain‐
232 ing wildcard characters.
233
234 The timeout value “interval” is specified in seconds or may use
235 any of the units documented in the TIME FORMATS section. For ex‐
236 ample, “session:*=5m” would cause all sessions to terminate after
237 five minutes of inactivity. Specifying a zero value disables the
238 inactivity timeout.
239
240 The available channel types include:
241
242 agent-connection
243 Open connections to ssh-agent(1).
244
245 direct-tcpip, direct-streamlocal@openssh.com
246 Open TCP or Unix socket (respectively) connections that
247 have been established from a ssh(1) local forwarding,
248 i.e. LocalForward or DynamicForward.
249
250 forwarded-tcpip, forwarded-streamlocal@openssh.com
251 Open TCP or Unix socket (respectively) connections that
252 have been established to a sshd(8) listening on behalf of
253 a ssh(1) remote forwarding, i.e. RemoteForward.
254
255 session:command
256 Command execution sessions.
257
258 session:shell
259 Interactive shell sessions.
260
261 session:subsystem:...
262 Subsystem sessions, e.g. for sftp(1), which could be
263 identified as session:subsystem:sftp.
264
265 x11-connection
266 Open X11 forwarding sessions.
267
268 Note that in all the above cases, terminating an inactive session
269 does not guarantee to remove all resources associated with the
270 session, e.g. shell processes or X11 clients relating to the ses‐
271 sion may continue to execute.
272
273 Moreover, terminating an inactive channel or session does not
274 necessarily close the SSH connection, nor does it prevent a
275 client from requesting another channel of the same type. In par‐
276 ticular, expiring an inactive forwarding session does not prevent
277 another identical forwarding from being subsequently created.
278 See also UnusedConnectionTimeout, which may be used in conjunc‐
279 tion with this option.
280
281 The default is not to expire channels of any type for inactivity.
282
283 ChrootDirectory
284 Specifies the pathname of a directory to chroot(2) to after au‐
285 thentication. At session startup sshd(8) checks that all compo‐
286 nents of the pathname are root-owned directories which are not
287 writable by any other user or group. After the chroot, sshd(8)
288 changes the working directory to the user's home directory. Ar‐
289 guments to ChrootDirectory accept the tokens described in the
290 TOKENS section.
291
292 The ChrootDirectory must contain the necessary files and directo‐
293 ries to support the user's session. For an interactive session
294 this requires at least a shell, typically sh(1), and basic /dev
295 nodes such as null(4), zero(4), stdin(4), stdout(4), stderr(4),
296 and tty(4) devices. For file transfer sessions using SFTP no ad‐
297 ditional configuration of the environment is necessary if the in-
298 process sftp-server is used, though sessions which use logging
299 may require /dev/log inside the chroot directory on some operat‐
300 ing systems (see sftp-server(8) for details).
301
302 For safety, it is very important that the directory hierarchy be
303 prevented from modification by other processes on the system (es‐
304 pecially those outside the jail). Misconfiguration can lead to
305 unsafe environments which sshd(8) cannot detect.
306
307 The default is none, indicating not to chroot(2).
308
309 Ciphers
310 The default is handled system-wide by crypto-policies(7). Infor‐
311 mation about defaults, how to modify the defaults and how to cus‐
312 tomize existing policies with sub-policies are present in manual
313 page update-crypto-policies(8).
314
315 Specifies the ciphers allowed. Multiple ciphers must be comma-
316 separated. If the specified list begins with a ‘+’ character,
317 then the specified ciphers will be appended to the built-in
318 openssh default set instead of replacing them. If the specified
319 list begins with a ‘-’ character, then the specified ciphers (in‐
320 cluding wildcards) will be removed from the built-in openssh de‐
321 fault set instead of replacing them. If the specified list be‐
322 gins with a ‘^’ character, then the specified ciphers will be
323 placed at the head of the built-in openssh default set.
324
325 The supported ciphers are:
326
327 3des-cbc
328 aes128-cbc
329 aes192-cbc
330 aes256-cbc
331 aes128-ctr
332 aes192-ctr
333 aes256-ctr
334 aes128-gcm@openssh.com
335 aes256-gcm@openssh.com
336 chacha20-poly1305@openssh.com
337
338 The list of available ciphers may also be obtained using "ssh -Q
339 cipher".
340
341 ClientAliveCountMax
342 Sets the number of client alive messages which may be sent with‐
343 out sshd(8) receiving any messages back from the client. If this
344 threshold is reached while client alive messages are being sent,
345 sshd will disconnect the client, terminating the session. It is
346 important to note that the use of client alive messages is very
347 different from TCPKeepAlive. The client alive messages are sent
348 through the encrypted channel and therefore will not be spoofa‐
349 ble. The TCP keepalive option enabled by TCPKeepAlive is spoofa‐
350 ble. The client alive mechanism is valuable when the client or
351 server depend on knowing when a connection has become unrespon‐
352 sive.
353
354 The default value is 3. If ClientAliveInterval is set to 15, and
355 ClientAliveCountMax is left at the default, unresponsive SSH
356 clients will be disconnected after approximately 45 seconds.
357 Setting a zero ClientAliveCountMax disables connection termina‐
358 tion.
359
360 ClientAliveInterval
361 Sets a timeout interval in seconds after which if no data has
362 been received from the client, sshd(8) will send a message
363 through the encrypted channel to request a response from the
364 client. The default is 0, indicating that these messages will
365 not be sent to the client.
366
367 Compression
368 Specifies whether compression is enabled after the user has au‐
369 thenticated successfully. The argument must be yes, delayed (a
370 legacy synonym for yes) or no. The default is yes.
371
372 DenyGroups
373 This keyword can be followed by a list of group name patterns,
374 separated by spaces. Login is disallowed for users whose primary
375 group or supplementary group list matches one of the patterns.
376 Only group names are valid; a numerical group ID is not recog‐
377 nized. By default, login is allowed for all groups. The al‐
378 low/deny groups directives are processed in the following order:
379 DenyGroups, AllowGroups.
380
381 See PATTERNS in ssh_config(5) for more information on patterns.
382 This keyword may appear multiple times in sshd_config with each
383 instance appending to the list.
384
385 DenyUsers
386 This keyword can be followed by a list of user name patterns,
387 separated by spaces. Login is disallowed for user names that
388 match one of the patterns. Only user names are valid; a numeri‐
389 cal user ID is not recognized. By default, login is allowed for
390 all users. If the pattern takes the form USER@HOST then USER and
391 HOST are separately checked, restricting logins to particular
392 users from particular hosts. HOST criteria may additionally con‐
393 tain addresses to match in CIDR address/masklen format. The al‐
394 low/deny users directives are processed in the following order:
395 DenyUsers, AllowUsers.
396
397 See PATTERNS in ssh_config(5) for more information on patterns.
398 This keyword may appear multiple times in sshd_config with each
399 instance appending to the list.
400
401 DisableForwarding
402 Disables all forwarding features, including X11, ssh-agent(1),
403 TCP and StreamLocal. This option overrides all other forwarding-
404 related options and may simplify restricted configurations.
405
406 ExposeAuthInfo
407 Writes a temporary file containing a list of authentication meth‐
408 ods and public credentials (e.g. keys) used to authenticate the
409 user. The location of the file is exposed to the user session
410 through the SSH_USER_AUTH environment variable. The default is
411 no.
412
413 FingerprintHash
414 Specifies the hash algorithm used when logging key fingerprints.
415 Valid options are: md5 and sha256. The default is sha256.
416
417 ForceCommand
418 Forces the execution of the command specified by ForceCommand,
419 ignoring any command supplied by the client and ~/.ssh/rc if
420 present. The command is invoked by using the user's login shell
421 with the -c option. This applies to shell, command, or subsystem
422 execution. It is most useful inside a Match block. The command
423 originally supplied by the client is available in the
424 SSH_ORIGINAL_COMMAND environment variable. Specifying a command
425 of internal-sftp will force the use of an in-process SFTP server
426 that requires no support files when used with ChrootDirectory.
427 The default is none.
428
429 GatewayPorts
430 Specifies whether remote hosts are allowed to connect to ports
431 forwarded for the client. By default, sshd(8) binds remote port
432 forwardings to the loopback address. This prevents other remote
433 hosts from connecting to forwarded ports. GatewayPorts can be
434 used to specify that sshd should allow remote port forwardings to
435 bind to non-loopback addresses, thus allowing other hosts to con‐
436 nect. The argument may be no to force remote port forwardings to
437 be available to the local host only, yes to force remote port
438 forwardings to bind to the wildcard address, or clientspecified
439 to allow the client to select the address to which the forwarding
440 is bound. The default is no.
441
442 GSSAPIAuthentication
443 Specifies whether user authentication based on GSSAPI is allowed.
444 The default is no.
445
446 GSSAPICleanupCredentials
447 Specifies whether to automatically destroy the user's credentials
448 cache on logout. The default is yes.
449
450 GSSAPIEnablek5users
451 Specifies whether to look at .k5users file for GSSAPI authentica‐
452 tion access control. Further details are described in ksu(1).
453 The default is no.
454
455 GSSAPIKeyExchange
456 Specifies whether key exchange based on GSSAPI is allowed. GSSAPI
457 key exchange doesn't rely on ssh keys to verify host identity.
458 The default is no.
459
460 GSSAPIStrictAcceptorCheck
461 Determines whether to be strict about the identity of the GSSAPI
462 acceptor a client authenticates against. If set to yes then the
463 client must authenticate against the host service on the current
464 hostname. If set to no then the client may authenticate against
465 any service key stored in the machine's default store. This fa‐
466 cility is provided to assist with operation on multi homed ma‐
467 chines. The default is yes.
468
469 GSSAPIStoreCredentialsOnRekey
470 Controls whether the user's GSSAPI credentials should be updated
471 following a successful connection rekeying. This option can be
472 used to accepted renewed or updated credentials from a compatible
473 client. The default is “no”.
474
475 For this to work GSSAPIKeyExchange needs to be enabled in the
476 server and also used by the client.
477
478 GSSAPIKexAlgorithms
479 The default is handled system-wide by crypto-policies(7). Infor‐
480 mation about defaults, how to modify the defaults and how to cus‐
481 tomize existing policies with sub-policies are present in manual
482 page update-crypto-policies(8).
483
484 The list of key exchange algorithms that are accepted by GSSAPI
485 key exchange. Possible values are
486
487 gss-gex-sha1-
488 gss-group1-sha1-
489 gss-group14-sha1-
490 gss-group14-sha256-
491 gss-group16-sha512-
492 gss-nistp256-sha256-
493 gss-curve25519-sha256-
494 This option only applies to connections using GSSAPI.
495
496 HostbasedAcceptedAlgorithms
497 The default is handled system-wide by crypto-policies(7). Infor‐
498 mation about defaults, how to modify the defaults and how to cus‐
499 tomize existing policies with sub-policies are present in manual
500 page update-crypto-policies(8).
501
502 Specifies the signature algorithms that will be accepted for
503 hostbased authentication as a list of comma-separated patterns.
504 Alternately if the specified list begins with a ‘+’ character,
505 then the specified signature algorithms will be appended to the
506 built-in openssh default set instead of replacing them. If the
507 specified list begins with a ‘-’ character, then the specified
508 signature algorithms (including wildcards) will be removed from
509 the built-in openssh default set instead of replacing them. If
510 the specified list begins with a ‘^’ character, then the speci‐
511 fied signature algorithms will be placed at the head of the
512 built-in openssh default set.
513
514 The list of available signature algorithms may also be obtained
515 using "ssh -Q HostbasedAcceptedAlgorithms". This was formerly
516 named HostbasedAcceptedKeyTypes.
517
518 HostbasedAuthentication
519 Specifies whether rhosts or /etc/hosts.equiv authentication to‐
520 gether with successful public key client host authentication is
521 allowed (host-based authentication). The default is no.
522
523 HostbasedUsesNameFromPacketOnly
524 Specifies whether or not the server will attempt to perform a re‐
525 verse name lookup when matching the name in the ~/.shosts,
526 ~/.rhosts, and /etc/hosts.equiv files during
527 HostbasedAuthentication. A setting of yes means that sshd(8)
528 uses the name supplied by the client rather than attempting to
529 resolve the name from the TCP connection itself. The default is
530 no.
531
532 HostCertificate
533 Specifies a file containing a public host certificate. The cer‐
534 tificate's public key must match a private host key already spec‐
535 ified by HostKey. The default behaviour of sshd(8) is not to
536 load any certificates.
537
538 HostKey
539 Specifies a file containing a private host key used by SSH. The
540 defaults are /etc/ssh/ssh_host_ecdsa_key,
541 /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key.
542
543 Note that sshd(8) will refuse to use a file if it is group/world-
544 accessible and that the HostKeyAlgorithms option restricts which
545 of the keys are actually used by sshd(8).
546
547 It is possible to have multiple host key files. It is also pos‐
548 sible to specify public host key files instead. In this case op‐
549 erations on the private key will be delegated to an ssh-agent(1).
550
551 HostKeyAgent
552 Identifies the UNIX-domain socket used to communicate with an
553 agent that has access to the private host keys. If the string
554 "SSH_AUTH_SOCK" is specified, the location of the socket will be
555 read from the SSH_AUTH_SOCK environment variable.
556
557 HostKeyAlgorithms
558 The default is handled system-wide by crypto-policies(7). Infor‐
559 mation about defaults, how to modify the defaults and how to cus‐
560 tomize existing policies with sub-policies are present in manual
561 page update-crypto-policies(8).
562
563 Specifies the host key signature algorithms that the server of‐
564 fers. The default for this option is: The list of available sig‐
565 nature algorithms may also be obtained using "ssh -Q
566 HostKeyAlgorithms".
567
568 IgnoreRhosts
569 Specifies whether to ignore per-user .rhosts and .shosts files
570 during HostbasedAuthentication. The system-wide /etc/hosts.equiv
571 and /etc/ssh/shosts.equiv are still used regardless of this set‐
572 ting.
573
574 Accepted values are yes (the default) to ignore all per-user
575 files, shosts-only to allow the use of .shosts but to ignore
576 .rhosts or no to allow both .shosts and rhosts.
577
578 IgnoreUserKnownHosts
579 Specifies whether sshd(8) should ignore the user's
580 ~/.ssh/known_hosts during HostbasedAuthentication and use only
581 the system-wide known hosts file /etc/ssh/ssh_known_hosts. The
582 default is “no”.
583
584 Include
585 Include the specified configuration file(s). Multiple pathnames
586 may be specified and each pathname may contain glob(7) wildcards
587 that will be expanded and processed in lexical order. Files
588 without absolute paths are assumed to be in /etc/ssh. An Include
589 directive may appear inside a Match block to perform conditional
590 inclusion.
591
592 IPQoS Specifies the IPv4 type-of-service or DSCP class for the connec‐
593 tion. Accepted values are af11, af12, af13, af21, af22, af23,
594 af31, af32, af33, af41, af42, af43, cs0, cs1, cs2, cs3, cs4, cs5,
595 cs6, cs7, ef, le, lowdelay, throughput, reliability, a numeric
596 value, or none to use the operating system default. This option
597 may take one or two arguments, separated by whitespace. If one
598 argument is specified, it is used as the packet class uncondi‐
599 tionally. If two values are specified, the first is automati‐
600 cally selected for interactive sessions and the second for non-
601 interactive sessions. The default is af21 (Low-Latency Data) for
602 interactive sessions and cs1 (Lower Effort) for non-interactive
603 sessions.
604
605 KbdInteractiveAuthentication
606 Specifies whether to allow keyboard-interactive authentication.
607 All authentication styles from login.conf(5) are supported. The
608 default is yes. The argument to this keyword must be yes or no.
609 ChallengeResponseAuthentication is a deprecated alias for this.
610
611 KerberosAuthentication
612 Specifies whether the password provided by the user for
613 PasswordAuthentication will be validated through the Kerberos
614 KDC. To use this option, the server needs a Kerberos servtab
615 which allows the verification of the KDC's identity. The default
616 is no.
617
618 KerberosGetAFSToken
619 If AFS is active and the user has a Kerberos 5 TGT, attempt to
620 acquire an AFS token before accessing the user's home directory.
621 The default is no.
622
623 KerberosOrLocalPasswd
624 If password authentication through Kerberos fails then the pass‐
625 word will be validated via any additional local mechanism such as
626 /etc/passwd. The default is yes.
627
628 KerberosTicketCleanup
629 Specifies whether to automatically destroy the user's ticket
630 cache file on logout. The default is yes.
631
632 KerberosUniqueCCache
633 Specifies whether to store the acquired tickets in the per-ses‐
634 sion credential cache under /tmp/ or whether to use per-user cre‐
635 dential cache as configured in /etc/krb5.conf. The default value
636 no can lead to overwriting previous tickets by subseqent connec‐
637 tions to the same user account.
638
639 KerberosUseKuserok
640 Specifies whether to look at .k5login file for user's aliases.
641 The default is yes.
642
643 KexAlgorithms
644 The default is handled system-wide by crypto-policies(7). Infor‐
645 mation about defaults, how to modify the defaults and how to cus‐
646 tomize existing policies with sub-policies are present in manual
647 page update-crypto-policies(8).
648
649 Specifies the available KEX (Key Exchange) algorithms. Multiple
650 algorithms must be comma-separated. Alternately if the specified
651 list begins with a ‘+’ character, then the specified methods will
652 be appended to the built-in openssh default set instead of re‐
653 placing them. If the specified list begins with a ‘-’ character,
654 then the specified algorithms (including wildcards) will be re‐
655 moved from the built-in openssh default set instead of replacing
656 them. If the specified list begins with a ‘^’ character, then
657 the specified algorithms will be placed at the head of the built-
658 in openssh default set. The supported algorithms are:
659
660 curve25519-sha256
661 curve25519-sha256@libssh.org
662 diffie-hellman-group1-sha1
663 diffie-hellman-group14-sha1
664 diffie-hellman-group14-sha256
665 diffie-hellman-group16-sha512
666 diffie-hellman-group18-sha512
667 diffie-hellman-group-exchange-sha1
668 diffie-hellman-group-exchange-sha256
669 ecdh-sha2-nistp256
670 ecdh-sha2-nistp384
671 ecdh-sha2-nistp521
672 sntrup761x25519-sha512@openssh.com
673
674 The list of available key exchange algorithms may also be ob‐
675 tained using "ssh -Q KexAlgorithms".
676
677 ListenAddress
678 Specifies the local addresses sshd(8) should listen on. The fol‐
679 lowing forms may be used:
680
681 ListenAddress hostname|address [rdomain domain]
682 ListenAddress hostname:port [rdomain domain]
683 ListenAddress IPv4_address:port [rdomain domain]
684 ListenAddress [hostname|address]:port [rdomain domain]
685
686 The optional rdomain qualifier requests sshd(8) listen in an ex‐
687 plicit routing domain. If port is not specified, sshd will lis‐
688 ten on the address and all Port options specified. The default
689 is to listen on all local addresses on the current default rout‐
690 ing domain. Multiple ListenAddress options are permitted. For
691 more information on routing domains, see rdomain(4).
692
693 LoginGraceTime
694 The server disconnects after this time if the user has not suc‐
695 cessfully logged in. If the value is 0, there is no time limit.
696 The default is 120 seconds.
697
698 LogLevel
699 Gives the verbosity level that is used when logging messages from
700 sshd(8). The possible values are: QUIET, FATAL, ERROR, INFO,
701 VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is INFO.
702 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify
703 higher levels of debugging output. Logging with a DEBUG level
704 violates the privacy of users and is not recommended.
705
706 LogVerbose
707 Specify one or more overrides to LogLevel. An override consists
708 of a pattern lists that matches the source file, function and
709 line number to force detailed logging for. For example, an over‐
710 ride pattern of:
711
712 kex.c:*:1000,*:kex_exchange_identification():*,packet.c:*
713
714 would enable detailed logging for line 1000 of kex.c, everything
715 in the kex_exchange_identification() function, and all code in
716 the packet.c file. This option is intended for debugging and no
717 overrides are enabled by default.
718
719 MACs The default is handled system-wide by crypto-policies(7). Infor‐
720 mation about defaults, how to modify the defaults and how to cus‐
721 tomize existing policies with sub-policies are present in manual
722 page update-crypto-policies(8).
723
724 Specifies the available MAC (message authentication code) algo‐
725 rithms. The MAC algorithm is used for data integrity protection.
726 Multiple algorithms must be comma-separated. If the specified
727 list begins with a ‘+’ character, then the specified algorithms
728 will be appended to the built-in openssh default set instead of
729 replacing them. If the specified list begins with a ‘-’ charac‐
730 ter, then the specified algorithms (including wildcards) will be
731 removed from the built-in openssh default set instead of replac‐
732 ing them. If the specified list begins with a ‘^’ character,
733 then the specified algorithms will be placed at the head of the
734 built-in openssh default set.
735
736 The algorithms that contain "-etm" calculate the MAC after en‐
737 cryption (encrypt-then-mac). These are considered safer and
738 their use recommended. The supported MACs are:
739
740 hmac-md5
741 hmac-md5-96
742 hmac-sha1
743 hmac-sha1-96
744 hmac-sha2-256
745 hmac-sha2-512
746 umac-64@openssh.com
747 umac-128@openssh.com
748 hmac-md5-etm@openssh.com
749 hmac-md5-96-etm@openssh.com
750 hmac-sha1-etm@openssh.com
751 hmac-sha1-96-etm@openssh.com
752 hmac-sha2-256-etm@openssh.com
753 hmac-sha2-512-etm@openssh.com
754 umac-64-etm@openssh.com
755 umac-128-etm@openssh.com
756
757 The list of available MAC algorithms may also be obtained using
758 "ssh -Q mac".
759
760 Match Introduces a conditional block. If all of the criteria on the
761 Match line are satisfied, the keywords on the following lines
762 override those set in the global section of the config file, un‐
763 til either another Match line or the end of the file. If a key‐
764 word appears in multiple Match blocks that are satisfied, only
765 the first instance of the keyword is applied.
766
767 The arguments to Match are one or more criteria-pattern pairs or
768 the single token All which matches all criteria. The available
769 criteria are User, Group, Host, LocalAddress, LocalPort, RDomain,
770 and Address (with RDomain representing the rdomain(4) on which
771 the connection was received).
772
773 The match patterns may consist of single entries or comma-sepa‐
774 rated lists and may use the wildcard and negation operators de‐
775 scribed in the PATTERNS section of ssh_config(5).
776
777 The patterns in an Address criteria may additionally contain ad‐
778 dresses to match in CIDR address/masklen format, such as
779 192.0.2.0/24 or 2001:db8::/32. Note that the mask length pro‐
780 vided must be consistent with the address - it is an error to
781 specify a mask length that is too long for the address or one
782 with bits set in this host portion of the address. For example,
783 192.0.2.0/33 and 192.0.2.0/8, respectively.
784
785 Only a subset of keywords may be used on the lines following a
786 Match keyword. Available keywords are AcceptEnv,
787 AllowAgentForwarding, AllowGroups, AllowStreamLocalForwarding,
788 AllowTcpForwarding, AllowUsers, AuthenticationMethods,
789 AuthorizedKeysCommand, AuthorizedKeysCommandUser,
790 AuthorizedKeysFile, AuthorizedPrincipalsCommand,
791 AuthorizedPrincipalsCommandUser, AuthorizedPrincipalsFile,
792 Banner, CASignatureAlgorithms, ChannelTimeout, ChrootDirectory,
793 ClientAliveCountMax, ClientAliveInterval, DenyGroups, DenyUsers,
794 DisableForwarding, ExposeAuthInfo, ForceCommand, GatewayPorts,
795 GSSAPIAuthentication, HostbasedAcceptedAlgorithms,
796 HostbasedAuthentication, HostbasedUsesNameFromPacketOnly,
797 IgnoreRhosts, Include, IPQoS, KbdInteractiveAuthentication,
798 KerberosAuthentication, KerberosUseKuserok, LogLevel,
799 MaxAuthTries, MaxSessions, PasswordAuthentication,
800 PermitEmptyPasswords, PermitListen, PermitOpen, PermitRootLogin,
801 PermitTTY, PermitTunnel, PermitUserRC, PubkeyAcceptedAlgorithms,
802 PubkeyAuthentication, PubkeyAuthOptions, RekeyLimit, RevokedKeys,
803 RDomain, SetEnv, StreamLocalBindMask, StreamLocalBindUnlink,
804 TrustedUserCAKeys, UnusedConnectionTimeout, X11DisplayOffset,
805 X11MaxDisplays, X11Forwarding and X11UseLocalhost.
806
807 MaxAuthTries
808 Specifies the maximum number of authentication attempts permitted
809 per connection. Once the number of failures reaches half this
810 value, additional failures are logged. The default is 6.
811
812 MaxSessions
813 Specifies the maximum number of open shell, login or subsystem
814 (e.g. sftp) sessions permitted per network connection. Multiple
815 sessions may be established by clients that support connection
816 multiplexing. Setting MaxSessions to 1 will effectively disable
817 session multiplexing, whereas setting it to 0 will prevent all
818 shell, login and subsystem sessions while still permitting for‐
819 warding. The default is 10.
820
821 MaxStartups
822 Specifies the maximum number of concurrent unauthenticated con‐
823 nections to the SSH daemon. Additional connections will be
824 dropped until authentication succeeds or the LoginGraceTime ex‐
825 pires for a connection. The default is 10:30:100.
826
827 Alternatively, random early drop can be enabled by specifying the
828 three colon separated values start:rate:full (e.g. "10:30:60").
829 sshd(8) will refuse connection attempts with a probability of
830 rate/100 (30%) if there are currently start (10) unauthenticated
831 connections. The probability increases linearly and all connec‐
832 tion attempts are refused if the number of unauthenticated con‐
833 nections reaches full (60).
834
835 ModuliFile
836 Specifies the moduli(5) file that contains the Diffie-Hellman
837 groups used for the “diffie-hellman-group-exchange-sha1” and
838 “diffie-hellman-group-exchange-sha256” key exchange methods. The
839 default is /etc/ssh/moduli.
840
841 PasswordAuthentication
842 Specifies whether password authentication is allowed. The de‐
843 fault is yes.
844
845 PermitEmptyPasswords
846 When password authentication is allowed, it specifies whether the
847 server allows login to accounts with empty password strings. The
848 default is no.
849
850 PermitListen
851 Specifies the addresses/ports on which a remote TCP port forward‐
852 ing may listen. The listen specification must be one of the fol‐
853 lowing forms:
854
855 PermitListen port
856 PermitListen host:port
857
858 Multiple permissions may be specified by separating them with
859 whitespace. An argument of any can be used to remove all re‐
860 strictions and permit any listen requests. An argument of none
861 can be used to prohibit all listen requests. The host name may
862 contain wildcards as described in the PATTERNS section in
863 ssh_config(5). The wildcard ‘*’ can also be used in place of a
864 port number to allow all ports. By default all port forwarding
865 listen requests are permitted. Note that the GatewayPorts option
866 may further restrict which addresses may be listened on. Note
867 also that ssh(1) will request a listen host of “localhost” if no
868 listen host was specifically requested, and this name is treated
869 differently to explicit localhost addresses of “127.0.0.1” and
870 “::1”.
871
872 PermitOpen
873 Specifies the destinations to which TCP port forwarding is per‐
874 mitted. The forwarding specification must be one of the follow‐
875 ing forms:
876
877 PermitOpen host:port
878 PermitOpen IPv4_addr:port
879 PermitOpen [IPv6_addr]:port
880
881 Multiple forwards may be specified by separating them with white‐
882 space. An argument of any can be used to remove all restrictions
883 and permit any forwarding requests. An argument of none can be
884 used to prohibit all forwarding requests. The wildcard ‘*’ can
885 be used for host or port to allow all hosts or ports respec‐
886 tively. Otherwise, no pattern matching or address lookups are
887 performed on supplied names. By default all port forwarding re‐
888 quests are permitted.
889
890 PermitRootLogin
891 Specifies whether root can log in using ssh(1). The argument
892 must be yes, prohibit-password, forced-commands-only, or no. The
893 default is prohibit-password.
894
895 If this option is set to prohibit-password (or its deprecated
896 alias, without-password), password and keyboard-interactive au‐
897 thentication are disabled for root.
898
899 If this option is set to forced-commands-only, root login with
900 public key authentication will be allowed, but only if the
901 command option has been specified (which may be useful for taking
902 remote backups even if root login is normally not allowed). All
903 other authentication methods are disabled for root.
904
905 If this option is set to no, root is not allowed to log in.
906
907 PermitTTY
908 Specifies whether pty(4) allocation is permitted. The default is
909 yes.
910
911 PermitTunnel
912 Specifies whether tun(4) device forwarding is allowed. The argu‐
913 ment must be yes, point-to-point (layer 3), ethernet (layer 2),
914 or no. Specifying yes permits both point-to-point and ethernet.
915 The default is no.
916
917 Independent of this setting, the permissions of the selected
918 tun(4) device must allow access to the user.
919
920 PermitUserEnvironment
921 Specifies whether ~/.ssh/environment and environment= options in
922 ~/.ssh/authorized_keys are processed by sshd(8). Valid options
923 are yes, no or a pattern-list specifying which environment vari‐
924 able names to accept (for example "LANG,LC_*"). The default is
925 no. Enabling environment processing may enable users to bypass
926 access restrictions in some configurations using mechanisms such
927 as LD_PRELOAD.
928
929 PermitUserRC
930 Specifies whether any ~/.ssh/rc file is executed. The default is
931 yes.
932
933 PerSourceMaxStartups
934 Specifies the number of unauthenticated connections allowed from
935 a given source address, or “none” if there is no limit. This
936 limit is applied in addition to MaxStartups, whichever is lower.
937 The default is none.
938
939 PerSourceNetBlockSize
940 Specifies the number of bits of source address that are grouped
941 together for the purposes of applying PerSourceMaxStartups lim‐
942 its. Values for IPv4 and optionally IPv6 may be specified, sepa‐
943 rated by a colon. The default is 32:128, which means each ad‐
944 dress is considered individually.
945
946 PidFile
947 Specifies the file that contains the process ID of the SSH dae‐
948 mon, or none to not write one. The default is /var/run/sshd.pid.
949
950 Port Specifies the port number that sshd(8) listens on. The default
951 is 22. Multiple options of this type are permitted. See also
952 ListenAddress.
953
954 PrintLastLog
955 Specifies whether sshd(8) should print the date and time of the
956 last user login when a user logs in interactively. The default
957 is yes.
958
959 PrintMotd
960 Specifies whether sshd(8) should print /etc/motd when a user logs
961 in interactively. (On some systems it is also printed by the
962 shell, /etc/profile, or equivalent.) The default is yes.
963
964 PubkeyAcceptedAlgorithms
965 The default is handled system-wide by crypto-policies(7). Infor‐
966 mation about defaults, how to modify the defaults and how to cus‐
967 tomize existing policies with sub-policies are present in manual
968 page update-crypto-policies(8).
969
970 Specifies the signature algorithms that will be accepted for pub‐
971 lic key authentication as a list of comma-separated patterns.
972 Alternately if the specified list begins with a ‘+’ character,
973 then the specified algorithms will be appended to the built-in
974 openssh default set instead of replacing them. If the specified
975 list begins with a ‘-’ character, then the specified algorithms
976 (including wildcards) will be removed from the built-in openssh
977 default set instead of replacing them. If the specified list be‐
978 gins with a ‘^’ character, then the specified algorithms will be
979 placed at the head of the built-in openssh default set.
980
981 The list of available signature algorithms may also be obtained
982 using "ssh -Q PubkeyAcceptedAlgorithms".
983
984 PubkeyAuthOptions
985 Sets one or more public key authentication options. The sup‐
986 ported keywords are: none (the default; indicating no additional
987 options are enabled), touch-required and verify-required.
988
989 The touch-required option causes public key authentication using
990 a FIDO authenticator algorithm (i.e. ecdsa-sk or ed25519-sk) to
991 always require the signature to attest that a physically present
992 user explicitly confirmed the authentication (usually by touching
993 the authenticator). By default, sshd(8) requires user presence
994 unless overridden with an authorized_keys option. The
995 touch-required flag disables this override.
996
997 The verify-required option requires a FIDO key signature attest
998 that the user was verified, e.g. via a PIN.
999
1000 Neither the touch-required or verify-required options have any
1001 effect for other, non-FIDO, public key types.
1002
1003 PubkeyAuthentication
1004 Specifies whether public key authentication is allowed. The de‐
1005 fault is yes.
1006
1007 RekeyLimit
1008 Specifies the maximum amount of data that may be transmitted or
1009 received before the session key is renegotiated, optionally fol‐
1010 lowed by a maximum amount of time that may pass before the ses‐
1011 sion key is renegotiated. The first argument is specified in
1012 bytes and may have a suffix of ‘K’, ‘M’, or ‘G’ to indicate Kilo‐
1013 bytes, Megabytes, or Gigabytes, respectively. The default is be‐
1014 tween ‘1G’ and ‘4G’, depending on the cipher. The optional sec‐
1015 ond value is specified in seconds and may use any of the units
1016 documented in the TIME FORMATS section. The default value for
1017 RekeyLimit is default none, which means that rekeying is per‐
1018 formed after the cipher's default amount of data has been sent or
1019 received and no time based rekeying is done.
1020
1021 RequiredRSASize
1022 Specifies the minimum RSA key size (in bits) that sshd(8) will
1023 accept. User and host-based authentication keys smaller than
1024 this limit will be refused. The default is 1024 bits. Note that
1025 this limit may only be raised from the default.
1026
1027 RevokedKeys
1028 Specifies revoked public keys file, or none to not use one. Keys
1029 listed in this file will be refused for public key authentica‐
1030 tion. Note that if this file is not readable, then public key
1031 authentication will be refused for all users. Keys may be speci‐
1032 fied as a text file, listing one public key per line, or as an
1033 OpenSSH Key Revocation List (KRL) as generated by ssh-keygen(1).
1034 For more information on KRLs, see the KEY REVOCATION LISTS sec‐
1035 tion in ssh-keygen(1).
1036
1037 RDomain
1038 Specifies an explicit routing domain that is applied after au‐
1039 thentication has completed. The user session, as well as any
1040 forwarded or listening IP sockets, will be bound to this
1041 rdomain(4). If the routing domain is set to %D, then the domain
1042 in which the incoming connection was received will be applied.
1043
1044 SecurityKeyProvider
1045 Specifies a path to a library that will be used when loading FIDO
1046 authenticator-hosted keys, overriding the default of using the
1047 built-in USB HID support.
1048
1049 SetEnv Specifies one or more environment variables to set in child ses‐
1050 sions started by sshd(8) as “NAME=VALUE”. The environment value
1051 may be quoted (e.g. if it contains whitespace characters). Envi‐
1052 ronment variables set by SetEnv override the default environment
1053 and any variables specified by the user via AcceptEnv or
1054 PermitUserEnvironment.
1055
1056 StreamLocalBindMask
1057 Sets the octal file creation mode mask (umask) used when creating
1058 a Unix-domain socket file for local or remote port forwarding.
1059 This option is only used for port forwarding to a Unix-domain
1060 socket file.
1061
1062 The default value is 0177, which creates a Unix-domain socket
1063 file that is readable and writable only by the owner. Note that
1064 not all operating systems honor the file mode on Unix-domain
1065 socket files.
1066
1067 StreamLocalBindUnlink
1068 Specifies whether to remove an existing Unix-domain socket file
1069 for local or remote port forwarding before creating a new one.
1070 If the socket file already exists and StreamLocalBindUnlink is
1071 not enabled, sshd will be unable to forward the port to the Unix-
1072 domain socket file. This option is only used for port forwarding
1073 to a Unix-domain socket file.
1074
1075 The argument must be yes or no. The default is no.
1076
1077 StrictModes
1078 Specifies whether sshd(8) should check file modes and ownership
1079 of the user's files and home directory before accepting login.
1080 This is normally desirable because novices sometimes accidentally
1081 leave their directory or files world-writable. The default is
1082 yes. Note that this does not apply to ChrootDirectory, whose
1083 permissions and ownership are checked unconditionally.
1084
1085 Subsystem
1086 Configures an external subsystem (e.g. file transfer daemon).
1087 Arguments should be a subsystem name and a command (with optional
1088 arguments) to execute upon subsystem request.
1089
1090 The command sftp-server implements the SFTP file transfer subsys‐
1091 tem.
1092
1093 Alternately the name internal-sftp implements an in-process SFTP
1094 server. This may simplify configurations using ChrootDirectory
1095 to force a different filesystem root on clients.
1096
1097 By default no subsystems are defined.
1098
1099 SyslogFacility
1100 Gives the facility code that is used when logging messages from
1101 sshd(8). The possible values are: DAEMON, USER, AUTH, AUTHPRIV,
1102 LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1103 The default is AUTH.
1104
1105 TCPKeepAlive
1106 Specifies whether the system should send TCP keepalive messages
1107 to the other side. If they are sent, death of the connection or
1108 crash of one of the machines will be properly noticed. However,
1109 this means that connections will die if the route is down tempo‐
1110 rarily, and some people find it annoying. On the other hand, if
1111 TCP keepalives are not sent, sessions may hang indefinitely on
1112 the server, leaving "ghost" users and consuming server resources.
1113
1114 The default is yes (to send TCP keepalive messages), and the
1115 server will notice if the network goes down or the client host
1116 crashes. This avoids infinitely hanging sessions.
1117
1118 To disable TCP keepalive messages, the value should be set to no.
1119
1120 TrustedUserCAKeys
1121 Specifies a file containing public keys of certificate authori‐
1122 ties that are trusted to sign user certificates for authentica‐
1123 tion, or none to not use one. Keys are listed one per line;
1124 empty lines and comments starting with ‘#’ are allowed. If a
1125 certificate is presented for authentication and has its signing
1126 CA key listed in this file, then it may be used for authentica‐
1127 tion for any user listed in the certificate's principals list.
1128 Note that certificates that lack a list of principals will not be
1129 permitted for authentication using TrustedUserCAKeys. For more
1130 details on certificates, see the CERTIFICATES section in
1131 ssh-keygen(1).
1132
1133 UnusedConnectionTimeout
1134 Specifies whether and how quickly sshd(8) should close client
1135 connections with no open channels. Open channels include active
1136 shell, command execution or subsystem sessions, connected net‐
1137 work, socket, agent or X11 forwardings. Forwarding listeners,
1138 such as those from the ssh(1) -R flag, are not considered as open
1139 channels and do not prevent the timeout. The timeout value is
1140 specified in seconds or may use any of the units documented in
1141 the TIME FORMATS section.
1142
1143 Note that this timeout starts when the client connection com‐
1144 pletes user authentication but before the client has an opportu‐
1145 nity to open any channels. Caution should be used when using
1146 short timeout values, as they may not provide sufficient time for
1147 the client to request and open its channels before terminating
1148 the connection.
1149
1150 The default none is to never expire connections for having no
1151 open channels. This option may be useful in conjunction with
1152 ChannelTimeout.
1153
1154 UseDNS Specifies whether sshd(8) should look up the remote host name,
1155 and to check that the resolved host name for the remote IP ad‐
1156 dress maps back to the very same IP address.
1157
1158 If this option is set to no (the default) then only addresses and
1159 not host names may be used in ~/.ssh/authorized_keys from and
1160 sshd_config Match Host directives.
1161
1162 UsePAM Enables the Pluggable Authentication Module interface. If set to
1163 yes this will enable PAM authentication using
1164 KbdInteractiveAuthentication and PasswordAuthentication in addi‐
1165 tion to PAM account and session module processing for all authen‐
1166 tication types.
1167
1168 Because PAM keyboard-interactive authentication usually serves an
1169 equivalent role to password authentication, you should disable
1170 either PasswordAuthentication or KbdInteractiveAuthentication.
1171
1172 If UsePAM is enabled, you will not be able to run sshd(8) as a
1173 non-root user. The default is no.
1174
1175 VersionAddendum
1176 Optionally specifies additional text to append to the SSH proto‐
1177 col banner sent by the server upon connection. The default is
1178 none.
1179
1180 X11DisplayOffset
1181 Specifies the first display number available for sshd(8)'s X11
1182 forwarding. This prevents sshd from interfering with real X11
1183 servers. The default is 10.
1184
1185 X11MaxDisplays
1186 Specifies the maximum number of displays available for sshd(8)'s
1187 X11 forwarding. This prevents sshd from exhausting local ports.
1188 The default is 1000.
1189
1190 X11Forwarding
1191 Specifies whether X11 forwarding is permitted. The argument must
1192 be yes or no. The default is no.
1193
1194 When X11 forwarding is enabled, there may be additional exposure
1195 to the server and to client displays if the sshd(8) proxy display
1196 is configured to listen on the wildcard address (see
1197 X11UseLocalhost), though this is not the default. Additionally,
1198 the authentication spoofing and authentication data verification
1199 and substitution occur on the client side. The security risk of
1200 using X11 forwarding is that the client's X11 display server may
1201 be exposed to attack when the SSH client requests forwarding (see
1202 the warnings for ForwardX11 in ssh_config(5)). A system adminis‐
1203 trator may have a stance in which they want to protect clients
1204 that may expose themselves to attack by unwittingly requesting
1205 X11 forwarding, which can warrant a no setting.
1206
1207 Note that disabling X11 forwarding does not prevent users from
1208 forwarding X11 traffic, as users can always install their own
1209 forwarders.
1210
1211 X11UseLocalhost
1212 Specifies whether sshd(8) should bind the X11 forwarding server
1213 to the loopback address or to the wildcard address. By default,
1214 sshd binds the forwarding server to the loopback address and sets
1215 the hostname part of the DISPLAY environment variable to
1216 localhost. This prevents remote hosts from connecting to the
1217 proxy display. However, some older X11 clients may not function
1218 with this configuration. X11UseLocalhost may be set to no to
1219 specify that the forwarding server should be bound to the wild‐
1220 card address. The argument must be yes or no. The default is
1221 yes.
1222
1223 XAuthLocation
1224 Specifies the full pathname of the xauth(1) program, or none to
1225 not use one. The default is /usr/bin/xauth.
1226
1228 sshd(8) command-line arguments and configuration file options that spec‐
1229 ify time may be expressed using a sequence of the form: time[qualifier],
1230 where time is a positive integer value and qualifier is one of the fol‐
1231 lowing:
1232
1233 ⟨none⟩ seconds
1234 s | S seconds
1235 m | M minutes
1236 h | H hours
1237 d | D days
1238 w | W weeks
1239
1240 Each member of the sequence is added together to calculate the total time
1241 value.
1242
1243 Time format examples:
1244
1245 600 600 seconds (10 minutes)
1246 10m 10 minutes
1247 1h30m 1 hour 30 minutes (90 minutes)
1248
1250 Arguments to some keywords can make use of tokens, which are expanded at
1251 runtime:
1252
1253 %% A literal ‘%’.
1254 %D The routing domain in which the incoming connection was re‐
1255 ceived.
1256 %F The fingerprint of the CA key.
1257 %f The fingerprint of the key or certificate.
1258 %h The home directory of the user.
1259 %i The key ID in the certificate.
1260 %K The base64-encoded CA key.
1261 %k The base64-encoded key or certificate for authentication.
1262 %s The serial number of the certificate.
1263 %T The type of the CA key.
1264 %t The key or certificate type.
1265 %U The numeric user ID of the target user.
1266 %u The username.
1267
1268 AuthorizedKeysCommand accepts the tokens %%, %f, %h, %k, %t, %U, and %u.
1269
1270 AuthorizedKeysFile accepts the tokens %%, %h, %U, and %u.
1271
1272 AuthorizedPrincipalsCommand accepts the tokens %%, %F, %f, %h, %i, %K,
1273 %k, %s, %T, %t, %U, and %u.
1274
1275 AuthorizedPrincipalsFile accepts the tokens %%, %h, %U, and %u.
1276
1277 ChrootDirectory accepts the tokens %%, %h, %U, and %u.
1278
1279 RoutingDomain accepts the token %D.
1280
1282 /etc/ssh/sshd_config
1283 Contains configuration data for sshd(8). This file should be
1284 writable by root only, but it is recommended (though not neces‐
1285 sary) that it be world-readable.
1286
1288 sftp-server(8), sshd(8), crypto-policies(7), update-crypto-policies(8)
1289
1291 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
1292 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
1293 de Raadt and Dug Song removed many bugs, re-added newer features and cre‐
1294 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
1295 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
1296 for privilege separation.
1297
1298BSD March 3, 2023 BSD