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