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