OSDN Git Service

Removed an unused header include
[android-x86/external-openssh.git] / sshd_config.5
1 .\"
2 .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
3 .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 .\"                    All rights reserved
5 .\"
6 .\" As far as I am concerned, the code I have written for this software
7 .\" can be used freely for any purpose.  Any derived versions of this
8 .\" software must be clearly marked as such, and if the derived work is
9 .\" incompatible with the protocol description in the RFC file, it must be
10 .\" called by a name other than "ssh" or "Secure Shell".
11 .\"
12 .\" Copyright (c) 1999,2000 Markus Friedl.  All rights reserved.
13 .\" Copyright (c) 1999 Aaron Campbell.  All rights reserved.
14 .\" Copyright (c) 1999 Theo de Raadt.  All rights reserved.
15 .\"
16 .\" Redistribution and use in source and binary forms, with or without
17 .\" modification, are permitted provided that the following conditions
18 .\" are met:
19 .\" 1. Redistributions of source code must retain the above copyright
20 .\"    notice, this list of conditions and the following disclaimer.
21 .\" 2. Redistributions in binary form must reproduce the above copyright
22 .\"    notice, this list of conditions and the following disclaimer in the
23 .\"    documentation and/or other materials provided with the distribution.
24 .\"
25 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 .\"
36 .\" $OpenBSD: sshd_config.5,v 1.194 2015/02/20 23:46:01 djm Exp $
37 .Dd $Mdocdate: February 20 2015 $
38 .Dt SSHD_CONFIG 5
39 .Os
40 .Sh NAME
41 .Nm sshd_config
42 .Nd OpenSSH SSH daemon configuration file
43 .Sh SYNOPSIS
44 .Nm /etc/ssh/sshd_config
45 .Sh DESCRIPTION
46 .Xr sshd 8
47 reads configuration data from
48 .Pa /etc/ssh/sshd_config
49 (or the file specified with
50 .Fl f
51 on the command line).
52 The file contains keyword-argument pairs, one per line.
53 Lines starting with
54 .Ql #
55 and empty lines are interpreted as comments.
56 Arguments may optionally be enclosed in double quotes
57 .Pq \&"
58 in order to represent arguments containing spaces.
59 .Pp
60 The possible
61 keywords and their meanings are as follows (note that
62 keywords are case-insensitive and arguments are case-sensitive):
63 .Bl -tag -width Ds
64 .It Cm AcceptEnv
65 Specifies what environment variables sent by the client will be copied into
66 the session's
67 .Xr environ 7 .
68 See
69 .Cm SendEnv
70 in
71 .Xr ssh_config 5
72 for how to configure the client.
73 Note that environment passing is only supported for protocol 2.
74 Variables are specified by name, which may contain the wildcard characters
75 .Ql *
76 and
77 .Ql \&? .
78 Multiple environment variables may be separated by whitespace or spread
79 across multiple
80 .Cm AcceptEnv
81 directives.
82 Be warned that some environment variables could be used to bypass restricted
83 user environments.
84 For this reason, care should be taken in the use of this directive.
85 The default is not to accept any environment variables.
86 .It Cm AddressFamily
87 Specifies which address family should be used by
88 .Xr sshd 8 .
89 Valid arguments are
90 .Dq any ,
91 .Dq inet
92 (use IPv4 only), or
93 .Dq inet6
94 (use IPv6 only).
95 The default is
96 .Dq any .
97 .It Cm AllowAgentForwarding
98 Specifies whether
99 .Xr ssh-agent 1
100 forwarding is permitted.
101 The default is
102 .Dq yes .
103 Note that disabling agent forwarding does not improve security
104 unless users are also denied shell access, as they can always install
105 their own forwarders.
106 .It Cm AllowGroups
107 This keyword can be followed by a list of group name patterns, separated
108 by spaces.
109 If specified, login is allowed only for users whose primary
110 group or supplementary group list matches one of the patterns.
111 Only group names are valid; a numerical group ID is not recognized.
112 By default, login is allowed for all groups.
113 The allow/deny directives are processed in the following order:
114 .Cm DenyUsers ,
115 .Cm AllowUsers ,
116 .Cm DenyGroups ,
117 and finally
118 .Cm AllowGroups .
119 .Pp
120 See PATTERNS in
121 .Xr ssh_config 5
122 for more information on patterns.
123 .It Cm AllowTcpForwarding
124 Specifies whether TCP forwarding is permitted.
125 The available options are
126 .Dq yes
127 or
128 .Dq all
129 to allow TCP forwarding,
130 .Dq no
131 to prevent all TCP forwarding,
132 .Dq local
133 to allow local (from the perspective of
134 .Xr ssh 1 )
135 forwarding only or
136 .Dq remote
137 to allow remote forwarding only.
138 The default is
139 .Dq yes .
140 Note that disabling TCP forwarding does not improve security unless
141 users are also denied shell access, as they can always install their
142 own forwarders.
143 .It Cm AllowStreamLocalForwarding
144 Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
145 The available options are
146 .Dq yes
147 or
148 .Dq all
149 to allow StreamLocal forwarding,
150 .Dq no
151 to prevent all StreamLocal forwarding,
152 .Dq local
153 to allow local (from the perspective of
154 .Xr ssh 1 )
155 forwarding only or
156 .Dq remote
157 to allow remote forwarding only.
158 The default is
159 .Dq yes .
160 Note that disabling StreamLocal forwarding does not improve security unless
161 users are also denied shell access, as they can always install their
162 own forwarders.
163 .It Cm AllowUsers
164 This keyword can be followed by a list of user name patterns, separated
165 by spaces.
166 If specified, login is allowed only for user names that
167 match one of the patterns.
168 Only user names are valid; a numerical user ID is not recognized.
169 By default, login is allowed for all users.
170 If the pattern takes the form USER@HOST then USER and HOST
171 are separately checked, restricting logins to particular
172 users from particular hosts.
173 The allow/deny directives are processed in the following order:
174 .Cm DenyUsers ,
175 .Cm AllowUsers ,
176 .Cm DenyGroups ,
177 and finally
178 .Cm AllowGroups .
179 .Pp
180 See PATTERNS in
181 .Xr ssh_config 5
182 for more information on patterns.
183 .It Cm AuthenticationMethods
184 Specifies the authentication methods that must be successfully completed
185 for a user to be granted access.
186 This option must be followed by one or more comma-separated lists of
187 authentication method names.
188 Successful authentication requires completion of every method in at least
189 one of these lists.
190 .Pp
191 For example, an argument of
192 .Dq publickey,password publickey,keyboard-interactive
193 would require the user to complete public key authentication, followed by
194 either password or keyboard interactive authentication.
195 Only methods that are next in one or more lists are offered at each stage,
196 so for this example, it would not be possible to attempt password or
197 keyboard-interactive authentication before public key.
198 .Pp
199 For keyboard interactive authentication it is also possible to
200 restrict authentication to a specific device by appending a
201 colon followed by the device identifier
202 .Dq bsdauth ,
203 .Dq pam ,
204 or
205 .Dq skey ,
206 depending on the server configuration.
207 For example,
208 .Dq keyboard-interactive:bsdauth
209 would restrict keyboard interactive authentication to the
210 .Dq bsdauth
211 device.
212 .Pp
213 If the
214 .Dq publickey
215 method is listed more than once,
216 .Xr sshd 8
217 verifies that keys that have been used successfully are not reused for
218 subsequent authentications.
219 For example, an
220 .Cm AuthenticationMethods
221 of
222 .Dq publickey,publickey
223 will require successful authentication using two different public keys.
224 .Pp
225 This option is only available for SSH protocol 2 and will yield a fatal
226 error if enabled if protocol 1 is also enabled.
227 Note that each authentication method listed should also be explicitly enabled
228 in the configuration.
229 The default is not to require multiple authentication; successful completion
230 of a single authentication method is sufficient.
231 .It Cm AuthorizedKeysCommand
232 Specifies a program to be used to look up the user's public keys.
233 The program must be owned by root and not writable by group or others.
234 It will be invoked with a single argument of the username
235 being authenticated, and should produce on standard output zero or
236 more lines of authorized_keys output (see AUTHORIZED_KEYS in
237 .Xr sshd 8 ) .
238 If a key supplied by AuthorizedKeysCommand does not successfully authenticate
239 and authorize the user then public key authentication continues using the usual
240 .Cm AuthorizedKeysFile
241 files.
242 By default, no AuthorizedKeysCommand is run.
243 .It Cm AuthorizedKeysCommandUser
244 Specifies the user under whose account the AuthorizedKeysCommand is run.
245 It is recommended to use a dedicated user that has no other role on the host
246 than running authorized keys commands.
247 If
248 .Cm AuthorizedKeysCommand
249 is specified but
250 .Cm AuthorizedKeysCommandUser
251 is not, then
252 .Xr sshd 8
253 will refuse to start.
254 .It Cm AuthorizedKeysFile
255 Specifies the file that contains the public keys that can be used
256 for user authentication.
257 The format is described in the
258 AUTHORIZED_KEYS FILE FORMAT
259 section of
260 .Xr sshd 8 .
261 .Cm AuthorizedKeysFile
262 may contain tokens of the form %T which are substituted during connection
263 setup.
264 The following tokens are defined: %% is replaced by a literal '%',
265 %h is replaced by the home directory of the user being authenticated, and
266 %u is replaced by the username of that user.
267 After expansion,
268 .Cm AuthorizedKeysFile
269 is taken to be an absolute path or one relative to the user's home
270 directory.
271 Multiple files may be listed, separated by whitespace.
272 The default is
273 .Dq .ssh/authorized_keys .ssh/authorized_keys2 .
274 .It Cm AuthorizedPrincipalsFile
275 Specifies a file that lists principal names that are accepted for
276 certificate authentication.
277 When using certificates signed by a key listed in
278 .Cm TrustedUserCAKeys ,
279 this file lists names, one of which must appear in the certificate for it
280 to be accepted for authentication.
281 Names are listed one per line preceded by key options (as described
282 in AUTHORIZED_KEYS FILE FORMAT in
283 .Xr sshd 8 ) .
284 Empty lines and comments starting with
285 .Ql #
286 are ignored.
287 .Pp
288 .Cm AuthorizedPrincipalsFile
289 may contain tokens of the form %T which are substituted during connection
290 setup.
291 The following tokens are defined: %% is replaced by a literal '%',
292 %h is replaced by the home directory of the user being authenticated, and
293 %u is replaced by the username of that user.
294 After expansion,
295 .Cm AuthorizedPrincipalsFile
296 is taken to be an absolute path or one relative to the user's home
297 directory.
298 .Pp
299 The default is
300 .Dq none ,
301 i.e. not to use a principals file \(en in this case, the username
302 of the user must appear in a certificate's principals list for it to be
303 accepted.
304 Note that
305 .Cm AuthorizedPrincipalsFile
306 is only used when authentication proceeds using a CA listed in
307 .Cm TrustedUserCAKeys
308 and is not consulted for certification authorities trusted via
309 .Pa ~/.ssh/authorized_keys ,
310 though the
311 .Cm principals=
312 key option offers a similar facility (see
313 .Xr sshd 8
314 for details).
315 .It Cm Banner
316 The contents of the specified file are sent to the remote user before
317 authentication is allowed.
318 If the argument is
319 .Dq none
320 then no banner is displayed.
321 This option is only available for protocol version 2.
322 By default, no banner is displayed.
323 .It Cm ChallengeResponseAuthentication
324 Specifies whether challenge-response authentication is allowed (e.g. via
325 PAM or through authentication styles supported in
326 .Xr login.conf 5 )
327 The default is
328 .Dq yes .
329 .It Cm ChrootDirectory
330 Specifies the pathname of a directory to
331 .Xr chroot 2
332 to after authentication.
333 At session startup
334 .Xr sshd 8
335 checks that all components of the pathname are root-owned directories
336 which are not writable by any other user or group.
337 After the chroot,
338 .Xr sshd 8
339 changes the working directory to the user's home directory.
340 .Pp
341 The pathname may contain the following tokens that are expanded at runtime once
342 the connecting user has been authenticated: %% is replaced by a literal '%',
343 %h is replaced by the home directory of the user being authenticated, and
344 %u is replaced by the username of that user.
345 .Pp
346 The
347 .Cm ChrootDirectory
348 must contain the necessary files and directories to support the
349 user's session.
350 For an interactive session this requires at least a shell, typically
351 .Xr sh 1 ,
352 and basic
353 .Pa /dev
354 nodes such as
355 .Xr null 4 ,
356 .Xr zero 4 ,
357 .Xr stdin 4 ,
358 .Xr stdout 4 ,
359 .Xr stderr 4 ,
360 and
361 .Xr tty 4
362 devices.
363 For file transfer sessions using
364 .Dq sftp ,
365 no additional configuration of the environment is necessary if the
366 in-process sftp server is used,
367 though sessions which use logging may require
368 .Pa /dev/log
369 inside the chroot directory on some operating systems (see
370 .Xr sftp-server 8
371 for details).
372 .Pp
373 For safety, it is very important that the directory hierarchy be
374 prevented from modification by other processes on the system (especially
375 those outside the jail).
376 Misconfiguration can lead to unsafe environments which
377 .Xr sshd 8
378 cannot detect.
379 .Pp
380 The default is not to
381 .Xr chroot 2 .
382 .It Cm Ciphers
383 Specifies the ciphers allowed for protocol version 2.
384 Multiple ciphers must be comma-separated.
385 The supported ciphers are:
386 .Pp
387 .Bl -item -compact -offset indent
388 .It
389 3des-cbc
390 .It
391 aes128-cbc
392 .It
393 aes192-cbc
394 .It
395 aes256-cbc
396 .It
397 aes128-ctr
398 .It
399 aes192-ctr
400 .It
401 aes256-ctr
402 .It
403 aes128-gcm@openssh.com
404 .It
405 aes256-gcm@openssh.com
406 .It
407 arcfour
408 .It
409 arcfour128
410 .It
411 arcfour256
412 .It
413 blowfish-cbc
414 .It
415 cast128-cbc
416 .It
417 chacha20-poly1305@openssh.com
418 .El
419 .Pp
420 The default is:
421 .Bd -literal -offset indent
422 aes128-ctr,aes192-ctr,aes256-ctr,
423 aes128-gcm@openssh.com,aes256-gcm@openssh.com,
424 chacha20-poly1305@openssh.com
425 .Ed
426 .Pp
427 The list of available ciphers may also be obtained using the
428 .Fl Q
429 option of
430 .Xr ssh 1
431 with an argument of
432 .Dq cipher .
433 .It Cm ClientAliveCountMax
434 Sets the number of client alive messages (see below) which may be
435 sent without
436 .Xr sshd 8
437 receiving any messages back from the client.
438 If this threshold is reached while client alive messages are being sent,
439 sshd will disconnect the client, terminating the session.
440 It is important to note that the use of client alive messages is very
441 different from
442 .Cm TCPKeepAlive
443 (below).
444 The client alive messages are sent through the encrypted channel
445 and therefore will not be spoofable.
446 The TCP keepalive option enabled by
447 .Cm TCPKeepAlive
448 is spoofable.
449 The client alive mechanism is valuable when the client or
450 server depend on knowing when a connection has become inactive.
451 .Pp
452 The default value is 3.
453 If
454 .Cm ClientAliveInterval
455 (see below) is set to 15, and
456 .Cm ClientAliveCountMax
457 is left at the default, unresponsive SSH clients
458 will be disconnected after approximately 45 seconds.
459 This option applies to protocol version 2 only.
460 .It Cm ClientAliveInterval
461 Sets a timeout interval in seconds after which if no data has been received
462 from the client,
463 .Xr sshd 8
464 will send a message through the encrypted
465 channel to request a response from the client.
466 The default
467 is 0, indicating that these messages will not be sent to the client.
468 This option applies to protocol version 2 only.
469 .It Cm Compression
470 Specifies whether compression is allowed, or delayed until
471 the user has authenticated successfully.
472 The argument must be
473 .Dq yes ,
474 .Dq delayed ,
475 or
476 .Dq no .
477 The default is
478 .Dq delayed .
479 .It Cm DenyGroups
480 This keyword can be followed by a list of group name patterns, separated
481 by spaces.
482 Login is disallowed for users whose primary group or supplementary
483 group list matches one of the patterns.
484 Only group names are valid; a numerical group ID is not recognized.
485 By default, login is allowed for all groups.
486 The allow/deny directives are processed in the following order:
487 .Cm DenyUsers ,
488 .Cm AllowUsers ,
489 .Cm DenyGroups ,
490 and finally
491 .Cm AllowGroups .
492 .Pp
493 See PATTERNS in
494 .Xr ssh_config 5
495 for more information on patterns.
496 .It Cm DenyUsers
497 This keyword can be followed by a list of user name patterns, separated
498 by spaces.
499 Login is disallowed for user names that match one of the patterns.
500 Only user names are valid; a numerical user ID is not recognized.
501 By default, login is allowed for all users.
502 If the pattern takes the form USER@HOST then USER and HOST
503 are separately checked, restricting logins to particular
504 users from particular hosts.
505 The allow/deny directives are processed in the following order:
506 .Cm DenyUsers ,
507 .Cm AllowUsers ,
508 .Cm DenyGroups ,
509 and finally
510 .Cm AllowGroups .
511 .Pp
512 See PATTERNS in
513 .Xr ssh_config 5
514 for more information on patterns.
515 .It Cm FingerprintHash
516 Specifies the hash algorithm used when logging key fingerprints.
517 Valid options are:
518 .Dq md5
519 and
520 .Dq sha256 .
521 The default is
522 .Dq sha256 .
523 .It Cm ForceCommand
524 Forces the execution of the command specified by
525 .Cm ForceCommand ,
526 ignoring any command supplied by the client and
527 .Pa ~/.ssh/rc
528 if present.
529 The command is invoked by using the user's login shell with the -c option.
530 This applies to shell, command, or subsystem execution.
531 It is most useful inside a
532 .Cm Match
533 block.
534 The command originally supplied by the client is available in the
535 .Ev SSH_ORIGINAL_COMMAND
536 environment variable.
537 Specifying a command of
538 .Dq internal-sftp
539 will force the use of an in-process sftp server that requires no support
540 files when used with
541 .Cm ChrootDirectory .
542 .It Cm GatewayPorts
543 Specifies whether remote hosts are allowed to connect to ports
544 forwarded for the client.
545 By default,
546 .Xr sshd 8
547 binds remote port forwardings to the loopback address.
548 This prevents other remote hosts from connecting to forwarded ports.
549 .Cm GatewayPorts
550 can be used to specify that sshd
551 should allow remote port forwardings to bind to non-loopback addresses, thus
552 allowing other hosts to connect.
553 The argument may be
554 .Dq no
555 to force remote port forwardings to be available to the local host only,
556 .Dq yes
557 to force remote port forwardings to bind to the wildcard address, or
558 .Dq clientspecified
559 to allow the client to select the address to which the forwarding is bound.
560 The default is
561 .Dq no .
562 .It Cm GSSAPIAuthentication
563 Specifies whether user authentication based on GSSAPI is allowed.
564 The default is
565 .Dq no .
566 Note that this option applies to protocol version 2 only.
567 .It Cm GSSAPICleanupCredentials
568 Specifies whether to automatically destroy the user's credentials cache
569 on logout.
570 The default is
571 .Dq yes .
572 Note that this option applies to protocol version 2 only.
573 .It Cm HostbasedAcceptedKeyTypes
574 Specifies the key types that will be accepted for hostbased authentication
575 as a comma-separated pattern list.
576 The default
577 .Dq *
578 will allow all key types.
579 The
580 .Fl Q
581 option of
582 .Xr ssh 1
583 may be used to list supported key types.
584 .It Cm HostbasedAuthentication
585 Specifies whether rhosts or /etc/hosts.equiv authentication together
586 with successful public key client host authentication is allowed
587 (host-based authentication).
588 This option is similar to
589 .Cm RhostsRSAAuthentication
590 and applies to protocol version 2 only.
591 The default is
592 .Dq no .
593 .It Cm HostbasedUsesNameFromPacketOnly
594 Specifies whether or not the server will attempt to perform a reverse
595 name lookup when matching the name in the
596 .Pa ~/.shosts ,
597 .Pa ~/.rhosts ,
598 and
599 .Pa /etc/hosts.equiv
600 files during
601 .Cm HostbasedAuthentication .
602 A setting of
603 .Dq yes
604 means that
605 .Xr sshd 8
606 uses the name supplied by the client rather than
607 attempting to resolve the name from the TCP connection itself.
608 The default is
609 .Dq no .
610 .It Cm HostCertificate
611 Specifies a file containing a public host certificate.
612 The certificate's public key must match a private host key already specified
613 by
614 .Cm HostKey .
615 The default behaviour of
616 .Xr sshd 8
617 is not to load any certificates.
618 .It Cm HostKey
619 Specifies a file containing a private host key
620 used by SSH.
621 The default is
622 .Pa /etc/ssh/ssh_host_key
623 for protocol version 1, and
624 .Pa /etc/ssh/ssh_host_dsa_key ,
625 .Pa /etc/ssh/ssh_host_ecdsa_key ,
626 .Pa /etc/ssh/ssh_host_ed25519_key
627 and
628 .Pa /etc/ssh/ssh_host_rsa_key
629 for protocol version 2.
630 Note that
631 .Xr sshd 8
632 will refuse to use a file if it is group/world-accessible.
633 It is possible to have multiple host key files.
634 .Dq rsa1
635 keys are used for version 1 and
636 .Dq dsa ,
637 .Dq ecdsa ,
638 .Dq ed25519
639 or
640 .Dq rsa
641 are used for version 2 of the SSH protocol.
642 It is also possible to specify public host key files instead.
643 In this case operations on the private key will be delegated
644 to an
645 .Xr ssh-agent 1 .
646 .It Cm HostKeyAgent
647 Identifies the UNIX-domain socket used to communicate
648 with an agent that has access to the private host keys.
649 If
650 .Dq SSH_AUTH_SOCK
651 is specified, the location of the socket will be read from the
652 .Ev SSH_AUTH_SOCK
653 environment variable.
654 .It Cm IgnoreRhosts
655 Specifies that
656 .Pa .rhosts
657 and
658 .Pa .shosts
659 files will not be used in
660 .Cm RhostsRSAAuthentication
661 or
662 .Cm HostbasedAuthentication .
663 .Pp
664 .Pa /etc/hosts.equiv
665 and
666 .Pa /etc/shosts.equiv
667 are still used.
668 The default is
669 .Dq yes .
670 .It Cm IgnoreUserKnownHosts
671 Specifies whether
672 .Xr sshd 8
673 should ignore the user's
674 .Pa ~/.ssh/known_hosts
675 during
676 .Cm RhostsRSAAuthentication
677 or
678 .Cm HostbasedAuthentication .
679 The default is
680 .Dq no .
681 .It Cm IPQoS
682 Specifies the IPv4 type-of-service or DSCP class for the connection.
683 Accepted values are
684 .Dq af11 ,
685 .Dq af12 ,
686 .Dq af13 ,
687 .Dq af21 ,
688 .Dq af22 ,
689 .Dq af23 ,
690 .Dq af31 ,
691 .Dq af32 ,
692 .Dq af33 ,
693 .Dq af41 ,
694 .Dq af42 ,
695 .Dq af43 ,
696 .Dq cs0 ,
697 .Dq cs1 ,
698 .Dq cs2 ,
699 .Dq cs3 ,
700 .Dq cs4 ,
701 .Dq cs5 ,
702 .Dq cs6 ,
703 .Dq cs7 ,
704 .Dq ef ,
705 .Dq lowdelay ,
706 .Dq throughput ,
707 .Dq reliability ,
708 or a numeric value.
709 This option may take one or two arguments, separated by whitespace.
710 If one argument is specified, it is used as the packet class unconditionally.
711 If two values are specified, the first is automatically selected for
712 interactive sessions and the second for non-interactive sessions.
713 The default is
714 .Dq lowdelay
715 for interactive sessions and
716 .Dq throughput
717 for non-interactive sessions.
718 .It Cm KbdInteractiveAuthentication
719 Specifies whether to allow keyboard-interactive authentication.
720 The argument to this keyword must be
721 .Dq yes
722 or
723 .Dq no .
724 The default is to use whatever value
725 .Cm ChallengeResponseAuthentication
726 is set to
727 (by default
728 .Dq yes ) .
729 .It Cm KerberosAuthentication
730 Specifies whether the password provided by the user for
731 .Cm PasswordAuthentication
732 will be validated through the Kerberos KDC.
733 To use this option, the server needs a
734 Kerberos servtab which allows the verification of the KDC's identity.
735 The default is
736 .Dq no .
737 .It Cm KerberosGetAFSToken
738 If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
739 an AFS token before accessing the user's home directory.
740 The default is
741 .Dq no .
742 .It Cm KerberosOrLocalPasswd
743 If password authentication through Kerberos fails then
744 the password will be validated via any additional local mechanism
745 such as
746 .Pa /etc/passwd .
747 The default is
748 .Dq yes .
749 .It Cm KerberosTicketCleanup
750 Specifies whether to automatically destroy the user's ticket cache
751 file on logout.
752 The default is
753 .Dq yes .
754 .It Cm KexAlgorithms
755 Specifies the available KEX (Key Exchange) algorithms.
756 Multiple algorithms must be comma-separated.
757 The supported algorithms are:
758 .Pp
759 .Bl -item -compact -offset indent
760 .It
761 curve25519-sha256@libssh.org
762 .It
763 diffie-hellman-group1-sha1
764 .It
765 diffie-hellman-group14-sha1
766 .It
767 diffie-hellman-group-exchange-sha1
768 .It
769 diffie-hellman-group-exchange-sha256
770 .It
771 ecdh-sha2-nistp256
772 .It
773 ecdh-sha2-nistp384
774 .It
775 ecdh-sha2-nistp521
776 .El
777 .Pp
778 The default is:
779 .Bd -literal -offset indent
780 curve25519-sha256@libssh.org,
781 ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
782 diffie-hellman-group-exchange-sha256,
783 diffie-hellman-group14-sha1
784 .Ed
785 .Pp
786 The list of available key exchange algorithms may also be obtained using the
787 .Fl Q
788 option of
789 .Xr ssh 1
790 with an argument of
791 .Dq kex .
792 .It Cm KeyRegenerationInterval
793 In protocol version 1, the ephemeral server key is automatically regenerated
794 after this many seconds (if it has been used).
795 The purpose of regeneration is to prevent
796 decrypting captured sessions by later breaking into the machine and
797 stealing the keys.
798 The key is never stored anywhere.
799 If the value is 0, the key is never regenerated.
800 The default is 3600 (seconds).
801 .It Cm ListenAddress
802 Specifies the local addresses
803 .Xr sshd 8
804 should listen on.
805 The following forms may be used:
806 .Pp
807 .Bl -item -offset indent -compact
808 .It
809 .Cm ListenAddress
810 .Sm off
811 .Ar host | Ar IPv4_addr | Ar IPv6_addr
812 .Sm on
813 .It
814 .Cm ListenAddress
815 .Sm off
816 .Ar host | Ar IPv4_addr : Ar port
817 .Sm on
818 .It
819 .Cm ListenAddress
820 .Sm off
821 .Oo
822 .Ar host | Ar IPv6_addr Oc : Ar port
823 .Sm on
824 .El
825 .Pp
826 If
827 .Ar port
828 is not specified,
829 sshd will listen on the address and all prior
830 .Cm Port
831 options specified.
832 The default is to listen on all local addresses.
833 Multiple
834 .Cm ListenAddress
835 options are permitted.
836 Additionally, any
837 .Cm Port
838 options must precede this option for non-port qualified addresses.
839 .It Cm LoginGraceTime
840 The server disconnects after this time if the user has not
841 successfully logged in.
842 If the value is 0, there is no time limit.
843 The default is 120 seconds.
844 .It Cm LogLevel
845 Gives the verbosity level that is used when logging messages from
846 .Xr sshd 8 .
847 The possible values are:
848 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
849 The default is INFO.
850 DEBUG and DEBUG1 are equivalent.
851 DEBUG2 and DEBUG3 each specify higher levels of debugging output.
852 Logging with a DEBUG level violates the privacy of users and is not recommended.
853 .It Cm MACs
854 Specifies the available MAC (message authentication code) algorithms.
855 The MAC algorithm is used in protocol version 2
856 for data integrity protection.
857 Multiple algorithms must be comma-separated.
858 The algorithms that contain
859 .Dq -etm
860 calculate the MAC after encryption (encrypt-then-mac).
861 These are considered safer and their use recommended.
862 The supported MACs are:
863 .Pp
864 .Bl -item -compact -offset indent
865 .It
866 hmac-md5
867 .It
868 hmac-md5-96
869 .It
870 hmac-ripemd160
871 .It
872 hmac-sha1
873 .It
874 hmac-sha1-96
875 .It
876 hmac-sha2-256
877 .It
878 hmac-sha2-512
879 .It
880 umac-64@openssh.com
881 .It
882 umac-128@openssh.com
883 .It
884 hmac-md5-etm@openssh.com
885 .It
886 hmac-md5-96-etm@openssh.com
887 .It
888 hmac-ripemd160-etm@openssh.com
889 .It
890 hmac-sha1-etm@openssh.com
891 .It
892 hmac-sha1-96-etm@openssh.com
893 .It
894 hmac-sha2-256-etm@openssh.com
895 .It
896 hmac-sha2-512-etm@openssh.com
897 .It
898 umac-64-etm@openssh.com
899 .It
900 umac-128-etm@openssh.com
901 .El
902 .Pp
903 The default is:
904 .Bd -literal -offset indent
905 umac-64-etm@openssh.com,umac-128-etm@openssh.com,
906 hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
907 umac-64@openssh.com,umac-128@openssh.com,
908 hmac-sha2-256,hmac-sha2-512
909 .Ed
910 .Pp
911 The list of available MAC algorithms may also be obtained using the
912 .Fl Q
913 option of
914 .Xr ssh 1
915 with an argument of
916 .Dq mac .
917 .It Cm Match
918 Introduces a conditional block.
919 If all of the criteria on the
920 .Cm Match
921 line are satisfied, the keywords on the following lines override those
922 set in the global section of the config file, until either another
923 .Cm Match
924 line or the end of the file.
925 If a keyword appears in multiple
926 .Cm Match
927 blocks that are satisfied, only the first instance of the keyword is
928 applied.
929 .Pp
930 The arguments to
931 .Cm Match
932 are one or more criteria-pattern pairs or the single token
933 .Cm All
934 which matches all criteria.
935 The available criteria are
936 .Cm User ,
937 .Cm Group ,
938 .Cm Host ,
939 .Cm LocalAddress ,
940 .Cm LocalPort ,
941 and
942 .Cm Address .
943 The match patterns may consist of single entries or comma-separated
944 lists and may use the wildcard and negation operators described in the
945 PATTERNS section of
946 .Xr ssh_config 5 .
947 .Pp
948 The patterns in an
949 .Cm Address
950 criteria may additionally contain addresses to match in CIDR
951 address/masklen format, e.g.\&
952 .Dq 192.0.2.0/24
953 or
954 .Dq 3ffe:ffff::/32 .
955 Note that the mask length provided must be consistent with the address -
956 it is an error to specify a mask length that is too long for the address
957 or one with bits set in this host portion of the address.
958 For example,
959 .Dq 192.0.2.0/33
960 and
961 .Dq 192.0.2.0/8
962 respectively.
963 .Pp
964 Only a subset of keywords may be used on the lines following a
965 .Cm Match
966 keyword.
967 Available keywords are
968 .Cm AcceptEnv ,
969 .Cm AllowAgentForwarding ,
970 .Cm AllowGroups ,
971 .Cm AllowStreamLocalForwarding ,
972 .Cm AllowTcpForwarding ,
973 .Cm AllowUsers ,
974 .Cm AuthenticationMethods ,
975 .Cm AuthorizedKeysCommand ,
976 .Cm AuthorizedKeysCommandUser ,
977 .Cm AuthorizedKeysFile ,
978 .Cm AuthorizedPrincipalsFile ,
979 .Cm Banner ,
980 .Cm ChrootDirectory ,
981 .Cm DenyGroups ,
982 .Cm DenyUsers ,
983 .Cm ForceCommand ,
984 .Cm GatewayPorts ,
985 .Cm GSSAPIAuthentication ,
986 .Cm HostbasedAcceptedKeyTypes ,
987 .Cm HostbasedAuthentication ,
988 .Cm HostbasedUsesNameFromPacketOnly ,
989 .Cm IPQoS ,
990 .Cm KbdInteractiveAuthentication ,
991 .Cm KerberosAuthentication ,
992 .Cm MaxAuthTries ,
993 .Cm MaxSessions ,
994 .Cm PasswordAuthentication ,
995 .Cm PermitEmptyPasswords ,
996 .Cm PermitOpen ,
997 .Cm PermitRootLogin ,
998 .Cm PermitTTY ,
999 .Cm PermitTunnel ,
1000 .Cm PermitUserRC ,
1001 .Cm PubkeyAcceptedKeyTypes ,
1002 .Cm PubkeyAuthentication ,
1003 .Cm RekeyLimit ,
1004 .Cm RevokedKeys ,
1005 .Cm RhostsRSAAuthentication ,
1006 .Cm RSAAuthentication ,
1007 .Cm StreamLocalBindMask ,
1008 .Cm StreamLocalBindUnlink ,
1009 .Cm TrustedUserCAKeys ,
1010 .Cm X11DisplayOffset ,
1011 .Cm X11Forwarding
1012 and
1013 .Cm X11UseLocalHost .
1014 .It Cm MaxAuthTries
1015 Specifies the maximum number of authentication attempts permitted per
1016 connection.
1017 Once the number of failures reaches half this value,
1018 additional failures are logged.
1019 The default is 6.
1020 .It Cm MaxSessions
1021 Specifies the maximum number of open sessions permitted per network connection.
1022 The default is 10.
1023 .It Cm MaxStartups
1024 Specifies the maximum number of concurrent unauthenticated connections to the
1025 SSH daemon.
1026 Additional connections will be dropped until authentication succeeds or the
1027 .Cm LoginGraceTime
1028 expires for a connection.
1029 The default is 10:30:100.
1030 .Pp
1031 Alternatively, random early drop can be enabled by specifying
1032 the three colon separated values
1033 .Dq start:rate:full
1034 (e.g. "10:30:60").
1035 .Xr sshd 8
1036 will refuse connection attempts with a probability of
1037 .Dq rate/100
1038 (30%)
1039 if there are currently
1040 .Dq start
1041 (10)
1042 unauthenticated connections.
1043 The probability increases linearly and all connection attempts
1044 are refused if the number of unauthenticated connections reaches
1045 .Dq full
1046 (60).
1047 .It Cm PasswordAuthentication
1048 Specifies whether password authentication is allowed.
1049 The default is
1050 .Dq yes .
1051 .It Cm PermitEmptyPasswords
1052 When password authentication is allowed, it specifies whether the
1053 server allows login to accounts with empty password strings.
1054 The default is
1055 .Dq no .
1056 .It Cm PermitOpen
1057 Specifies the destinations to which TCP port forwarding is permitted.
1058 The forwarding specification must be one of the following forms:
1059 .Pp
1060 .Bl -item -offset indent -compact
1061 .It
1062 .Cm PermitOpen
1063 .Sm off
1064 .Ar host : port
1065 .Sm on
1066 .It
1067 .Cm PermitOpen
1068 .Sm off
1069 .Ar IPv4_addr : port
1070 .Sm on
1071 .It
1072 .Cm PermitOpen
1073 .Sm off
1074 .Ar \&[ IPv6_addr \&] : port
1075 .Sm on
1076 .El
1077 .Pp
1078 Multiple forwards may be specified by separating them with whitespace.
1079 An argument of
1080 .Dq any
1081 can be used to remove all restrictions and permit any forwarding requests.
1082 An argument of
1083 .Dq none
1084 can be used to prohibit all forwarding requests.
1085 By default all port forwarding requests are permitted.
1086 .It Cm PermitRootLogin
1087 Specifies whether root can log in using
1088 .Xr ssh 1 .
1089 The argument must be
1090 .Dq yes ,
1091 .Dq without-password ,
1092 .Dq forced-commands-only ,
1093 or
1094 .Dq no .
1095 The default is
1096 .Dq yes .
1097 .Pp
1098 If this option is set to
1099 .Dq without-password ,
1100 password authentication is disabled for root.
1101 .Pp
1102 If this option is set to
1103 .Dq forced-commands-only ,
1104 root login with public key authentication will be allowed,
1105 but only if the
1106 .Ar command
1107 option has been specified
1108 (which may be useful for taking remote backups even if root login is
1109 normally not allowed).
1110 All other authentication methods are disabled for root.
1111 .Pp
1112 If this option is set to
1113 .Dq no ,
1114 root is not allowed to log in.
1115 .It Cm PermitTunnel
1116 Specifies whether
1117 .Xr tun 4
1118 device forwarding is allowed.
1119 The argument must be
1120 .Dq yes ,
1121 .Dq point-to-point
1122 (layer 3),
1123 .Dq ethernet
1124 (layer 2), or
1125 .Dq no .
1126 Specifying
1127 .Dq yes
1128 permits both
1129 .Dq point-to-point
1130 and
1131 .Dq ethernet .
1132 The default is
1133 .Dq no .
1134 .Pp
1135 Independent of this setting, the permissions of the selected
1136 .Xr tun 4
1137 device must allow access to the user.
1138 .It Cm PermitTTY
1139 Specifies whether
1140 .Xr pty 4
1141 allocation is permitted.
1142 The default is
1143 .Dq yes .
1144 .It Cm PermitUserEnvironment
1145 Specifies whether
1146 .Pa ~/.ssh/environment
1147 and
1148 .Cm environment=
1149 options in
1150 .Pa ~/.ssh/authorized_keys
1151 are processed by
1152 .Xr sshd 8 .
1153 The default is
1154 .Dq no .
1155 Enabling environment processing may enable users to bypass access
1156 restrictions in some configurations using mechanisms such as
1157 .Ev LD_PRELOAD .
1158 .It Cm PermitUserRC
1159 Specifies whether any
1160 .Pa ~/.ssh/rc
1161 file is executed.
1162 The default is
1163 .Dq yes .
1164 .It Cm PidFile
1165 Specifies the file that contains the process ID of the
1166 SSH daemon.
1167 The default is
1168 .Pa /var/run/sshd.pid .
1169 .It Cm Port
1170 Specifies the port number that
1171 .Xr sshd 8
1172 listens on.
1173 The default is 22.
1174 Multiple options of this type are permitted.
1175 See also
1176 .Cm ListenAddress .
1177 .It Cm PrintLastLog
1178 Specifies whether
1179 .Xr sshd 8
1180 should print the date and time of the last user login when a user logs
1181 in interactively.
1182 The default is
1183 .Dq yes .
1184 .It Cm PrintMotd
1185 Specifies whether
1186 .Xr sshd 8
1187 should print
1188 .Pa /etc/motd
1189 when a user logs in interactively.
1190 (On some systems it is also printed by the shell,
1191 .Pa /etc/profile ,
1192 or equivalent.)
1193 The default is
1194 .Dq yes .
1195 .It Cm Protocol
1196 Specifies the protocol versions
1197 .Xr sshd 8
1198 supports.
1199 The possible values are
1200 .Sq 1
1201 and
1202 .Sq 2 .
1203 Multiple versions must be comma-separated.
1204 The default is
1205 .Sq 2 .
1206 Note that the order of the protocol list does not indicate preference,
1207 because the client selects among multiple protocol versions offered
1208 by the server.
1209 Specifying
1210 .Dq 2,1
1211 is identical to
1212 .Dq 1,2 .
1213 .It Cm PubkeyAcceptedKeyTypes
1214 Specifies the key types that will be accepted for public key authentication
1215 as a comma-separated pattern list.
1216 The default
1217 .Dq *
1218 will allow all key types.
1219 The
1220 .Fl Q
1221 option of
1222 .Xr ssh 1
1223 may be used to list supported key types.
1224 .It Cm PubkeyAuthentication
1225 Specifies whether public key authentication is allowed.
1226 The default is
1227 .Dq yes .
1228 Note that this option applies to protocol version 2 only.
1229 .It Cm RekeyLimit
1230 Specifies the maximum amount of data that may be transmitted before the
1231 session key is renegotiated, optionally followed a maximum amount of
1232 time that may pass before the session key is renegotiated.
1233 The first argument is specified in bytes and may have a suffix of
1234 .Sq K ,
1235 .Sq M ,
1236 or
1237 .Sq G
1238 to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1239 The default is between
1240 .Sq 1G
1241 and
1242 .Sq 4G ,
1243 depending on the cipher.
1244 The optional second value is specified in seconds and may use any of the
1245 units documented in the
1246 .Sx TIME FORMATS
1247 section.
1248 The default value for
1249 .Cm RekeyLimit
1250 is
1251 .Dq default none ,
1252 which means that rekeying is performed after the cipher's default amount
1253 of data has been sent or received and no time based rekeying is done.
1254 This option applies to protocol version 2 only.
1255 .It Cm RevokedKeys
1256 Specifies revoked public keys.
1257 Keys listed in this file will be refused for public key authentication.
1258 Note that if this file is not readable, then public key authentication will
1259 be refused for all users.
1260 Keys may be specified as a text file, listing one public key per line, or as
1261 an OpenSSH Key Revocation List (KRL) as generated by
1262 .Xr ssh-keygen 1 .
1263 For more information on KRLs, see the KEY REVOCATION LISTS section in
1264 .Xr ssh-keygen 1 .
1265 .It Cm RhostsRSAAuthentication
1266 Specifies whether rhosts or /etc/hosts.equiv authentication together
1267 with successful RSA host authentication is allowed.
1268 The default is
1269 .Dq no .
1270 This option applies to protocol version 1 only.
1271 .It Cm RSAAuthentication
1272 Specifies whether pure RSA authentication is allowed.
1273 The default is
1274 .Dq yes .
1275 This option applies to protocol version 1 only.
1276 .It Cm ServerKeyBits
1277 Defines the number of bits in the ephemeral protocol version 1 server key.
1278 The minimum value is 512, and the default is 1024.
1279 .It Cm StreamLocalBindMask
1280 Sets the octal file creation mode mask
1281 .Pq umask
1282 used when creating a Unix-domain socket file for local or remote
1283 port forwarding.
1284 This option is only used for port forwarding to a Unix-domain socket file.
1285 .Pp
1286 The default value is 0177, which creates a Unix-domain socket file that is
1287 readable and writable only by the owner.
1288 Note that not all operating systems honor the file mode on Unix-domain
1289 socket files.
1290 .It Cm StreamLocalBindUnlink
1291 Specifies whether to remove an existing Unix-domain socket file for local
1292 or remote port forwarding before creating a new one.
1293 If the socket file already exists and
1294 .Cm StreamLocalBindUnlink
1295 is not enabled,
1296 .Nm sshd
1297 will be unable to forward the port to the Unix-domain socket file.
1298 This option is only used for port forwarding to a Unix-domain socket file.
1299 .Pp
1300 The argument must be
1301 .Dq yes
1302 or
1303 .Dq no .
1304 The default is
1305 .Dq no .
1306 .It Cm StrictModes
1307 Specifies whether
1308 .Xr sshd 8
1309 should check file modes and ownership of the
1310 user's files and home directory before accepting login.
1311 This is normally desirable because novices sometimes accidentally leave their
1312 directory or files world-writable.
1313 The default is
1314 .Dq yes .
1315 Note that this does not apply to
1316 .Cm ChrootDirectory ,
1317 whose permissions and ownership are checked unconditionally.
1318 .It Cm Subsystem
1319 Configures an external subsystem (e.g. file transfer daemon).
1320 Arguments should be a subsystem name and a command (with optional arguments)
1321 to execute upon subsystem request.
1322 .Pp
1323 The command
1324 .Xr sftp-server 8
1325 implements the
1326 .Dq sftp
1327 file transfer subsystem.
1328 .Pp
1329 Alternately the name
1330 .Dq internal-sftp
1331 implements an in-process
1332 .Dq sftp
1333 server.
1334 This may simplify configurations using
1335 .Cm ChrootDirectory
1336 to force a different filesystem root on clients.
1337 .Pp
1338 By default no subsystems are defined.
1339 Note that this option applies to protocol version 2 only.
1340 .It Cm SyslogFacility
1341 Gives the facility code that is used when logging messages from
1342 .Xr sshd 8 .
1343 The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1344 LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1345 The default is AUTH.
1346 .It Cm TCPKeepAlive
1347 Specifies whether the system should send TCP keepalive messages to the
1348 other side.
1349 If they are sent, death of the connection or crash of one
1350 of the machines will be properly noticed.
1351 However, this means that
1352 connections will die if the route is down temporarily, and some people
1353 find it annoying.
1354 On the other hand, if TCP keepalives are not sent,
1355 sessions may hang indefinitely on the server, leaving
1356 .Dq ghost
1357 users and consuming server resources.
1358 .Pp
1359 The default is
1360 .Dq yes
1361 (to send TCP keepalive messages), and the server will notice
1362 if the network goes down or the client host crashes.
1363 This avoids infinitely hanging sessions.
1364 .Pp
1365 To disable TCP keepalive messages, the value should be set to
1366 .Dq no .
1367 .It Cm TrustedUserCAKeys
1368 Specifies a file containing public keys of certificate authorities that are
1369 trusted to sign user certificates for authentication.
1370 Keys are listed one per line; empty lines and comments starting with
1371 .Ql #
1372 are allowed.
1373 If a certificate is presented for authentication and has its signing CA key
1374 listed in this file, then it may be used for authentication for any user
1375 listed in the certificate's principals list.
1376 Note that certificates that lack a list of principals will not be permitted
1377 for authentication using
1378 .Cm TrustedUserCAKeys .
1379 For more details on certificates, see the CERTIFICATES section in
1380 .Xr ssh-keygen 1 .
1381 .It Cm UseDNS
1382 Specifies whether
1383 .Xr sshd 8
1384 should look up the remote host name and check that
1385 the resolved host name for the remote IP address maps back to the
1386 very same IP address.
1387 The default is
1388 .Dq no .
1389 .It Cm UseLogin
1390 Specifies whether
1391 .Xr login 1
1392 is used for interactive login sessions.
1393 The default is
1394 .Dq no .
1395 Note that
1396 .Xr login 1
1397 is never used for remote command execution.
1398 Note also, that if this is enabled,
1399 .Cm X11Forwarding
1400 will be disabled because
1401 .Xr login 1
1402 does not know how to handle
1403 .Xr xauth 1
1404 cookies.
1405 If
1406 .Cm UsePrivilegeSeparation
1407 is specified, it will be disabled after authentication.
1408 .It Cm UsePAM
1409 Enables the Pluggable Authentication Module interface.
1410 If set to
1411 .Dq yes
1412 this will enable PAM authentication using
1413 .Cm ChallengeResponseAuthentication
1414 and
1415 .Cm PasswordAuthentication
1416 in addition to PAM account and session module processing for all
1417 authentication types.
1418 .Pp
1419 Because PAM challenge-response authentication usually serves an equivalent
1420 role to password authentication, you should disable either
1421 .Cm PasswordAuthentication
1422 or
1423 .Cm ChallengeResponseAuthentication.
1424 .Pp
1425 If
1426 .Cm UsePAM
1427 is enabled, you will not be able to run
1428 .Xr sshd 8
1429 as a non-root user.
1430 The default is
1431 .Dq no .
1432 .It Cm UsePrivilegeSeparation
1433 Specifies whether
1434 .Xr sshd 8
1435 separates privileges by creating an unprivileged child process
1436 to deal with incoming network traffic.
1437 After successful authentication, another process will be created that has
1438 the privilege of the authenticated user.
1439 The goal of privilege separation is to prevent privilege
1440 escalation by containing any corruption within the unprivileged processes.
1441 The default is
1442 .Dq yes .
1443 If
1444 .Cm UsePrivilegeSeparation
1445 is set to
1446 .Dq sandbox
1447 then the pre-authentication unprivileged process is subject to additional
1448 restrictions.
1449 .It Cm VersionAddendum
1450 Optionally specifies additional text to append to the SSH protocol banner
1451 sent by the server upon connection.
1452 The default is
1453 .Dq none .
1454 .It Cm X11DisplayOffset
1455 Specifies the first display number available for
1456 .Xr sshd 8 Ns 's
1457 X11 forwarding.
1458 This prevents sshd from interfering with real X11 servers.
1459 The default is 10.
1460 .It Cm X11Forwarding
1461 Specifies whether X11 forwarding is permitted.
1462 The argument must be
1463 .Dq yes
1464 or
1465 .Dq no .
1466 The default is
1467 .Dq no .
1468 .Pp
1469 When X11 forwarding is enabled, there may be additional exposure to
1470 the server and to client displays if the
1471 .Xr sshd 8
1472 proxy display is configured to listen on the wildcard address (see
1473 .Cm X11UseLocalhost
1474 below), though this is not the default.
1475 Additionally, the authentication spoofing and authentication data
1476 verification and substitution occur on the client side.
1477 The security risk of using X11 forwarding is that the client's X11
1478 display server may be exposed to attack when the SSH client requests
1479 forwarding (see the warnings for
1480 .Cm ForwardX11
1481 in
1482 .Xr ssh_config 5 ) .
1483 A system administrator may have a stance in which they want to
1484 protect clients that may expose themselves to attack by unwittingly
1485 requesting X11 forwarding, which can warrant a
1486 .Dq no
1487 setting.
1488 .Pp
1489 Note that disabling X11 forwarding does not prevent users from
1490 forwarding X11 traffic, as users can always install their own forwarders.
1491 X11 forwarding is automatically disabled if
1492 .Cm UseLogin
1493 is enabled.
1494 .It Cm X11UseLocalhost
1495 Specifies whether
1496 .Xr sshd 8
1497 should bind the X11 forwarding server to the loopback address or to
1498 the wildcard address.
1499 By default,
1500 sshd binds the forwarding server to the loopback address and sets the
1501 hostname part of the
1502 .Ev DISPLAY
1503 environment variable to
1504 .Dq localhost .
1505 This prevents remote hosts from connecting to the proxy display.
1506 However, some older X11 clients may not function with this
1507 configuration.
1508 .Cm X11UseLocalhost
1509 may be set to
1510 .Dq no
1511 to specify that the forwarding server should be bound to the wildcard
1512 address.
1513 The argument must be
1514 .Dq yes
1515 or
1516 .Dq no .
1517 The default is
1518 .Dq yes .
1519 .It Cm XAuthLocation
1520 Specifies the full pathname of the
1521 .Xr xauth 1
1522 program.
1523 The default is
1524 .Pa /usr/X11R6/bin/xauth .
1525 .El
1526 .Sh TIME FORMATS
1527 .Xr sshd 8
1528 command-line arguments and configuration file options that specify time
1529 may be expressed using a sequence of the form:
1530 .Sm off
1531 .Ar time Op Ar qualifier ,
1532 .Sm on
1533 where
1534 .Ar time
1535 is a positive integer value and
1536 .Ar qualifier
1537 is one of the following:
1538 .Pp
1539 .Bl -tag -width Ds -compact -offset indent
1540 .It Aq Cm none
1541 seconds
1542 .It Cm s | Cm S
1543 seconds
1544 .It Cm m | Cm M
1545 minutes
1546 .It Cm h | Cm H
1547 hours
1548 .It Cm d | Cm D
1549 days
1550 .It Cm w | Cm W
1551 weeks
1552 .El
1553 .Pp
1554 Each member of the sequence is added together to calculate
1555 the total time value.
1556 .Pp
1557 Time format examples:
1558 .Pp
1559 .Bl -tag -width Ds -compact -offset indent
1560 .It 600
1561 600 seconds (10 minutes)
1562 .It 10m
1563 10 minutes
1564 .It 1h30m
1565 1 hour 30 minutes (90 minutes)
1566 .El
1567 .Sh FILES
1568 .Bl -tag -width Ds
1569 .It Pa /etc/ssh/sshd_config
1570 Contains configuration data for
1571 .Xr sshd 8 .
1572 This file should be writable by root only, but it is recommended
1573 (though not necessary) that it be world-readable.
1574 .El
1575 .Sh SEE ALSO
1576 .Xr sshd 8
1577 .Sh AUTHORS
1578 OpenSSH is a derivative of the original and free
1579 ssh 1.2.12 release by Tatu Ylonen.
1580 Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1581 Theo de Raadt and Dug Song
1582 removed many bugs, re-added newer features and
1583 created OpenSSH.
1584 Markus Friedl contributed the support for SSH
1585 protocol versions 1.5 and 2.0.
1586 Niels Provos and Markus Friedl contributed support
1587 for privilege separation.