summaryrefslogtreecommitdiff
path: root/sshd_config.0
diff options
context:
space:
mode:
Diffstat (limited to 'sshd_config.0')
-rw-r--r--sshd_config.01082
1 files changed, 1082 insertions, 0 deletions
diff --git a/sshd_config.0 b/sshd_config.0
new file mode 100644
index 000000000..0498495fe
--- /dev/null
+++ b/sshd_config.0
@@ -0,0 +1,1082 @@
1SSHD_CONFIG(5) File Formats Manual SSHD_CONFIG(5)
2
3NAME
4 sshd_config M-bM-^@M-^S OpenSSH SSH daemon configuration file
5
6DESCRIPTION
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-
9 argument pairs, one per line. For each keyword, the first obtained value
10 will be used. Lines starting with M-bM-^@M-^X#M-bM-^@M-^Y and empty lines are interpreted as
11 comments. Arguments may optionally be enclosed in double quotes (") in
12 order to represent arguments containing spaces.
13
14 The possible keywords and their meanings are as follows (note that
15 keywords 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
21 environment variable is always accepted whenever the client
22 requests a pseudo-terminal as it is required by the protocol.
23 Variables are specified by name, which may contain the wildcard
24 characters M-bM-^@M-^X*M-bM-^@M-^Y and M-bM-^@M-^X?M-bM-^@M-^Y. Multiple environment variables may be
25 separated by whitespace or spread across multiple AcceptEnv
26 directives. Be warned that some environment variables could be
27 used to bypass restricted user environments. For this reason,
28 care should be taken in the use of this directive. The default
29 is not to accept 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
38 default is yes. Note that disabling agent forwarding does not
39 improve security unless users are also denied shell access, as
40 they 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 directives are processed in the following
49 order: DenyUsers, AllowUsers, DenyGroups, and finally
50 AllowGroups.
51
52 See PATTERNS in ssh_config(5) for more information on patterns.
53
54 AllowStreamLocalForwarding
55 Specifies whether StreamLocal (Unix-domain socket) forwarding is
56 permitted. The available options are yes (the default) or all to
57 allow StreamLocal forwarding, no to prevent all StreamLocal
58 forwarding, local to allow local (from the perspective of ssh(1))
59 forwarding only or remote to allow remote forwarding only. Note
60 that disabling StreamLocal forwarding does not improve security
61 unless users are also denied shell access, as they can always
62 install their own forwarders.
63
64 AllowTcpForwarding
65 Specifies whether TCP forwarding is permitted. The available
66 options are yes (the default) or all to allow TCP forwarding, no
67 to prevent all TCP forwarding, local to allow local (from the
68 perspective of ssh(1)) forwarding only or remote to allow remote
69 forwarding only. Note that disabling TCP forwarding does not
70 improve security unless users are also denied shell access, as
71 they can always install their own forwarders.
72
73 AllowUsers
74 This keyword can be followed by a list of user name patterns,
75 separated by spaces. If specified, login is allowed only for
76 user names that match one of the patterns. Only user names are
77 valid; a numerical user ID is not recognized. By default, login
78 is allowed for all users. If the pattern takes the form
79 USER@HOST then USER and HOST are separately checked, restricting
80 logins to particular users from particular hosts. HOST criteria
81 may additionally contain addresses to match in CIDR
82 address/masklen format. The allow/deny directives are processed
83 in the following order: DenyUsers, AllowUsers, DenyGroups, and
84 finally AllowGroups.
85
86 See PATTERNS in ssh_config(5) for more information on patterns.
87
88 AuthenticationMethods
89 Specifies the authentication methods that must be successfully
90 completed for a user to be granted access. This option must be
91 followed by one or more lists of comma-separated authentication
92 method names, or by the single string any to indicate the default
93 behaviour of accepting any single authentication method. If the
94 default is overridden, then successful authentication requires
95 completion of every method in at least one of these lists.
96
97 For example, "publickey,password publickey,keyboard-interactive"
98 would require the user to complete public key authentication,
99 followed by either password or keyboard interactive
100 authentication. Only methods that are next in one or more lists
101 are offered at each stage, so for this example it would not be
102 possible to attempt password or keyboard-interactive
103 authentication before public key.
104
105 For keyboard interactive authentication it is also possible to
106 restrict authentication to a specific device by appending a colon
107 followed by the device identifier bsdauth or pam. depending on
108 the server configuration. For example,
109 "keyboard-interactive:bsdauth" would restrict keyboard
110 interactive authentication to the bsdauth device.
111
112 If the publickey method is listed more than once, sshd(8)
113 verifies that keys that have been used successfully are not
114 reused for subsequent authentications. For example,
115 "publickey,publickey" requires successful authentication using
116 two different public keys.
117
118 Note that each authentication method listed should also be
119 explicitly enabled in the configuration.
120
121 The available authentication methods are: "gssapi-with-mic",
122 "hostbased", "keyboard-interactive", "none" (used for access to
123 password-less accounts when PermitEmptyPasswords is enabled),
124 "password" and "publickey".
125
126 AuthorizedKeysCommand
127 Specifies a program to be used to look up the user's public keys.
128 The program must be owned by root, not writable by group or
129 others and specified by an absolute path. Arguments to
130 AuthorizedKeysCommand accept the tokens described in the TOKENS
131 section. If no arguments are specified then the username of the
132 target user is used.
133
134 The program should produce on standard output zero or more lines
135 of authorized_keys output (see AUTHORIZED_KEYS in sshd(8)). If a
136 key supplied by AuthorizedKeysCommand does not successfully
137 authenticate and authorize the user then public key
138 authentication continues using the usual AuthorizedKeysFile
139 files. By default, no AuthorizedKeysCommand is run.
140
141 AuthorizedKeysCommandUser
142 Specifies the user under whose account the AuthorizedKeysCommand
143 is run. It is recommended to use a dedicated user that has no
144 other role on the host than running authorized keys commands. If
145 AuthorizedKeysCommand is specified but AuthorizedKeysCommandUser
146 is not, then sshd(8) will refuse to start.
147
148 AuthorizedKeysFile
149 Specifies the file that contains the public keys used for user
150 authentication. The format is described in the AUTHORIZED_KEYS
151 FILE FORMAT section of sshd(8). Arguments to AuthorizedKeysFile
152 accept the tokens described in the TOKENS section. After
153 expansion, AuthorizedKeysFile is taken to be an absolute path or
154 one relative to the user's home directory. Multiple files may be
155 listed, separated by whitespace. Alternately this option may be
156 set to none to skip checking for user keys in files. The default
157 is ".ssh/authorized_keys .ssh/authorized_keys2".
158
159 AuthorizedPrincipalsCommand
160 Specifies a program to be used to generate the list of allowed
161 certificate principals as per AuthorizedPrincipalsFile. The
162 program must be owned by root, not writable by group or others
163 and specified by an absolute path. Arguments to
164 AuthorizedPrincipalsCommand accept the tokens described in the
165 TOKENS section. If no arguments are specified then the username
166 of the target user is used.
167
168 The program should produce on standard output zero or more lines
169 of AuthorizedPrincipalsFile output. If either
170 AuthorizedPrincipalsCommand or AuthorizedPrincipalsFile is
171 specified, then certificates offered by the client for
172 authentication must contain a principal that is listed. By
173 default, no AuthorizedPrincipalsCommand is run.
174
175 AuthorizedPrincipalsCommandUser
176 Specifies the user under whose account the
177 AuthorizedPrincipalsCommand is run. It is recommended to use a
178 dedicated user that has no other role on the host than running
179 authorized principals commands. If AuthorizedPrincipalsCommand
180 is specified but AuthorizedPrincipalsCommandUser is not, then
181 sshd(8) will refuse to start.
182
183 AuthorizedPrincipalsFile
184 Specifies a file that lists principal names that are accepted for
185 certificate authentication. When using certificates signed by a
186 key listed in TrustedUserCAKeys, this file lists names, one of
187 which must appear in the certificate for it to be accepted for
188 authentication. Names are listed one per line preceded by key
189 options (as described in AUTHORIZED_KEYS FILE FORMAT in sshd(8)).
190 Empty lines and comments starting with M-bM-^@M-^X#M-bM-^@M-^Y are ignored.
191
192 Arguments to AuthorizedPrincipalsFile accept the tokens described
193 in the TOKENS section. After expansion, AuthorizedPrincipalsFile
194 is taken to be an absolute path or one relative to the user's
195 home directory. The default is none, i.e. not to use a
196 principals file M-bM-^@M-^S in this case, the username of the user must
197 appear in a certificate's principals list for it to be accepted.
198
199 Note that AuthorizedPrincipalsFile is only used when
200 authentication proceeds using a CA listed in TrustedUserCAKeys
201 and is not consulted for certification authorities trusted via
202 ~/.ssh/authorized_keys, though the principals= key option offers
203 a similar facility (see sshd(8) for details).
204
205 Banner The contents of the specified file are sent to the remote user
206 before authentication is allowed. If the argument is none then
207 no banner is displayed. By default, no banner is displayed.
208
209 ChallengeResponseAuthentication
210 Specifies whether challenge-response authentication is allowed
211 (e.g. via PAM or through authentication styles supported in
212 login.conf(5)) The default is yes.
213
214 ChrootDirectory
215 Specifies the pathname of a directory to chroot(2) to after
216 authentication. At session startup sshd(8) checks that all
217 components of the pathname are root-owned directories which are
218 not writable by any other user or group. After the chroot,
219 sshd(8) changes the working directory to the user's home
220 directory. Arguments to ChrootDirectory accept the tokens
221 described in the TOKENS section.
222
223 The ChrootDirectory must contain the necessary files and
224 directories to support the user's session. For an interactive
225 session this requires at least a shell, typically sh(1), and
226 basic /dev nodes such as null(4), zero(4), stdin(4), stdout(4),
227 stderr(4), and tty(4) devices. For file transfer sessions using
228 SFTP no additional configuration of the environment is necessary
229 if the in-process sftp-server is used, though sessions which use
230 logging may require /dev/log inside the chroot directory on some
231 operating systems (see sftp-server(8) for details).
232
233 For safety, it is very important that the directory hierarchy be
234 prevented from modification by other processes on the system
235 (especially those outside the jail). Misconfiguration can lead
236 to unsafe environments which sshd(8) cannot detect.
237
238 The default is none, indicating not to chroot(2).
239
240 Ciphers
241 Specifies the ciphers allowed. Multiple ciphers must be comma-
242 separated. If the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character,
243 then the specified ciphers will be appended to the default set
244 instead of replacing them. If the specified value begins with a
245 M-bM-^@M-^X-M-bM-^@M-^Y character, then the specified ciphers (including wildcards)
246 will be removed from the default set instead of replacing them.
247
248 The supported ciphers are:
249
250 3des-cbc
251 aes128-cbc
252 aes192-cbc
253 aes256-cbc
254 aes128-ctr
255 aes192-ctr
256 aes256-ctr
257 aes128-gcm@openssh.com
258 aes256-gcm@openssh.com
259 chacha20-poly1305@openssh.com
260
261 The default is:
262
263 chacha20-poly1305@openssh.com,
264 aes128-ctr,aes192-ctr,aes256-ctr,
265 aes128-gcm@openssh.com,aes256-gcm@openssh.com
266
267 The list of available ciphers may also be obtained using "ssh -Q
268 cipher".
269
270 ClientAliveCountMax
271 Sets the number of client alive messages which may be sent
272 without sshd(8) receiving any messages back from the client. If
273 this threshold is reached while client alive messages are being
274 sent, sshd will disconnect the client, terminating the session.
275 It is important to note that the use of client alive messages is
276 very different from TCPKeepAlive. The client alive messages are
277 sent through the encrypted channel and therefore will not be
278 spoofable. The TCP keepalive option enabled by TCPKeepAlive is
279 spoofable. The client alive mechanism is valuable when the
280 client or server depend on knowing when a connection has become
281 inactive.
282
283 The default value is 3. If ClientAliveInterval is set to 15, and
284 ClientAliveCountMax is left at the default, unresponsive SSH
285 clients will be disconnected after approximately 45 seconds.
286
287 ClientAliveInterval
288 Sets a timeout interval in seconds after which if no data has
289 been received from the client, sshd(8) will send a message
290 through the encrypted channel to request a response from the
291 client. The default is 0, indicating that these messages will
292 not be sent to the client.
293
294 Compression
295 Specifies whether compression is enabled after the user has
296 authenticated successfully. The argument must be yes, delayed (a
297 legacy synonym for yes) or no. The default is yes.
298
299 DenyGroups
300 This keyword can be followed by a list of group name patterns,
301 separated by spaces. Login is disallowed for users whose primary
302 group or supplementary group list matches one of the patterns.
303 Only group names are valid; a numerical group ID is not
304 recognized. By default, login is allowed for all groups. The
305 allow/deny directives are processed in the following order:
306 DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.
307
308 See PATTERNS in ssh_config(5) for more information on patterns.
309
310 DenyUsers
311 This keyword can be followed by a list of user name patterns,
312 separated by spaces. Login is disallowed for user names that
313 match one of the patterns. Only user names are valid; a
314 numerical user ID is not recognized. By default, login is
315 allowed for all users. If the pattern takes the form USER@HOST
316 then USER and HOST are separately checked, restricting logins to
317 particular users from particular hosts. HOST criteria may
318 additionally contain addresses to match in CIDR address/masklen
319 format. The allow/deny directives are processed in the following
320 order: DenyUsers, AllowUsers, DenyGroups, and finally
321 AllowGroups.
322
323 See PATTERNS in ssh_config(5) for more information on patterns.
324
325 DisableForwarding
326 Disables all forwarding features, including X11, ssh-agent(1),
327 TCP and StreamLocal. This option overrides all other forwarding-
328 related options and may simplify restricted configurations.
329
330 ExposeAuthInfo
331 Writes a temporary file containing a list of authentication
332 methods and public credentials (e.g. keys) used to authenticate
333 the user. The location of the file is exposed to the user
334 session through the SSH_USER_AUTH environment variable. The
335 default is no.
336
337 FingerprintHash
338 Specifies the hash algorithm used when logging key fingerprints.
339 Valid options are: md5 and sha256. The default is sha256.
340
341 ForceCommand
342 Forces the execution of the command specified by ForceCommand,
343 ignoring any command supplied by the client and ~/.ssh/rc if
344 present. The command is invoked by using the user's login shell
345 with the -c option. This applies to shell, command, or subsystem
346 execution. It is most useful inside a Match block. The command
347 originally supplied by the client is available in the
348 SSH_ORIGINAL_COMMAND environment variable. Specifying a command
349 of internal-sftp will force the use of an in-process SFTP server
350 that requires no support files when used with ChrootDirectory.
351 The default is none.
352
353 GatewayPorts
354 Specifies whether remote hosts are allowed to connect to ports
355 forwarded for the client. By default, sshd(8) binds remote port
356 forwardings to the loopback address. This prevents other remote
357 hosts from connecting to forwarded ports. GatewayPorts can be
358 used to specify that sshd should allow remote port forwardings to
359 bind to non-loopback addresses, thus allowing other hosts to
360 connect. The argument may be no to force remote port forwardings
361 to be available to the local host only, yes to force remote port
362 forwardings to bind to the wildcard address, or clientspecified
363 to allow the client to select the address to which the forwarding
364 is bound. The default is no.
365
366 GSSAPIAuthentication
367 Specifies whether user authentication based on GSSAPI is allowed.
368 The default is no.
369
370 GSSAPICleanupCredentials
371 Specifies whether to automatically destroy the user's credentials
372 cache on logout. The default is yes.
373
374 GSSAPIStrictAcceptorCheck
375 Determines whether to be strict about the identity of the GSSAPI
376 acceptor a client authenticates against. If set to yes then the
377 client must authenticate against the host service on the current
378 hostname. If set to no then the client may authenticate against
379 any service key stored in the machine's default store. This
380 facility is provided to assist with operation on multi homed
381 machines. The default is yes.
382
383 HostbasedAcceptedKeyTypes
384 Specifies the key types that will be accepted for hostbased
385 authentication as a list of comma-separated patterns.
386 Alternately if the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character,
387 then the specified key types will be appended to the default set
388 instead of replacing them. If the specified value begins with a
389 M-bM-^@M-^X-M-bM-^@M-^Y character, then the specified key types (including wildcards)
390 will be removed from the default set instead of replacing them.
391 The default for this option is:
392
393 ecdsa-sha2-nistp256-cert-v01@openssh.com,
394 ecdsa-sha2-nistp384-cert-v01@openssh.com,
395 ecdsa-sha2-nistp521-cert-v01@openssh.com,
396 ssh-ed25519-cert-v01@openssh.com,
397 rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,
398 ssh-rsa-cert-v01@openssh.com,
399 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
400 ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
401
402 The list of available key types may also be obtained using "ssh
403 -Q key".
404
405 HostbasedAuthentication
406 Specifies whether rhosts or /etc/hosts.equiv authentication
407 together with successful public key client host authentication is
408 allowed (host-based authentication). The default is no.
409
410 HostbasedUsesNameFromPacketOnly
411 Specifies whether or not the server will attempt to perform a
412 reverse name lookup when matching the name in the ~/.shosts,
413 ~/.rhosts, and /etc/hosts.equiv files during
414 HostbasedAuthentication. A setting of yes means that sshd(8)
415 uses the name supplied by the client rather than attempting to
416 resolve the name from the TCP connection itself. The default is
417 no.
418
419 HostCertificate
420 Specifies a file containing a public host certificate. The
421 certificate's public key must match a private host key already
422 specified by HostKey. The default behaviour of sshd(8) is not to
423 load any certificates.
424
425 HostKey
426 Specifies a file containing a private host key used by SSH. The
427 defaults are /etc/ssh/ssh_host_ecdsa_key,
428 /etc/ssh/ssh_host_ed25519_key and /etc/ssh/ssh_host_rsa_key.
429
430 Note that sshd(8) will refuse to use a file if it is group/world-
431 accessible and that the HostKeyAlgorithms option restricts which
432 of the keys are actually used by sshd(8).
433
434 It is possible to have multiple host key files. It is also
435 possible to specify public host key files instead. In this case
436 operations on the private key will be delegated to an
437 ssh-agent(1).
438
439 HostKeyAgent
440 Identifies the UNIX-domain socket used to communicate with an
441 agent that has access to the private host keys. If the string
442 "SSH_AUTH_SOCK" is specified, the location of the socket will be
443 read from the SSH_AUTH_SOCK environment variable.
444
445 HostKeyAlgorithms
446 Specifies the host key algorithms that the server offers. The
447 default for this option is:
448
449 ecdsa-sha2-nistp256-cert-v01@openssh.com,
450 ecdsa-sha2-nistp384-cert-v01@openssh.com,
451 ecdsa-sha2-nistp521-cert-v01@openssh.com,
452 ssh-ed25519-cert-v01@openssh.com,
453 rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,
454 ssh-rsa-cert-v01@openssh.com,
455 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
456 ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
457
458 The list of available key types may also be obtained using "ssh
459 -Q key".
460
461 IgnoreRhosts
462 Specifies that .rhosts and .shosts files will not be used in
463 HostbasedAuthentication.
464
465 /etc/hosts.equiv and /etc/shosts.equiv are still used. The
466 default is yes.
467
468 IgnoreUserKnownHosts
469 Specifies whether sshd(8) should ignore the user's
470 ~/.ssh/known_hosts during HostbasedAuthentication and use only
471 the system-wide known hosts file /etc/ssh/known_hosts. The
472 default is no.
473
474 IPQoS Specifies the IPv4 type-of-service or DSCP class for the
475 connection. Accepted values are af11, af12, af13, af21, af22,
476 af23, af31, af32, af33, af41, af42, af43, cs0, cs1, cs2, cs3,
477 cs4, cs5, cs6, cs7, ef, lowdelay, throughput, reliability, a
478 numeric value, or none to use the operating system default. This
479 option may take one or two arguments, separated by whitespace.
480 If one argument is specified, it is used as the packet class
481 unconditionally. If two values are specified, the first is
482 automatically selected for interactive sessions and the second
483 for non-interactive sessions. The default is af21 (Low-Latency
484 Data) for interactive sessions and cs1 (Lower Effort) for non-
485 interactive sessions.
486
487 KbdInteractiveAuthentication
488 Specifies whether to allow keyboard-interactive authentication.
489 The argument to this keyword must be yes or no. The default is
490 to use whatever value ChallengeResponseAuthentication is set to
491 (by default yes).
492
493 KerberosAuthentication
494 Specifies whether the password provided by the user for
495 PasswordAuthentication will be validated through the Kerberos
496 KDC. To use this option, the server needs a Kerberos servtab
497 which allows the verification of the KDC's identity. The default
498 is no.
499
500 KerberosGetAFSToken
501 If AFS is active and the user has a Kerberos 5 TGT, attempt to
502 acquire an AFS token before accessing the user's home directory.
503 The default is no.
504
505 KerberosOrLocalPasswd
506 If password authentication through Kerberos fails then the
507 password will be validated via any additional local mechanism
508 such as /etc/passwd. The default is yes.
509
510 KerberosTicketCleanup
511 Specifies whether to automatically destroy the user's ticket
512 cache file on logout. The default is yes.
513
514 KexAlgorithms
515 Specifies the available KEX (Key Exchange) algorithms. Multiple
516 algorithms must be comma-separated. Alternately if the specified
517 value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified methods
518 will be appended to the default set instead of replacing them.
519 If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y character, then the
520 specified methods (including wildcards) will be removed from the
521 default set instead of replacing them. The supported algorithms
522 are:
523
524 curve25519-sha256
525 curve25519-sha256@libssh.org
526 diffie-hellman-group1-sha1
527 diffie-hellman-group14-sha1
528 diffie-hellman-group14-sha256
529 diffie-hellman-group16-sha512
530 diffie-hellman-group18-sha512
531 diffie-hellman-group-exchange-sha1
532 diffie-hellman-group-exchange-sha256
533 ecdh-sha2-nistp256
534 ecdh-sha2-nistp384
535 ecdh-sha2-nistp521
536
537 The default is:
538
539 curve25519-sha256,curve25519-sha256@libssh.org,
540 ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
541 diffie-hellman-group-exchange-sha256,
542 diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,
543 diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
544
545 The list of available key exchange algorithms may also be
546 obtained using "ssh -Q kex".
547
548 ListenAddress
549 Specifies the local addresses sshd(8) should listen on. The
550 following forms may be used:
551
552 ListenAddress hostname|address [rdomain domain]
553 ListenAddress hostname:port [rdomain domain]
554 ListenAddress IPv4_address:port [rdomain domain]
555 ListenAddress [hostname|address]:port [rdomain domain]
556
557 The optional rdomain qualifier requests sshd(8) listen in an
558 explicit routing domain. If port is not specified, sshd will
559 listen on the address and all Port options specified. The
560 default is to listen on all local addresses on the current
561 default routing domain. Multiple ListenAddress options are
562 permitted. For more information on routing domains, see
563 rdomain(4).
564
565 LoginGraceTime
566 The server disconnects after this time if the user has not
567 successfully logged in. If the value is 0, there is no time
568 limit. The default is 120 seconds.
569
570 LogLevel
571 Gives the verbosity level that is used when logging messages from
572 sshd(8). The possible values are: QUIET, FATAL, ERROR, INFO,
573 VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is INFO.
574 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify
575 higher levels of debugging output. Logging with a DEBUG level
576 violates the privacy of users and is not recommended.
577
578 MACs Specifies the available MAC (message authentication code)
579 algorithms. The MAC algorithm is used for data integrity
580 protection. Multiple algorithms must be comma-separated. If the
581 specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character, then the specified
582 algorithms will be appended to the default set instead of
583 replacing them. If the specified value begins with a M-bM-^@M-^X-M-bM-^@M-^Y
584 character, then the specified algorithms (including wildcards)
585 will be removed from the default set instead of replacing them.
586
587 The algorithms that contain "-etm" calculate the MAC after
588 encryption (encrypt-then-mac). These are considered safer and
589 their use recommended. The supported MACs are:
590
591 hmac-md5
592 hmac-md5-96
593 hmac-sha1
594 hmac-sha1-96
595 hmac-sha2-256
596 hmac-sha2-512
597 umac-64@openssh.com
598 umac-128@openssh.com
599 hmac-md5-etm@openssh.com
600 hmac-md5-96-etm@openssh.com
601 hmac-sha1-etm@openssh.com
602 hmac-sha1-96-etm@openssh.com
603 hmac-sha2-256-etm@openssh.com
604 hmac-sha2-512-etm@openssh.com
605 umac-64-etm@openssh.com
606 umac-128-etm@openssh.com
607
608 The default is:
609
610 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
611 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
612 hmac-sha1-etm@openssh.com,
613 umac-64@openssh.com,umac-128@openssh.com,
614 hmac-sha2-256,hmac-sha2-512,hmac-sha1
615
616 The list of available MAC algorithms may also be obtained using
617 "ssh -Q mac".
618
619 Match Introduces a conditional block. If all of the criteria on the
620 Match line are satisfied, the keywords on the following lines
621 override those set in the global section of the config file,
622 until either another Match line or the end of the file. If a
623 keyword appears in multiple Match blocks that are satisfied, only
624 the first instance of the keyword is applied.
625
626 The arguments to Match are one or more criteria-pattern pairs or
627 the single token All which matches all criteria. The available
628 criteria are User, Group, Host, LocalAddress, LocalPort, RDomain,
629 and Address (with RDomain representing the rdomain(4) on which
630 the connection was received.)
631
632 The match patterns may consist of single entries or comma-
633 separated lists and may use the wildcard and negation operators
634 described in the PATTERNS section of ssh_config(5).
635
636 The patterns in an Address criteria may additionally contain
637 addresses to match in CIDR address/masklen format, such as
638 192.0.2.0/24 or 2001:db8::/32. Note that the mask length
639 provided must be consistent with the address - it is an error to
640 specify a mask length that is too long for the address or one
641 with bits set in this host portion of the address. For example,
642 192.0.2.0/33 and 192.0.2.0/8, respectively.
643
644 Only a subset of keywords may be used on the lines following a
645 Match keyword. Available keywords are AcceptEnv,
646 AllowAgentForwarding, AllowGroups, AllowStreamLocalForwarding,
647 AllowTcpForwarding, AllowUsers, AuthenticationMethods,
648 AuthorizedKeysCommand, AuthorizedKeysCommandUser,
649 AuthorizedKeysFile, AuthorizedPrincipalsCommand,
650 AuthorizedPrincipalsCommandUser, AuthorizedPrincipalsFile,
651 Banner, ChrootDirectory, ClientAliveCountMax,
652 ClientAliveInterval, DenyGroups, DenyUsers, ForceCommand,
653 GatewayPorts, GSSAPIAuthentication, HostbasedAcceptedKeyTypes,
654 HostbasedAuthentication, HostbasedUsesNameFromPacketOnly, IPQoS,
655 KbdInteractiveAuthentication, KerberosAuthentication, LogLevel,
656 MaxAuthTries, MaxSessions, PasswordAuthentication,
657 PermitEmptyPasswords, PermitListen, PermitOpen, PermitRootLogin,
658 PermitTTY, PermitTunnel, PermitUserRC, PubkeyAcceptedKeyTypes,
659 PubkeyAuthentication, RekeyLimit, RevokedKeys, RDomain, SetEnv,
660 StreamLocalBindMask, StreamLocalBindUnlink, TrustedUserCAKeys,
661 X11DisplayOffset, X11Forwarding and X11UseLocalHost.
662
663 MaxAuthTries
664 Specifies the maximum number of authentication attempts permitted
665 per connection. Once the number of failures reaches half this
666 value, additional failures are logged. The default is 6.
667
668 MaxSessions
669 Specifies the maximum number of open shell, login or subsystem
670 (e.g. sftp) sessions permitted per network connection. Multiple
671 sessions may be established by clients that support connection
672 multiplexing. Setting MaxSessions to 1 will effectively disable
673 session multiplexing, whereas setting it to 0 will prevent all
674 shell, login and subsystem sessions while still permitting
675 forwarding. The default is 10.
676
677 MaxStartups
678 Specifies the maximum number of concurrent unauthenticated
679 connections to the SSH daemon. Additional connections will be
680 dropped until authentication succeeds or the LoginGraceTime
681 expires for a connection. The default is 10:30:100.
682
683 Alternatively, random early drop can be enabled by specifying the
684 three colon separated values start:rate:full (e.g. "10:30:60").
685 sshd(8) will refuse connection attempts with a probability of
686 rate/100 (30%) if there are currently start (10) unauthenticated
687 connections. The probability increases linearly and all
688 connection attempts are refused if the number of unauthenticated
689 connections reaches full (60).
690
691 PasswordAuthentication
692 Specifies whether password authentication is allowed. The
693 default is yes.
694
695 PermitEmptyPasswords
696 When password authentication is allowed, it specifies whether the
697 server allows login to accounts with empty password strings. The
698 default is no.
699
700 PermitListen
701 Specifies the addresses/ports on which a remote TCP port
702 forwarding may listen. The listen specification must be one of
703 the following forms:
704
705 PermitListen port
706 PermitListen host:port
707
708 Multiple permissions may be specified by separating them with
709 whitespace. An argument of any can be used to remove all
710 restrictions and permit any listen requests. An argument of none
711 can be used to prohibit all listen requests. The host name may
712 contain wildcards as described in the PATTERNS section in
713 ssh_config(5). The wildcard M-bM-^@M-^X*M-bM-^@M-^Y can also be used in place of a
714 port number to allow all ports. By default all port forwarding
715 listen requests are permitted. Note that the GatewayPorts option
716 may further restrict which addresses may be listened on. Note
717 also that ssh(1) will request a listen host of M-bM-^@M-^\localhostM-bM-^@M-^] if no
718 listen host was specifically requested, and this this name is
719 treated differently to explicit localhost addresses of
720 M-bM-^@M-^\127.0.0.1M-bM-^@M-^] and M-bM-^@M-^\::1M-bM-^@M-^].
721
722 PermitOpen
723 Specifies the destinations to which TCP port forwarding is
724 permitted. The forwarding specification must be one of the
725 following forms:
726
727 PermitOpen host:port
728 PermitOpen IPv4_addr:port
729 PermitOpen [IPv6_addr]:port
730
731 Multiple forwards may be specified by separating them with
732 whitespace. An argument of any can be used to remove all
733 restrictions and permit any forwarding requests. An argument of
734 none can be used to prohibit all forwarding requests. The
735 wildcard M-bM-^@M-^X*M-bM-^@M-^Y can be used for host or port to allow all hosts or
736 ports, respectively. By default all port forwarding requests are
737 permitted.
738
739 PermitRootLogin
740 Specifies whether root can log in using ssh(1). The argument
741 must be yes, prohibit-password, forced-commands-only, or no. The
742 default is prohibit-password.
743
744 If this option is set to prohibit-password (or its deprecated
745 alias, without-password), password and keyboard-interactive
746 authentication are disabled for root.
747
748 If this option is set to forced-commands-only, root login with
749 public key authentication will be allowed, but only if the
750 command option has been specified (which may be useful for taking
751 remote backups even if root login is normally not allowed). All
752 other authentication methods are disabled for root.
753
754 If this option is set to no, root is not allowed to log in.
755
756 PermitTTY
757 Specifies whether pty(4) allocation is permitted. The default is
758 yes.
759
760 PermitTunnel
761 Specifies whether tun(4) device forwarding is allowed. The
762 argument must be yes, point-to-point (layer 3), ethernet (layer
763 2), or no. Specifying yes permits both point-to-point and
764 ethernet. The default is no.
765
766 Independent of this setting, the permissions of the selected
767 tun(4) device must allow access to the user.
768
769 PermitUserEnvironment
770 Specifies whether ~/.ssh/environment and environment= options in
771 ~/.ssh/authorized_keys are processed by sshd(8). Valid options
772 are yes, no or a pattern-list specifying which environment
773 variable names to accept (for example "LANG,LC_*"). The default
774 is no. Enabling environment processing may enable users to
775 bypass access restrictions in some configurations using
776 mechanisms such as LD_PRELOAD.
777
778 PermitUserRC
779 Specifies whether any ~/.ssh/rc file is executed. The default is
780 yes.
781
782 PidFile
783 Specifies the file that contains the process ID of the SSH
784 daemon, or none to not write one. The default is
785 /var/run/sshd.pid.
786
787 Port Specifies the port number that sshd(8) listens on. The default
788 is 22. Multiple options of this type are permitted. See also
789 ListenAddress.
790
791 PrintLastLog
792 Specifies whether sshd(8) should print the date and time of the
793 last user login when a user logs in interactively. The default
794 is yes.
795
796 PrintMotd
797 Specifies whether sshd(8) should print /etc/motd when a user logs
798 in interactively. (On some systems it is also printed by the
799 shell, /etc/profile, or equivalent.) The default is yes.
800
801 PubkeyAcceptedKeyTypes
802 Specifies the key types that will be accepted for public key
803 authentication as a list of comma-separated patterns.
804 Alternately if the specified value begins with a M-bM-^@M-^X+M-bM-^@M-^Y character,
805 then the specified key types will be appended to the default set
806 instead of replacing them. If the specified value begins with a
807 M-bM-^@M-^X-M-bM-^@M-^Y character, then the specified key types (including wildcards)
808 will be removed from the default set instead of replacing them.
809 The default for this option is:
810
811 ecdsa-sha2-nistp256-cert-v01@openssh.com,
812 ecdsa-sha2-nistp384-cert-v01@openssh.com,
813 ecdsa-sha2-nistp521-cert-v01@openssh.com,
814 ssh-ed25519-cert-v01@openssh.com,
815 rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,
816 ssh-rsa-cert-v01@openssh.com,
817 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
818 ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
819
820 The list of available key types may also be obtained using "ssh
821 -Q key".
822
823 PubkeyAuthentication
824 Specifies whether public key authentication is allowed. The
825 default is yes.
826
827 RekeyLimit
828 Specifies the maximum amount of data that may be transmitted
829 before the session key is renegotiated, optionally followed a
830 maximum amount of time that may pass before the session key is
831 renegotiated. The first argument is specified in bytes and may
832 have a suffix of M-bM-^@M-^XKM-bM-^@M-^Y, M-bM-^@M-^XMM-bM-^@M-^Y, or M-bM-^@M-^XGM-bM-^@M-^Y to indicate Kilobytes,
833 Megabytes, or Gigabytes, respectively. The default is between
834 M-bM-^@M-^X1GM-bM-^@M-^Y and M-bM-^@M-^X4GM-bM-^@M-^Y, depending on the cipher. The optional second
835 value is specified in seconds and may use any of the units
836 documented in the TIME FORMATS section. The default value for
837 RekeyLimit is default none, which means that rekeying is
838 performed after the cipher's default amount of data has been sent
839 or received and no time based rekeying is done.
840
841 RevokedKeys
842 Specifies revoked public keys file, or none to not use one. Keys
843 listed in this file will be refused for public key
844 authentication. Note that if this file is not readable, then
845 public key authentication will be refused for all users. Keys
846 may be specified as a text file, listing one public key per line,
847 or as an OpenSSH Key Revocation List (KRL) as generated by
848 ssh-keygen(1). For more information on KRLs, see the KEY
849 REVOCATION LISTS section in ssh-keygen(1).
850
851 RDomain
852 Specifies an explicit routing domain that is applied after
853 authentication has completed. The user session, as well and any
854 forwarded or listening IP sockets, will be bound to this
855 rdomain(4). If the routing domain is set to %D, then the domain
856 in which the incoming connection was received will be applied.
857
858 SetEnv Specifies one or more environment variables to set in child
859 sessions started by sshd(8) as M-bM-^@M-^\NAME=VALUEM-bM-^@M-^]. The environment
860 value may be quoted (e.g. if it contains whitespace characters).
861 Environment variables set by SetEnv override the default
862 environment and any variables specified by the user via AcceptEnv
863 or PermitUserEnvironment.
864
865 StreamLocalBindMask
866 Sets the octal file creation mode mask (umask) used when creating
867 a Unix-domain socket file for local or remote port forwarding.
868 This option is only used for port forwarding to a Unix-domain
869 socket file.
870
871 The default value is 0177, which creates a Unix-domain socket
872 file that is readable and writable only by the owner. Note that
873 not all operating systems honor the file mode on Unix-domain
874 socket files.
875
876 StreamLocalBindUnlink
877 Specifies whether to remove an existing Unix-domain socket file
878 for local or remote port forwarding before creating a new one.
879 If the socket file already exists and StreamLocalBindUnlink is
880 not enabled, sshd will be unable to forward the port to the Unix-
881 domain socket file. This option is only used for port forwarding
882 to a Unix-domain socket file.
883
884 The argument must be yes or no. The default is no.
885
886 StrictModes
887 Specifies whether sshd(8) should check file modes and ownership
888 of the user's files and home directory before accepting login.
889 This is normally desirable because novices sometimes accidentally
890 leave their directory or files world-writable. The default is
891 yes. Note that this does not apply to ChrootDirectory, whose
892 permissions and ownership are checked unconditionally.
893
894 Subsystem
895 Configures an external subsystem (e.g. file transfer daemon).
896 Arguments should be a subsystem name and a command (with optional
897 arguments) to execute upon subsystem request.
898
899 The command sftp-server implements the SFTP file transfer
900 subsystem.
901
902 Alternately the name internal-sftp implements an in-process SFTP
903 server. This may simplify configurations using ChrootDirectory
904 to force a different filesystem root on clients.
905
906 By default no subsystems are defined.
907
908 SyslogFacility
909 Gives the facility code that is used when logging messages from
910 sshd(8). The possible values are: DAEMON, USER, AUTH, LOCAL0,
911 LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The
912 default is AUTH.
913
914 TCPKeepAlive
915 Specifies whether the system should send TCP keepalive messages
916 to the other side. If they are sent, death of the connection or
917 crash of one of the machines will be properly noticed. However,
918 this means that connections will die if the route is down
919 temporarily, and some people find it annoying. On the other
920 hand, if TCP keepalives are not sent, sessions may hang
921 indefinitely on the server, leaving "ghost" users and consuming
922 server resources.
923
924 The default is yes (to send TCP keepalive messages), and the
925 server will notice if the network goes down or the client host
926 crashes. This avoids infinitely hanging sessions.
927
928 To disable TCP keepalive messages, the value should be set to no.
929
930 TrustedUserCAKeys
931 Specifies a file containing public keys of certificate
932 authorities that are trusted to sign user certificates for
933 authentication, or none to not use one. Keys are listed one per
934 line; empty lines and comments starting with M-bM-^@M-^X#M-bM-^@M-^Y are allowed. If
935 a certificate is presented for authentication and has its signing
936 CA key listed in this file, then it may be used for
937 authentication for any user listed in the certificate's
938 principals list. Note that certificates that lack a list of
939 principals will not be permitted for authentication using
940 TrustedUserCAKeys. For more details on certificates, see the
941 CERTIFICATES section in ssh-keygen(1).
942
943 UseDNS Specifies whether sshd(8) should look up the remote host name,
944 and to check that the resolved host name for the remote IP
945 address maps back to the very same IP address.
946
947 If this option is set to no (the default) then only addresses and
948 not host names may be used in ~/.ssh/authorized_keys from and
949 sshd_config Match Host directives.
950
951 UsePAM Enables the Pluggable Authentication Module interface. If set to
952 yes this will enable PAM authentication using
953 ChallengeResponseAuthentication and PasswordAuthentication in
954 addition to PAM account and session module processing for all
955 authentication types.
956
957 Because PAM challenge-response authentication usually serves an
958 equivalent role to password authentication, you should disable
959 either PasswordAuthentication or ChallengeResponseAuthentication.
960
961 If UsePAM is enabled, you will not be able to run sshd(8) as a
962 non-root user. The default is no.
963
964 VersionAddendum
965 Optionally specifies additional text to append to the SSH
966 protocol banner sent by the server upon connection. The default
967 is none.
968
969 X11DisplayOffset
970 Specifies the first display number available for sshd(8)'s X11
971 forwarding. This prevents sshd from interfering with real X11
972 servers. The default is 10.
973
974 X11Forwarding
975 Specifies whether X11 forwarding is permitted. The argument must
976 be yes or no. The default is no.
977
978 When X11 forwarding is enabled, there may be additional exposure
979 to the server and to client displays if the sshd(8) proxy display
980 is configured to listen on the wildcard address (see
981 X11UseLocalhost), though this is not the default. Additionally,
982 the authentication spoofing and authentication data verification
983 and substitution occur on the client side. The security risk of
984 using X11 forwarding is that the client's X11 display server may
985 be exposed to attack when the SSH client requests forwarding (see
986 the warnings for ForwardX11 in ssh_config(5)). A system
987 administrator may have a stance in which they want to protect
988 clients that may expose themselves to attack by unwittingly
989 requesting X11 forwarding, which can warrant a no setting.
990
991 Note that disabling X11 forwarding does not prevent users from
992 forwarding X11 traffic, as users can always install their own
993 forwarders.
994
995 X11UseLocalhost
996 Specifies whether sshd(8) should bind the X11 forwarding server
997 to the loopback address or to the wildcard address. By default,
998 sshd binds the forwarding server to the loopback address and sets
999 the hostname part of the DISPLAY environment variable to
1000 localhost. This prevents remote hosts from connecting to the
1001 proxy display. However, some older X11 clients may not function
1002 with this configuration. X11UseLocalhost may be set to no to
1003 specify that the forwarding server should be bound to the
1004 wildcard address. The argument must be yes or no. The default
1005 is yes.
1006
1007 XAuthLocation
1008 Specifies the full pathname of the xauth(1) program, or none to
1009 not use one. The default is /usr/X11R6/bin/xauth.
1010
1011TIME FORMATS
1012 sshd(8) command-line arguments and configuration file options that
1013 specify time may be expressed using a sequence of the form:
1014 time[qualifier], where time is a positive integer value and qualifier is
1015 one of the following:
1016
1017 M-bM-^_M-(noneM-bM-^_M-) seconds
1018 s | S seconds
1019 m | M minutes
1020 h | H hours
1021 d | D days
1022 w | W weeks
1023
1024 Each member of the sequence is added together to calculate the total time
1025 value.
1026
1027 Time format examples:
1028
1029 600 600 seconds (10 minutes)
1030 10m 10 minutes
1031 1h30m 1 hour 30 minutes (90 minutes)
1032
1033TOKENS
1034 Arguments to some keywords can make use of tokens, which are expanded at
1035 runtime:
1036
1037 %% A literal M-bM-^@M-^X%M-bM-^@M-^Y.
1038 %D The routing domain in which the incoming connection was
1039 received.
1040 %F The fingerprint of the CA key.
1041 %f The fingerprint of the key or certificate.
1042 %h The home directory of the user.
1043 %i The key ID in the certificate.
1044 %K The base64-encoded CA key.
1045 %k The base64-encoded key or certificate for authentication.
1046 %s The serial number of the certificate.
1047 %T The type of the CA key.
1048 %t The key or certificate type.
1049 %U The numeric user ID of the target user.
1050 %u The username.
1051
1052 AuthorizedKeysCommand accepts the tokens %%, %f, %h, %k, %t, %U, and %u.
1053
1054 AuthorizedKeysFile accepts the tokens %%, %h, %U, and %u.
1055
1056 AuthorizedPrincipalsCommand accepts the tokens %%, %F, %f, %h, %i, %K,
1057 %k, %s, %T, %t, %U, and %u.
1058
1059 AuthorizedPrincipalsFile accepts the tokens %%, %h, %U, and %u.
1060
1061 ChrootDirectory accepts the tokens %%, %h, %U, and %u.
1062
1063 RoutingDomain accepts the token %D.
1064
1065FILES
1066 /etc/ssh/sshd_config
1067 Contains configuration data for sshd(8). This file should be
1068 writable by root only, but it is recommended (though not
1069 necessary) that it be world-readable.
1070
1071SEE ALSO
1072 sftp-server(8), sshd(8)
1073
1074AUTHORS
1075 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
1076 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
1077 de Raadt and Dug Song removed many bugs, re-added newer features and
1078 created OpenSSH. Markus Friedl contributed the support for SSH protocol
1079 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
1080 for privilege separation.
1081
1082OpenBSD 6.4 July 20, 2018 OpenBSD 6.4