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