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