Debian Codegraph @

upstream/opensuse-leap-16-1/man5/sshd_config.5

raw
1 .\"
2 .\" Author: Tatu Ylonen <[email protected]>
3 .\" Copyright (c) 1995 Tatu Ylonen <[email protected]>, 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.385 2025/10/04 21:41:35 naddy Exp $
37 .Dd $Mdocdate: October 4 2025 $
38 .Dt SSHD_CONFIG 5
39 .Os
40 .Sh NAME
41 .Nm sshd_config
42 .Nd OpenSSH daemon configuration file
43 .Sh DESCRIPTION
44 .Xr sshd 8
45 reads configuration data from
46 .Pa /etc/ssh/sshd_config
47 (
48 .Pa /usr/etc/ssh/sshd_config
49 if the file does not exist or the file specified with
50 .Fl f
51 on the command line).
52 The file contains keyword-argument pairs, one per line.
53 Unless noted otherwise, for each keyword, the first obtained value will be used.
54 Lines starting with
55 .Ql #
56 and empty lines are interpreted as comments.
57 Arguments may optionally be enclosed in double quotes
58 .Pq \&"
59 in order to represent arguments containing spaces.
60 .Pp
61 The possible
62 keywords and their meanings are as follows (note that
63 keywords are case-insensitive and arguments are case-sensitive):
64 .Bl -tag -width Ds
65 .It Cm AcceptEnv
66 Specifies what environment variables sent by the client will be copied into
67 the session's
68 .Xr environ 7 .
69 See
70 .Cm SendEnv
71 and
72 .Cm SetEnv
73 in
74 .Xr ssh_config 5
75 for how to configure the client.
76 The
77 .Ev TERM
78 environment variable is always accepted whenever the client
79 requests a pseudo-terminal as it is required by the protocol.
80 Variables are specified by name, which may contain the wildcard characters
81 .Ql *
82 and
83 .Ql \&? .
84 Multiple environment variables may be separated by whitespace or spread
85 across multiple
86 .Cm AcceptEnv
87 directives.
88 Be warned that some environment variables could be used to bypass restricted
89 user environments.
90 For this reason, care should be taken in the use of this directive.
91 The default is not to accept any environment variables.
92 .It Cm AddressFamily
93 Specifies which address family should be used by
94 .Xr sshd 8 .
95 Valid arguments are
96 .Cm any
97 (the default),
98 .Cm inet
99 (use IPv4 only), or
100 .Cm inet6
101 (use IPv6 only).
102 .It Cm AllowAgentForwarding
103 Specifies whether
104 .Xr ssh-agent 1
105 forwarding is permitted.
106 The default is
107 .Cm yes .
108 Note that disabling agent forwarding does not improve security
109 unless users are also denied shell access, as they can always install
110 their own forwarders.
111 .It Cm AllowGroups
112 This keyword can be followed by a list of group name patterns, separated
113 by spaces.
114 If specified, login is allowed only for users whose primary
115 group or supplementary group list matches one of the patterns.
116 Only group names are valid; a numerical group ID is not recognized.
117 By default, login is allowed for all groups.
118 The allow/deny groups directives are processed in the following order:
119 .Cm DenyGroups ,
120 .Cm AllowGroups .
121 .Pp
122 See PATTERNS in
123 .Xr ssh_config 5
124 for more information on patterns.
125 This keyword may appear multiple times in
126 .Nm
127 with each instance appending to the list.
128 .It Cm AllowStreamLocalForwarding
129 Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
130 The available options are
131 .Cm yes
132 (the default)
133 or
134 .Cm all
135 to allow StreamLocal forwarding,
136 .Cm no
137 to prevent all StreamLocal forwarding,
138 .Cm local
139 to allow local (from the perspective of
140 .Xr ssh 1 )
141 forwarding only or
142 .Cm remote
143 to allow remote forwarding only.
144 Note that disabling StreamLocal forwarding does not improve security unless
145 users are also denied shell access, as they can always install their
146 own forwarders.
147 .It Cm AllowTcpForwarding
148 Specifies whether TCP forwarding is permitted.
149 The available options are
150 .Cm yes
151 (the default)
152 or
153 .Cm all
154 to allow TCP forwarding,
155 .Cm no
156 to prevent all TCP forwarding,
157 .Cm local
158 to allow local (from the perspective of
159 .Xr ssh 1 )
160 forwarding only or
161 .Cm remote
162 to allow remote forwarding only.
163 Note that disabling TCP forwarding does not improve security unless
164 users are also denied shell access, as they can always install their
165 own forwarders.
166 .It Cm AllowUsers
167 This keyword can be followed by a list of user name patterns, separated
168 by spaces.
169 If specified, login is allowed only for user names that
170 match one of the patterns.
171 Only user names are valid; a numerical user ID is not recognized.
172 By default, login is allowed for all users.
173 If the pattern takes the form USER@HOST then USER and HOST
174 are separately checked, restricting logins to particular
175 users from particular hosts.
176 HOST criteria may additionally contain addresses to match in CIDR
177 address/masklen format.
178 The allow/deny users directives are processed in the following order:
179 .Cm DenyUsers ,
180 .Cm AllowUsers .
181 .Pp
182 See PATTERNS in
183 .Xr ssh_config 5
184 for more information on patterns.
185 This keyword may appear multiple times in
186 .Nm
187 with each instance appending to the list.
188 .It Cm AuthenticationMethods
189 Specifies the authentication methods that must be successfully completed
190 for a user to be granted access.
191 This option must be followed by one or more lists of comma-separated
192 authentication method names, or by the single string
193 .Cm any
194 to indicate the default behaviour of accepting any single authentication
195 method.
196 If the default is overridden, then successful authentication requires
197 completion of every method in at least one of these lists.
198 .Pp
199 For example,
200 .Qq publickey,password publickey,keyboard-interactive
201 would require the user to complete public key authentication, followed by
202 either password or keyboard interactive authentication.
203 Only methods that are next in one or more lists are offered at each stage,
204 so for this example it would not be possible to attempt password or
205 keyboard-interactive authentication before public key.
206 .Pp
207 For keyboard interactive authentication it is also possible to
208 restrict authentication to a specific device by appending a
209 colon followed by the device identifier
210 .Cm bsdauth
211 or
212 .Cm pam .
213 depending on the server configuration.
214 For example,
215 .Qq keyboard-interactive:bsdauth
216 would restrict keyboard interactive authentication to the
217 .Cm bsdauth
218 device.
219 .Pp
220 If the publickey method is listed more than once,
221 .Xr sshd 8
222 verifies that keys that have been used successfully are not reused for
223 subsequent authentications.
224 For example,
225 .Qq publickey,publickey
226 requires successful authentication using two different public keys.
227 .Pp
228 Note that each authentication method listed should also be explicitly enabled
229 in the configuration.
230 .Pp
231 The available authentication methods are:
232 .Qq gssapi-with-mic ,
233 .Qq hostbased ,
234 .Qq keyboard-interactive ,
235 .Qq none
236 (used for access to password-less accounts when
237 .Cm PermitEmptyPasswords
238 is enabled),
239 .Qq password
240 and
241 .Qq publickey .
242 .It Cm AuthorizedKeysCommand
243 Specifies a program to be used to look up the user's public keys.
244 The program must be owned by root, not writable by group or others and
245 specified by an absolute path.
246 Arguments to
247 .Cm AuthorizedKeysCommand
248 accept the tokens described in the
249 .Sx TOKENS
250 section.
251 If no arguments are specified then the username of the target user is used.
252 .Pp
253 The program should produce on standard output zero or
254 more lines of authorized_keys output (see
255 .Cm AUTHORIZED_KEYS
256 in
257 .Xr sshd 8 ) .
258 .Cm AuthorizedKeysCommand
259 is tried after the usual
260 .Cm AuthorizedKeysFile
261 files and will not be executed if a matching key is found there.
262 By default, no
263 .Cm AuthorizedKeysCommand
264 is run.
265 .It Cm AuthorizedKeysCommandUser
266 Specifies the user under whose account the
267 .Cm AuthorizedKeysCommand
268 is run.
269 It is recommended to use a dedicated user that has no other role on the host
270 than running authorized keys commands.
271 If
272 .Cm AuthorizedKeysCommand
273 is specified but
274 .Cm AuthorizedKeysCommandUser
275 is not, then
276 .Xr sshd 8
277 will refuse to start.
278 .It Cm AuthorizedKeysFile
279 Specifies the file that contains the public keys used for user authentication.
280 The format is described in the AUTHORIZED_KEYS FILE FORMAT section of
281 .Xr sshd 8 .
282 Arguments to
283 .Cm AuthorizedKeysFile
284 may include wildcards and accept the tokens described in the
285 .Sx TOKENS
286 section.
287 After expansion,
288 .Cm AuthorizedKeysFile
289 is taken to be an absolute path or one relative to the user's home
290 directory.
291 Multiple files may be listed, separated by whitespace.
292 Alternately this option may be set to
293 .Cm none
294 to skip checking for user keys in files.
295 The default is
296 .Qq .ssh/authorized_keys .ssh/authorized_keys2 .
297 .It Cm AuthorizedPrincipalsCommand
298 Specifies a program to be used to generate the list of allowed
299 certificate principals as per
300 .Cm AuthorizedPrincipalsFile .
301 The program must be owned by root, not writable by group or others and
302 specified by an absolute path.
303 Arguments to
304 .Cm AuthorizedPrincipalsCommand
305 accept the tokens described in the
306 .Sx TOKENS
307 section.
308 If no arguments are specified then the username of the target user is used.
309 .Pp
310 The program should produce on standard output zero or
311 more lines of
312 .Cm AuthorizedPrincipalsFile
313 output.
314 If either
315 .Cm AuthorizedPrincipalsCommand
316 or
317 .Cm AuthorizedPrincipalsFile
318 is specified, then certificates offered by the client for authentication
319 must contain a principal that is listed.
320 By default, no
321 .Cm AuthorizedPrincipalsCommand
322 is run.
323 .It Cm AuthorizedPrincipalsCommandUser
324 Specifies the user under whose account the
325 .Cm AuthorizedPrincipalsCommand
326 is run.
327 It is recommended to use a dedicated user that has no other role on the host
328 than running authorized principals commands.
329 If
330 .Cm AuthorizedPrincipalsCommand
331 is specified but
332 .Cm AuthorizedPrincipalsCommandUser
333 is not, then
334 .Xr sshd 8
335 will refuse to start.
336 .It Cm AuthorizedPrincipalsFile
337 Specifies a file that lists principal names that are accepted for
338 certificate authentication.
339 When using certificates signed by a key listed in
340 .Cm TrustedUserCAKeys ,
341 this file lists names, one of which must appear in the certificate for it
342 to be accepted for authentication.
343 Names are listed one per line preceded by key options (as described in
344 .Cm AUTHORIZED_KEYS FILE FORMAT
345 in
346 .Xr sshd 8 ) .
347 Empty lines and comments starting with
348 .Ql #
349 are ignored.
350 .Pp
351 Arguments to
352 .Cm AuthorizedPrincipalsFile
353 may include wildcards and accept the tokens described in the
354 .Sx TOKENS
355 section.
356 After expansion,
357 .Cm AuthorizedPrincipalsFile
358 is taken to be an absolute path or one relative to the user's home directory.
359 The default is
360 .Cm none ,
361 i.e. not to use a principals file \(en in this case, the username
362 of the user must appear in a certificate's principals list for it to be
363 accepted.
364 .Pp
365 Note that
366 .Cm AuthorizedPrincipalsFile
367 is only used when authentication proceeds using a CA listed in
368 .Cm TrustedUserCAKeys
369 and is not consulted for certification authorities trusted via
370 .Pa ~/.ssh/authorized_keys ,
371 though the
372 .Cm principals=
373 key option offers a similar facility (see
374 .Xr sshd 8
375 for details).
376 .It Cm Banner
377 The contents of the specified file are sent to the remote user before
378 authentication is allowed.
379 If the argument is
380 .Cm none
381 then no banner is displayed.
382 By default, no banner is displayed.
383 .It Cm CASignatureAlgorithms
384 The default is handled system-wide by
385 .Xr crypto-policies 7 .
386 Information about defaults, how to modify the defaults and how to customize
387 existing policies with sub-policies are present in manual page
388 .Xr update-crypto-policies 8 .
389 .Pp
390 Specifies which algorithms are allowed for signing of certificates
391 by certificate authorities (CAs).
392 If the specified list begins with a
393 .Sq +
394 character, then the specified algorithms will be appended to the default set
395 instead of replacing them.
396 If the specified list begins with a
397 .Sq -
398 character, then the specified algorithms (including wildcards) will be removed
399 from the default set instead of replacing them.
400 .Pp
401 Certificates signed using other algorithms will not be accepted for
402 public key or host-based authentication.
403 .It Cm ChannelTimeout
404 Specifies whether and how quickly
405 .Xr sshd 8
406 should close inactive channels.
407 Timeouts are specified as one or more
408 .Dq type=interval
409 pairs separated by whitespace, where the
410 .Dq type
411 must be the special keyword
412 .Dq global
413 or a channel type name from the list below, optionally containing
414 wildcard characters.
415 .Pp
416 The timeout value
417 .Dq interval
418 is specified in seconds or may use any of the units documented in the
419 .Sx TIME FORMATS
420 section.
421 For example,
422 .Dq session=5m
423 would cause interactive sessions to terminate after five minutes of
424 inactivity.
425 Specifying a zero value disables the inactivity timeout.
426 .Pp
427 The special timeout
428 .Dq global
429 applies to all active channels, taken together.
430 Traffic on any active channel will reset the timeout, but when the timeout
431 expires then all open channels will be closed.
432 Note that this global timeout is not matched by wildcards and must be
433 specified explicitly.
434 .Pp
435 The available channel type names include:
436 .Bl -tag -width Ds
437 .It Cm agent-connection
438 Open connections to
439 .Xr ssh-agent 1 .
440 .It Cm direct-tcpip , Cm [email protected]
441 Open TCP or Unix socket (respectively) connections that have
442 been established from an
443 .Xr ssh 1
444 local forwarding, i.e.\&
445 .Cm LocalForward
446 or
447 .Cm DynamicForward .
448 .It Cm forwarded-tcpip , Cm [email protected]
449 Open TCP or Unix socket (respectively) connections that have been
450 established to an
451 .Xr sshd 8
452 listening on behalf of an
453 .Xr ssh 1
454 remote forwarding, i.e.\&
455 .Cm RemoteForward .
456 .It Cm session
457 The interactive main session, including shell session, command execution,
458 .Xr scp 1 ,
459 .Xr sftp 1 ,
460 etc.
461 .It Cm tun-connection
462 Open
463 .Cm TunnelForward
464 connections.
465 .It Cm x11-connection
466 Open X11 forwarding sessions.
467 .El
468 .Pp
469 Note that in all the above cases, terminating an inactive session does not
470 guarantee to remove all resources associated with the session, e.g. shell
471 processes or X11 clients relating to the session may continue to execute.
472 .Pp
473 Moreover, terminating an inactive channel or session does not necessarily
474 close the SSH connection, nor does it prevent a client from
475 requesting another channel of the same type.
476 In particular, expiring an inactive forwarding session does not prevent
477 another identical forwarding from being subsequently created.
478 .Pp
479 The default is not to expire channels of any type for inactivity.
480 .It Cm ChrootDirectory
481 Specifies the pathname of a directory to
482 .Xr chroot 2
483 to after authentication.
484 At session startup
485 .Xr sshd 8
486 checks that all components of the pathname are root-owned directories
487 which are not writable by group or others.
488 After the chroot,
489 .Xr sshd 8
490 changes the working directory to the user's home directory.
491 Arguments to
492 .Cm ChrootDirectory
493 accept the tokens described in the
494 .Sx TOKENS
495 section.
496 .Pp
497 The
498 .Cm ChrootDirectory
499 must contain the necessary files and directories to support the
500 user's session.
501 For an interactive session this requires at least a shell, typically
502 .Xr sh 1 ,
503 and basic
504 .Pa /dev
505 nodes such as
506 .Xr null 4 ,
507 .Xr zero 4 ,
508 .Xr stdin 4 ,
509 .Xr stdout 4 ,
510 .Xr stderr 4 ,
511 and
512 .Xr tty 4
513 devices.
514 For file transfer sessions using SFTP
515 no additional configuration of the environment is necessary if the in-process
516 sftp-server is used,
517 though sessions which use logging may require
518 .Pa /dev/log
519 inside the chroot directory on some operating systems (see
520 .Xr sftp-server 8
521 for details).
522 .Pp
523 For safety, it is very important that the directory hierarchy be
524 prevented from modification by other processes on the system (especially
525 those outside the jail).
526 Misconfiguration can lead to unsafe environments which
527 .Xr sshd 8
528 cannot detect.
529 .Pp
530 The default is
531 .Cm none ,
532 indicating not to
533 .Xr chroot 2 .
534 .It Cm Ciphers
535 The default is handled system-wide by
536 .Xr crypto-policies 7 .
537 Information about defaults, how to modify the defaults and how to customize
538 existing policies with sub-policies are present in manual page
539 .Xr update-crypto-policies 8 .
540 .Pp
541 Specifies the ciphers allowed.
542 Multiple ciphers must be comma-separated.
543 If the specified list begins with a
544 .Sq +
545 character, then the specified ciphers will be appended to the built-in
546 openssh default set instead of replacing them.
547 If the specified list begins with a
548 .Sq -
549 character, then the specified ciphers (including wildcards) will be removed
550 from the built-in openssh default set instead of replacing them.
551 If the specified list begins with a
552 .Sq ^
553 character, then the specified ciphers will be placed at the head of the
554 built-in openssh default set.
555 .Pp
556 The supported ciphers are:
557 .Pp
558 .Bl -item -compact -offset indent
559 .It
560 3des-cbc
561 .It
562 aes128-cbc
563 .It
564 aes192-cbc
565 .It
566 aes256-cbc
567 .It
568 aes128-ctr
569 .It
570 aes192-ctr
571 .It
572 aes256-ctr
573 .It
574 [email protected]
575 .It
576 [email protected]
577 .It
578 [email protected]
579 .El
580 .Pp
581 The list of available ciphers may also be obtained using
582 .Qq ssh -Q cipher .
583 .It Cm ClientAliveCountMax
584 Sets the number of client alive messages which may be sent without
585 .Xr sshd 8
586 receiving any messages back from the client.
587 If this threshold is reached while client alive messages are being sent,
588 sshd will disconnect the client, terminating the session.
589 It is important to note that the use of client alive messages is very
590 different from
591 .Cm TCPKeepAlive .
592 The client alive messages are sent through the encrypted channel
593 and therefore will not be spoofable.
594 The TCP keepalive option enabled by
595 .Cm TCPKeepAlive
596 is spoofable.
597 The client alive mechanism is valuable when the client or
598 server depend on knowing when a connection has become unresponsive.
599 .Pp
600 The default value is 3.
601 If
602 .Cm ClientAliveInterval
603 is set to 15, and
604 .Cm ClientAliveCountMax
605 is left at the default, unresponsive SSH clients
606 will be disconnected after approximately 45 seconds.
607 Setting a zero
608 .Cm ClientAliveCountMax
609 disables connection termination.
610 .It Cm ClientAliveInterval
611 Sets a timeout interval in seconds after which if no data has been received
612 from the client,
613 .Xr sshd 8
614 will send a message through the encrypted
615 channel to request a response from the client.
616 The default
617 is 0, indicating that these messages will not be sent to the client.
618 .It Cm Compression
619 Specifies whether compression is enabled after
620 the user has authenticated successfully.
621 The argument must be
622 .Cm yes ,
623 .Cm delayed
624 (a legacy synonym for
625 .Cm yes )
626 or
627 .Cm no .
628 The default is
629 .Cm yes .
630 .It Cm DenyGroups
631 This keyword can be followed by a list of group name patterns, separated
632 by spaces.
633 Login is disallowed for users whose primary group or supplementary
634 group list matches one of the patterns.
635 Only group names are valid; a numerical group ID is not recognized.
636 By default, login is allowed for all groups.
637 The allow/deny groups directives are processed in the following order:
638 .Cm DenyGroups ,
639 .Cm AllowGroups .
640 .Pp
641 See PATTERNS in
642 .Xr ssh_config 5
643 for more information on patterns.
644 This keyword may appear multiple times in
645 .Nm
646 with each instance appending to the list.
647 .It Cm DenyUsers
648 This keyword can be followed by a list of user name patterns, separated
649 by spaces.
650 Login is disallowed for user names that match one of the patterns.
651 Only user names are valid; a numerical user ID is not recognized.
652 By default, login is allowed for all users.
653 If the pattern takes the form USER@HOST then USER and HOST
654 are separately checked, restricting logins to particular
655 users from particular hosts.
656 HOST criteria may additionally contain addresses to match in CIDR
657 address/masklen format.
658 The allow/deny users directives are processed in the following order:
659 .Cm DenyUsers ,
660 .Cm AllowUsers .
661 .Pp
662 See PATTERNS in
663 .Xr ssh_config 5
664 for more information on patterns.
665 This keyword may appear multiple times in
666 .Nm
667 with each instance appending to the list.
668 .It Cm DisableForwarding
669 Disables all forwarding features, including X11,
670 .Xr ssh-agent 1 ,
671 TCP and StreamLocal.
672 This option overrides all other forwarding-related options and may
673 simplify restricted configurations.
674 .It Cm ExposeAuthInfo
675 Writes a temporary file containing a list of authentication methods and
676 public credentials (e.g. keys) used to authenticate the user.
677 The location of the file is exposed to the user session through the
678 .Ev SSH_USER_AUTH
679 environment variable.
680 The default is
681 .Cm no .
682 .It Cm FingerprintHash
683 Specifies the hash algorithm used when logging key fingerprints.
684 Valid options are:
685 .Cm md5
686 and
687 .Cm sha256 .
688 The default is
689 .Cm sha256 .
690 .Pp
691 In the FIPS mode the minimum of SHA-1 is enforced (which means sha256).
692 .It Cm ForceCommand
693 Forces the execution of the command specified by
694 .Cm ForceCommand ,
695 ignoring any command supplied by the client and
696 .Pa ~/.ssh/rc
697 if present.
698 The command is invoked by using the user's login shell with the -c option.
699 This applies to shell, command, or subsystem execution.
700 It is most useful inside a
701 .Cm Match
702 block.
703 The command originally supplied by the client is available in the
704 .Ev SSH_ORIGINAL_COMMAND
705 environment variable.
706 Specifying a command of
707 .Cm internal-sftp
708 will force the use of an in-process SFTP server that requires no support
709 files when used with
710 .Cm ChrootDirectory .
711 The default is
712 .Cm none .
713 .It Cm GatewayPorts
714 Specifies whether remote hosts are allowed to connect to ports
715 forwarded for the client.
716 By default,
717 .Xr sshd 8
718 binds remote port forwardings to the loopback address.
719 This prevents other remote hosts from connecting to forwarded ports.
720 .Cm GatewayPorts
721 can be used to specify that sshd
722 should allow remote port forwardings to bind to non-loopback addresses, thus
723 allowing other hosts to connect.
724 The argument may be
725 .Cm no
726 to force remote port forwardings to be available to the local host only,
727 .Cm yes
728 to force remote port forwardings to bind to the wildcard address, or
729 .Cm clientspecified
730 to allow the client to select the address to which the forwarding is bound.
731 The default is
732 .Cm no .
733 .It Cm GSSAPIAuthentication
734 Specifies whether user authentication based on GSSAPI is allowed.
735 The default is
736 .Cm no .
737 .It Cm GSSAPICleanupCredentials
738 Specifies whether to automatically destroy the user's credentials cache
739 on logout.
740 The default is
741 .Cm yes .
742 .It Cm GSSAPIKeyExchange
743 Specifies whether key exchange based on GSSAPI is allowed. GSSAPI key exchange
744 doesn't rely on ssh keys to verify host identity.
745 The default is
746 .Cm no .
747 .It Cm GSSAPIStrictAcceptorCheck
748 Determines whether to be strict about the identity of the GSSAPI acceptor
749 a client authenticates against.
750 If set to
751 .Cm yes
752 then the client must authenticate against the host
753 service on the current hostname.
754 If set to
755 .Cm no
756 then the client may authenticate against any service key stored in the
757 machine's default store.
758 This facility is provided to assist with operation on multi homed machines.
759 The default is
760 .Cm yes .
761 .It Cm GSSAPIStoreCredentialsOnRekey
762 Controls whether the user's GSSAPI credentials should be updated following a
763 successful connection rekeying. This option can be used to accepted renewed
764 or updated credentials from a compatible client. The default is
765 .Dq no .
766 .Pp
767 For this to work
768 .Cm GSSAPIKeyExchange
769 needs to be enabled in the server and also used by the client.
770 .It Cm GSSAPIKexAlgorithms
771 The default is handled system-wide by
772 .Xr crypto-policies 7 .
773 Information about defaults, how to modify the defaults and how to customize
774 existing policies with sub-policies are present in manual page
775 .Xr update-crypto-policies 8 .
776 .Pp
777 The list of key exchange algorithms that are accepted by GSSAPI
778 key exchange. Possible values are
779 .Bd -literal -offset 3n
780 gss-gex-sha1-
781 gss-group1-sha1-
782 gss-group14-sha1-
783 gss-group14-sha256-
784 gss-group16-sha512-
785 gss-nistp256-sha256-
786 gss-curve25519-sha256-
787 .Ed
788 This option only applies to connections using GSSAPI.
789 .It Cm HostbasedAcceptedAlgorithms
790 The default is handled system-wide by
791 .Xr crypto-policies 7 .
792 Information about defaults, how to modify the defaults and how to customize
793 existing policies with sub-policies are present in manual page
794 .Xr update-crypto-policies 8 .
795 .Pp
796 Specifies the signature algorithms that will be accepted for hostbased
797 authentication as a list of comma-separated patterns.
798 Alternately if the specified list begins with a
799 .Sq +
800 character, then the specified signature algorithms will be appended to
801 the built-in openssh set instead of replacing them.
802 If the specified list begins with a
803 .Sq -
804 character, then the specified signature algorithms (including wildcards)
805 will be removed from the built-in openssh set instead of replacing them.
806 If the specified list begins with a
807 .Sq ^
808 character, then the specified signature algorithms will be placed at
809 the head of the built-in openssh default set.
810 .Pp
811 The list of available signature algorithms may also be obtained using
812 .Qq ssh -Q HostbasedAcceptedAlgorithms .
813 This was formerly named HostbasedAcceptedKeyTypes.
814 .It Cm HostbasedAuthentication
815 Specifies whether rhosts or /etc/hosts.equiv authentication together
816 with successful public key client host authentication is allowed
817 (host-based authentication).
818 The default is
819 .Cm no .
820 .It Cm HostbasedUsesNameFromPacketOnly
821 Specifies whether or not the server will attempt to perform a reverse
822 name lookup when matching the name in the
823 .Pa ~/.shosts ,
824 .Pa ~/.rhosts ,
825 and
826 .Pa /etc/hosts.equiv
827 files during
828 .Cm HostbasedAuthentication .
829 A setting of
830 .Cm yes
831 means that
832 .Xr sshd 8
833 uses the name supplied by the client rather than
834 attempting to resolve the name from the TCP connection itself.
835 The default is
836 .Cm no .
837 .It Cm HostCertificate
838 Specifies a file containing a public host certificate.
839 The certificate's public key must match a private host key already specified
840 by
841 .Cm HostKey .
842 The default behaviour of
843 .Xr sshd 8
844 is not to load any certificates.
845 .It Cm HostKey
846 Specifies a file containing a private host key
847 used by SSH.
848 The defaults are
849 .Pa /etc/ssh/ssh_host_ecdsa_key ,
850 .Pa /etc/ssh/ssh_host_ed25519_key
851 and
852 .Pa /etc/ssh/ssh_host_rsa_key .
853 .Pp
854 Note that
855 .Xr sshd 8
856 will refuse to use a file if it is group/world-accessible
857 and that the
858 .Cm HostKeyAlgorithms
859 option restricts which of the keys are actually used by
860 .Xr sshd 8 .
861 .Pp
862 It is possible to have multiple host key files.
863 It is also possible to specify public host key files instead.
864 In this case operations on the private key will be delegated
865 to an
866 .Xr ssh-agent 1 .
867 .It Cm HostKeyAgent
868 Identifies the UNIX-domain socket used to communicate
869 with an agent that has access to the private host keys.
870 If the string
871 .Qq SSH_AUTH_SOCK
872 is specified, the location of the socket will be read from the
873 .Ev SSH_AUTH_SOCK
874 environment variable.
875 .It Cm HostKeyAlgorithms
876 The default is handled system-wide by
877 .Xr crypto-policies 7 .
878 Information about defaults, how to modify the defaults and how to customize
879 existing policies with sub-policies are present in manual page
880 .Xr update-crypto-policies 8 .
881 .Pp
882 Specifies the host key signature algorithms
883 that the server offers.
884 The default for this option is:
885 The list of available signature algorithms may also be obtained using
886 .Qq ssh -Q HostKeyAlgorithms .
887 .It Cm IgnoreRhosts
888 Specifies whether to ignore per-user
889 .Pa .rhosts
890 and
891 .Pa .shosts
892 files during
893 .Cm HostbasedAuthentication .
894 The system-wide
895 .Pa /etc/hosts.equiv
896 and
897 .Pa /etc/ssh/ssh/shosts.equiv
898 are still used regardless of this setting.
899 .Pp
900 Accepted values are
901 .Cm yes
902 (the default) to ignore all per-user files,
903 .Cm shosts-only
904 to allow the use of
905 .Pa .shosts
906 but to ignore
907 .Pa .rhosts
908 or
909 .Cm no
910 to allow both
911 .Pa .shosts
912 and
913 .Pa rhosts .
914 .It Cm IgnoreUserKnownHosts
915 Specifies whether
916 .Xr sshd 8
917 should ignore the user's
918 .Pa ~/.ssh/known_hosts
919 during
920 .Cm HostbasedAuthentication
921 and use only the system-wide known hosts file
922 .Pa /etc/ssh/ssh_known_hosts .
923 The default is
924 .Dq no .
925 .It Cm Include
926 Include the specified configuration file(s).
927 Multiple pathnames may be specified and each pathname may contain
928 .Xr glob 7
929 wildcards that will be expanded and processed in lexical order.
930 Files without absolute paths are assumed to be in
931 .Pa /etc/ssh .
932 An
933 .Cm Include
934 directive may appear inside a
935 .Cm Match
936 block
937 to perform conditional inclusion.
938 .It Cm IPQoS
939 Specifies the
940 .Em Differentiated Services Field Codepoint Pq DSCP
941 value for the connection.
942 Accepted values are
943 .Cm af11 ,
944 .Cm af12 ,
945 .Cm af13 ,
946 .Cm af21 ,
947 .Cm af22 ,
948 .Cm af23 ,
949 .Cm af31 ,
950 .Cm af32 ,
951 .Cm af33 ,
952 .Cm af41 ,
953 .Cm af42 ,
954 .Cm af43 ,
955 .Cm cs0 ,
956 .Cm cs1 ,
957 .Cm cs2 ,
958 .Cm cs3 ,
959 .Cm cs4 ,
960 .Cm cs5 ,
961 .Cm cs6 ,
962 .Cm cs7 ,
963 .Cm ef ,
964 .Cm le ,
965 a numeric value, or
966 .Cm none
967 to use the operating system default.
968 This option may take one or two arguments, separated by whitespace.
969 If one argument is specified, it is used as the packet class unconditionally.
970 If two values are specified, the first is automatically selected for
971 interactive sessions and the second for non-interactive sessions.
972 The default is
973 .Cm lowdelay
974 for interactive sessions and
975 .Cm throughput
976 for non-interactive sessions.
977 .It Cm KbdInteractiveAuthentication
978 Specifies whether to allow keyboard-interactive authentication.
979 All authentication styles from
980 .Xr login.defs 5
981 are supported.
982 The default is
983 .Cm yes .
984 The argument to this keyword must be
985 .Cm yes
986 or
987 .Cm no .
988 .Cm ChallengeResponseAuthentication
989 is a deprecated alias for this.
990 .It Cm KerberosAuthentication
991 Specifies whether the password provided by the user for
992 .Cm PasswordAuthentication
993 will be validated through the Kerberos KDC.
994 To use this option, the server needs a
995 Kerberos servtab which allows the verification of the KDC's identity.
996 The default is
997 .Cm no .
998 .It Cm KerberosGetAFSToken
999 If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
1000 an AFS token before accessing the user's home directory.
1001 The default is
1002 .Cm no .
1003 .It Cm KerberosOrLocalPasswd
1004 If password authentication through Kerberos fails then
1005 the password will be validated via any additional local mechanism
1006 such as
1007 .Pa /etc/passwd .
1008 The default is
1009 .Cm yes .
1010 .It Cm KerberosTicketCleanup
1011 Specifies whether to automatically destroy the user's ticket cache
1012 file on logout.
1013 The default is
1014 .Cm yes .
1015 .It Cm KerberosUniqueCCache
1016 Specifies whether to store the acquired tickets in the per-session credential
1017 cache under /tmp/ or whether to use per-user credential cache as configured in
1018 .Pa /etc/krb5.conf .
1019 The default value
1020 .Cm no
1021 can lead to overwriting previous tickets by subseqent connections to the same
1022 user account.
1023 .It Cm KexAlgorithms
1024 The default is handled system-wide by
1025 .Xr crypto-policies 7 .
1026 Information about defaults, how to modify the defaults and how to customize
1027 existing policies with sub-policies are present in manual page
1028 .Xr update-crypto-policies 8 .
1029 .Pp
1030 Specifies the permitted KEX (Key Exchange) algorithms that the server will
1031 offer to clients.
1032 The ordering of this list is not important, as the client specifies the
1033 preference order.
1034 Multiple algorithms must be comma-separated.
1035 .Pp
1036 If the specified list begins with a
1037 .Sq +
1038 character, then the specified methods will be appended to the built-in
1039 openssh default set instead of replacing them.
1040 If the specified list begins with a
1041 .Sq -
1042 character, then the specified algorithms (including wildcards) will be removed
1043 from the built-in openssh default set instead of replacing them.
1044 If the specified list begins with a
1045 .Sq ^
1046 character, then the specified algorithms will be placed at the head of the
1047 built-in openssh default set.
1048 .Pp
1049 The supported algorithms are:
1050 .Pp
1051 .Bl -item -compact -offset indent
1052 .It
1053 curve25519-sha256
1054 .It
1055 [email protected]
1056 .It
1057 diffie-hellman-group1-sha1
1058 .It
1059 diffie-hellman-group14-sha1
1060 .It
1061 diffie-hellman-group14-sha256
1062 .It
1063 diffie-hellman-group16-sha512
1064 .It
1065 diffie-hellman-group18-sha512
1066 .It
1067 diffie-hellman-group-exchange-sha1
1068 .It
1069 diffie-hellman-group-exchange-sha256
1070 .It
1071 ecdh-sha2-nistp256
1072 .It
1073 ecdh-sha2-nistp384
1074 .It
1075 ecdh-sha2-nistp521
1076 .It
1077 mlkem768x25519-sha256
1078 .It
1079 sntrup761x25519-sha512
1080 .It
1081 [email protected]
1082 .El
1083 .Pp
1084 The list of supported key exchange algorithms may also be obtained using
1085 .Qq ssh -Q KexAlgorithms .
1086 .It Cm ListenAddress
1087 Specifies the local addresses
1088 .Xr sshd 8
1089 should listen on.
1090 The following forms may be used:
1091 .Pp
1092 .Bl -item -offset indent -compact
1093 .It
1094 .Cm ListenAddress
1095 .Sm off
1096 .Ar hostname | address
1097 .Sm on
1098 .Op Cm rdomain Ar domain
1099 .It
1100 .Cm ListenAddress
1101 .Sm off
1102 .Ar hostname : port
1103 .Sm on
1104 .Op Cm rdomain Ar domain
1105 .It
1106 .Cm ListenAddress
1107 .Sm off
1108 .Ar IPv4_address : port
1109 .Sm on
1110 .Op Cm rdomain Ar domain
1111 .It
1112 .Cm ListenAddress
1113 .Sm off
1114 .Oo Ar hostname | address Oc : Ar port
1115 .Sm on
1116 .Op Cm rdomain Ar domain
1117 .El
1118 .Pp
1119 The optional
1120 .Cm rdomain
1121 qualifier requests
1122 .Xr sshd 8
1123 listen in an explicit routing domain.
1124 If
1125 .Ar port
1126 is not specified,
1127 sshd will listen on the address and all
1128 .Cm Port
1129 options specified.
1130 The default is to listen on all local addresses on the current default
1131 routing domain.
1132 Multiple
1133 .Cm ListenAddress
1134 options are permitted.
1135 For more information on routing domains, see
1136 .Xr rdomain 4 .
1137 .It Cm LoginGraceTime
1138 The server disconnects after this time if the user has not
1139 successfully logged in.
1140 If the value is 0, there is no time limit.
1141 The default is 120 seconds.
1142 .It Cm LogLevel
1143 Gives the verbosity level that is used when logging messages from
1144 .Xr sshd 8 .
1145 The possible values are:
1146 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1147 The default is INFO.
1148 DEBUG and DEBUG1 are equivalent.
1149 DEBUG2 and DEBUG3 each specify higher levels of debugging output.
1150 Logging with a DEBUG level violates the privacy of users and is not recommended.
1151 .It Cm LogVerbose
1152 Specify one or more overrides to
1153 .Cm LogLevel .
1154 An override consists of one or more pattern lists that matches the
1155 source file, function and line number to force detailed logging for.
1156 For example, an override pattern of:
1157 .Bd -literal -offset indent
1158 kex.c:*:1000,*:kex_exchange_identification():*,packet.c:*
1159 .Ed
1160 .Pp
1161 would enable detailed logging for line 1000 of
1162 .Pa kex.c ,
1163 everything in the
1164 .Fn kex_exchange_identification
1165 function, and all code in the
1166 .Pa packet.c
1167 file.
1168 This option is intended for debugging and no overrides are enabled by default.
1169 .It Cm MACs
1170 The default is handled system-wide by
1171 .Xr crypto-policies 7 .
1172 Information about defaults, how to modify the defaults and how to customize
1173 existing policies with sub-policies are present in manual page
1174 .Xr update-crypto-policies 8 .
1175 .Pp
1176 Specifies the available MAC (message authentication code) algorithms.
1177 The MAC algorithm is used for data integrity protection.
1178 Multiple algorithms must be comma-separated.
1179 If the specified list begins with a
1180 .Sq +
1181 character, then the specified algorithms will be appended to the built-in
1182 openssh default set instead of replacing them.
1183 If the specified list begins with a
1184 .Sq -
1185 character, then the specified algorithms (including wildcards) will be removed
1186 from the built-in openssh default set instead of replacing them.
1187 If the specified list begins with a
1188 .Sq ^
1189 character, then the specified algorithms will be placed at the head of the
1190 built-in openssh default set.
1191 .Pp
1192 The algorithms that contain
1193 .Qq -etm
1194 calculate the MAC after encryption (encrypt-then-mac).
1195 These are considered safer and their use recommended.
1196 The supported MACs are:
1197 .Pp
1198 .Bl -item -compact -offset indent
1199 .It
1200 hmac-md5
1201 .It
1202 hmac-md5-96
1203 .It
1204 hmac-sha1
1205 .It
1206 hmac-sha1-96
1207 .It
1208 hmac-sha2-256
1209 .It
1210 hmac-sha2-512
1211 .It
1212 [email protected]
1213 .It
1214 [email protected]
1215 .It
1216 [email protected]
1217 .It
1218 [email protected]
1219 .It
1220 [email protected]
1221 .It
1222 [email protected]
1223 .It
1224 [email protected]
1225 .It
1226 [email protected]
1227 .It
1228 [email protected]
1229 .It
1230 [email protected]
1231 .El
1232 .Pp
1233 The list of available MAC algorithms may also be obtained using
1234 .Qq ssh -Q mac .
1235 .It Cm Match
1236 Introduces a conditional block.
1237 If all of the criteria on the
1238 .Cm Match
1239 line are satisfied, the keywords on the following lines override those
1240 set in the global section of the config file, until either another
1241 .Cm Match
1242 line or the end of the file.
1243 If a keyword appears in multiple
1244 .Cm Match
1245 blocks that are satisfied, only the first instance of the keyword is
1246 applied.
1247 .Pp
1248 The arguments to
1249 .Cm Match
1250 are one or more criteria-pattern pairs or one of the single token criteria:
1251 .Cm All ,
1252 which matches all criteria, or
1253 .Cm Invalid-User ,
1254 which matches when the requested user-name does not match any known account.
1255 The available criteria are
1256 .Cm User ,
1257 .Cm Group ,
1258 .Cm Host ,
1259 .Cm LocalAddress ,
1260 .Cm LocalPort ,
1261 .Cm Version ,
1262 .Cm RDomain ,
1263 and
1264 .Cm Address
1265 (with
1266 .Cm RDomain
1267 representing the
1268 .Xr rdomain 4
1269 on which the connection was received).
1270 .Pp
1271 The match patterns may consist of single entries or comma-separated
1272 lists and may use the wildcard and negation operators described in the
1273 .Sx PATTERNS
1274 section of
1275 .Xr ssh_config 5 .
1276 .Pp
1277 The patterns in an
1278 .Cm Address
1279 criteria may additionally contain addresses to match in CIDR
1280 address/masklen format,
1281 such as 192.0.2.0/24 or 2001:db8::/32.
1282 Note that the mask length provided must be consistent with the address -
1283 it is an error to specify a mask length that is too long for the address
1284 or one with bits set in this host portion of the address.
1285 For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
1286 .Pp
1287 The
1288 .Cm Version
1289 keyword matches against the version string of
1290 .Xr sshd 8 ,
1291 for example
1292 .Dq OpenSSH_10.0 .
1293 .Pp
1294 Only a subset of keywords may be used on the lines following a
1295 .Cm Match
1296 keyword.
1297 Available keywords are
1298 .Cm AcceptEnv ,
1299 .Cm AllowAgentForwarding ,
1300 .Cm AllowGroups ,
1301 .Cm AllowStreamLocalForwarding ,
1302 .Cm AllowTcpForwarding ,
1303 .Cm AllowUsers ,
1304 .Cm AuthenticationMethods ,
1305 .Cm AuthorizedKeysCommand ,
1306 .Cm AuthorizedKeysCommandUser ,
1307 .Cm AuthorizedKeysFile ,
1308 .Cm AuthorizedPrincipalsCommand ,
1309 .Cm AuthorizedPrincipalsCommandUser ,
1310 .Cm AuthorizedPrincipalsFile ,
1311 .Cm Banner ,
1312 .Cm CASignatureAlgorithms ,
1313 .Cm ChannelTimeout ,
1314 .Cm ChrootDirectory ,
1315 .Cm ClientAliveCountMax ,
1316 .Cm ClientAliveInterval ,
1317 .Cm DenyGroups ,
1318 .Cm DenyUsers ,
1319 .Cm DisableForwarding ,
1320 .Cm ExposeAuthInfo ,
1321 .Cm ForceCommand ,
1322 .Cm GatewayPorts ,
1323 .Cm GSSAPIAuthentication ,
1324 .Cm HostbasedAcceptedAlgorithms ,
1325 .Cm HostbasedAuthentication ,
1326 .Cm HostbasedUsesNameFromPacketOnly ,
1327 .Cm IgnoreRhosts ,
1328 .Cm Include ,
1329 .Cm IPQoS ,
1330 .Cm KbdInteractiveAuthentication ,
1331 .Cm KerberosAuthentication ,
1332 .Cm LogLevel ,
1333 .Cm MaxAuthTries ,
1334 .Cm MaxSessions ,
1335 .Cm PAMServiceName ,
1336 .Cm PasswordAuthentication ,
1337 .Cm PermitEmptyPasswords ,
1338 .Cm PermitListen ,
1339 .Cm PermitOpen ,
1340 .Cm PermitRootLogin ,
1341 .Cm PermitTTY ,
1342 .Cm PermitTunnel ,
1343 .Cm PermitUserRC ,
1344 .Cm PubkeyAcceptedAlgorithms ,
1345 .Cm PubkeyAuthentication ,
1346 .Cm PubkeyAuthOptions ,
1347 .Cm RefuseConnection ,
1348 .Cm RekeyLimit ,
1349 .Cm RevokedKeys ,
1350 .Cm RDomain ,
1351 .Cm SetEnv ,
1352 .Cm StreamLocalBindMask ,
1353 .Cm StreamLocalBindUnlink ,
1354 .Cm TrustedUserCAKeys ,
1355 .Cm UnusedConnectionTimeout ,
1356 .Cm X11DisplayOffset ,
1357 .Cm X11Forwarding
1358 and
1359 .Cm X11UseLocalhost .
1360 .It Cm MaxAuthTries
1361 Specifies the maximum number of authentication attempts permitted per
1362 connection.
1363 Once the number of failures reaches half this value,
1364 additional failures are logged.
1365 The default is 6.
1366 .It Cm MaxSessions
1367 Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
1368 sessions permitted per network connection.
1369 Multiple sessions may be established by clients that support connection
1370 multiplexing.
1371 Setting
1372 .Cm MaxSessions
1373 to 1 will effectively disable session multiplexing, whereas setting it to 0
1374 will prevent all shell, login and subsystem sessions while still permitting
1375 forwarding.
1376 The default is 10.
1377 .It Cm MaxStartups
1378 Specifies the maximum number of concurrent unauthenticated connections to the
1379 SSH daemon.
1380 Additional connections will be dropped until authentication succeeds or the
1381 .Cm LoginGraceTime
1382 expires for a connection.
1383 The default is 10:30:100.
1384 .Pp
1385 Alternatively, random early drop can be enabled by specifying
1386 the three colon separated values
1387 start:rate:full (e.g. "10:30:60").
1388 .Xr sshd 8
1389 will refuse connection attempts with a probability of rate/100 (30%)
1390 if there are currently start (10) unauthenticated connections.
1391 The probability increases linearly and all connection attempts
1392 are refused if the number of unauthenticated connections reaches full (60).
1393 .It Cm ModuliFile
1394 Specifies the
1395 .Xr moduli 5
1396 file that contains the Diffie-Hellman groups used for the
1397 .Dq diffie-hellman-group-exchange-sha1
1398 and
1399 .Dq diffie-hellman-group-exchange-sha256
1400 key exchange methods.
1401 The default is
1402 .Pa /etc/ssh/moduli .
1403 .It Cm PAMServiceName
1404 Specifies the service name used for Pluggable Authentication Modules (PAM)
1405 authentication, authorisation and session controls when
1406 .Cm UsePAM
1407 is enabled.
1408 The default is
1409 .Cm sshd .
1410 .It Cm PasswordAuthentication
1411 Specifies whether password authentication is allowed.
1412 The default is
1413 .Cm yes .
1414 .It Cm PermitEmptyPasswords
1415 When password authentication is allowed, it specifies whether the
1416 server allows login to accounts with empty password strings.
1417 The default is
1418 .Cm no .
1419 .It Cm PermitListen
1420 Specifies the addresses/ports on which a remote TCP port forwarding may listen.
1421 The listen specification must be one of the following forms:
1422 .Pp
1423 .Bl -item -offset indent -compact
1424 .It
1425 .Cm PermitListen
1426 .Sm off
1427 .Ar port
1428 .Sm on
1429 .It
1430 .Cm PermitListen
1431 .Sm off
1432 .Ar host : port
1433 .Sm on
1434 .El
1435 .Pp
1436 Multiple permissions may be specified by separating them with whitespace.
1437 An argument of
1438 .Cm any
1439 can be used to remove all restrictions and permit any listen requests.
1440 An argument of
1441 .Cm none
1442 can be used to prohibit all listen requests.
1443 The host name may contain wildcards as described in the PATTERNS section in
1444 .Xr ssh_config 5 .
1445 The wildcard
1446 .Sq *
1447 can also be used in place of a port number to allow all ports.
1448 By default all port forwarding listen requests are permitted.
1449 Note that the
1450 .Cm GatewayPorts
1451 option may further restrict which addresses may be listened on.
1452 Note also that
1453 .Xr ssh 1
1454 will request a listen host of
1455 .Dq localhost
1456 if no listen host was specifically requested, and this name is
1457 treated differently to explicit localhost addresses of
1458 .Dq 127.0.0.1
1459 and
1460 .Dq ::1 .
1461 .It Cm PermitOpen
1462 Specifies the destinations to which TCP port forwarding is permitted.
1463 The forwarding specification must be one of the following forms:
1464 .Pp
1465 .Bl -item -offset indent -compact
1466 .It
1467 .Cm PermitOpen
1468 .Sm off
1469 .Ar host : port
1470 .Sm on
1471 .It
1472 .Cm PermitOpen
1473 .Sm off
1474 .Ar IPv4_addr : port
1475 .Sm on
1476 .It
1477 .Cm PermitOpen
1478 .Sm off
1479 .Ar \&[ IPv6_addr \&] : port
1480 .Sm on
1481 .El
1482 .Pp
1483 Multiple forwards may be specified by separating them with whitespace.
1484 An argument of
1485 .Cm any
1486 can be used to remove all restrictions and permit any forwarding requests.
1487 An argument of
1488 .Cm none
1489 can be used to prohibit all forwarding requests.
1490 The wildcard
1491 .Sq *
1492 can be used for host or port to allow all hosts or ports respectively.
1493 Otherwise, no pattern matching or address lookups are performed on supplied
1494 names.
1495 By default all port forwarding requests are permitted.
1496 .It Cm PermitRootLogin
1497 Specifies whether root can log in using
1498 .Xr ssh 1 .
1499 The argument must be
1500 .Cm yes ,
1501 .Cm prohibit-password ,
1502 .Cm forced-commands-only ,
1503 or
1504 .Cm no .
1505 The default is
1506 .Cm prohibit-password .
1507 .Pp
1508 If this option is set to
1509 .Cm prohibit-password
1510 (or its deprecated alias,
1511 .Cm without-password ) ,
1512 password and keyboard-interactive authentication are disabled for root.
1513 .Pp
1514 If this option is set to
1515 .Cm forced-commands-only ,
1516 root login with public key authentication will be allowed,
1517 but only if the
1518 .Ar command
1519 option has been specified
1520 (which may be useful for taking remote backups even if root login is
1521 normally not allowed).
1522 All other authentication methods are disabled for root.
1523 .Pp
1524 If this option is set to
1525 .Cm no ,
1526 root is not allowed to log in.
1527 .It Cm PermitTTY
1528 Specifies whether
1529 .Xr pty 4
1530 allocation is permitted.
1531 The default is
1532 .Cm yes .
1533 .It Cm PermitTunnel
1534 Specifies whether
1535 .Xr tun 4
1536 device forwarding is allowed.
1537 The argument must be
1538 .Cm yes ,
1539 .Cm point-to-point
1540 (layer 3),
1541 .Cm ethernet
1542 (layer 2), or
1543 .Cm no .
1544 Specifying
1545 .Cm yes
1546 permits both
1547 .Cm point-to-point
1548 and
1549 .Cm ethernet .
1550 The default is
1551 .Cm no .
1552 .Pp
1553 Independent of this setting, the permissions of the selected
1554 .Xr tun 4
1555 device must allow access to the user.
1556 .It Cm PermitUserEnvironment
1557 Specifies whether
1558 .Pa ~/.ssh/environment
1559 and
1560 .Cm environment=
1561 options in
1562 .Pa ~/.ssh/authorized_keys
1563 are processed by
1564 .Xr sshd 8 .
1565 Valid options are
1566 .Cm yes ,
1567 .Cm no
1568 or a pattern-list specifying which environment variable names to accept
1569 (for example
1570 .Qq LANG,LC_* ) .
1571 The default is
1572 .Cm no .
1573 Enabling environment processing may enable users to bypass access
1574 restrictions in some configurations using mechanisms such as
1575 .Ev LD_PRELOAD .
1576 .It Cm PermitUserRC
1577 Specifies whether any
1578 .Pa ~/.ssh/rc
1579 file is executed.
1580 The default is
1581 .Cm yes .
1582 .It Cm PerSourceMaxStartups
1583 Specifies the number of unauthenticated connections allowed from a
1584 given source address, or
1585 .Dq none
1586 if there is no limit.
1587 This limit is applied in addition to
1588 .Cm MaxStartups ,
1589 whichever is lower.
1590 The default is
1591 .Cm none .
1592 .It Cm PerSourceNetBlockSize
1593 Specifies the number of bits of source address that are grouped together
1594 for the purposes of applying PerSourceMaxStartups limits.
1595 Values for IPv4 and optionally IPv6 may be specified, separated by a colon.
1596 The default is
1597 .Cm 32:128 ,
1598 which means each address is considered individually.
1599 .It Cm PerSourcePenalties
1600 Controls penalties for various conditions that may represent attacks on
1601 .Xr sshd 8 .
1602 If a penalty is enforced against a client then its source address and any
1603 others in the same network, as defined by
1604 .Cm PerSourceNetBlockSize ,
1605 will be refused connection for a period.
1606 .Pp
1607 A penalty doesn't affect concurrent connections in progress, but multiple
1608 penalties from the same source from concurrent connections will accumulate
1609 up to a maximum.
1610 Conversely, penalties are not applied until a minimum threshold time has been
1611 accumulated.
1612 .Pp
1613 Penalties are enabled by default with the default settings listed below
1614 but may disabled using the
1615 .Cm no
1616 keyword.
1617 The defaults may be overridden by specifying one or more of the keywords below,
1618 separated by whitespace.
1619 All keywords accept arguments, e.g.\&
1620 .Qq crash:2m .
1621 .Bl -tag -width Ds
1622 .It Cm crash:duration
1623 Specifies how long to refuse clients that cause a crash of
1624 .Xr sshd 8 (default: 90s).
1625 .It Cm authfail:duration
1626 Specifies how long to refuse clients that disconnect after making one or more
1627 unsuccessful authentication attempts (default: 5s).
1628 .It Cm refuseconnection:duration
1629 Specifies how long to refuse clients that were administratively prohibited
1630 connection via the
1631 .Cm RefuseConnection
1632 option (default: 10s).
1633 .It Cm noauth:duration
1634 Specifies how long to refuse clients that disconnect without attempting
1635 authentication (default: 1s).
1636 This timeout should be used cautiously otherwise it may penalise legitimate
1637 scanning tools such as
1638 .Xr ssh-keyscan 1 .
1639 .It Cm grace-exceeded:duration
1640 Specifies how long to refuse clients that fail to authenticate after
1641 .Cm LoginGraceTime
1642 (default: 10s).
1643 .It Cm max:duration
1644 Specifies the maximum time a particular source address range will be refused
1645 access for (default: 10m).
1646 Repeated penalties will accumulate up to this maximum.
1647 .It Cm min:duration
1648 Specifies the minimum penalty that must accrue before enforcement begins
1649 (default: 15s).
1650 .It Cm max-sources4:number , max-sources6:number
1651 Specifies the maximum number of client IPv4 and IPv6 address ranges to
1652 track for penalties (default: 65536 for both).
1653 .It Cm overflow:mode
1654 Controls how the server behaves when
1655 .Cm max-sources4
1656 or
1657 .Cm max-sources6
1658 is exceeded.
1659 There are two operating modes:
1660 .Cm deny-all ,
1661 which denies all incoming connections other than those exempted via
1662 .Cm PerSourcePenaltyExemptList
1663 until a penalty expires, and
1664 .Cm permissive ,
1665 which allows new connections by removing existing penalties early
1666 (default: permissive).
1667 Note that client penalties below the
1668 .Cm min
1669 threshold count against the total number of tracked penalties.
1670 IPv4 and IPv6 addresses are tracked separately, so an overflow in one will
1671 not affect the other.
1672 .It Cm overflow6:mode
1673 Allows specifying a different overflow mode for IPv6 addresses.
1674 The default it to use the same overflow mode as was specified for IPv4.
1675 .El
1676 .It Cm PerSourcePenaltyExemptList
1677 Specifies a comma-separated list of addresses to exempt from penalties.
1678 This list may contain wildcards and CIDR address/masklen ranges.
1679 Note that the mask length provided must be consistent with the address -
1680 it is an error to specify a mask length that is too long for the address
1681 or one with bits set in this host portion of the address.
1682 For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
1683 The default is not to exempt any addresses.
1684 .It Cm PidFile
1685 Specifies the file that contains the process ID of the
1686 SSH daemon, or
1687 .Cm none
1688 to not write one.
1689 The default is
1690 .Pa /run/sshd.pid .
1691 .It Cm Port
1692 Specifies the port number that
1693 .Xr sshd 8
1694 listens on.
1695 The default is 22.
1696 Multiple options of this type are permitted.
1697 See also
1698 .Cm ListenAddress .
1699 .It Cm PrintLastLog
1700 Specifies whether
1701 .Xr sshd 8
1702 should print the date and time of the last user login when a user logs
1703 in interactively.
1704 The default is
1705 .Cm yes .
1706 .It Cm PrintMotd
1707 Specifies whether
1708 .Xr sshd 8
1709 should print
1710 .Pa /etc/motd
1711 when a user logs in interactively.
1712 (On some systems it is also printed by the shell,
1713 .Pa /etc/profile ,
1714 or equivalent.)
1715 The default is
1716 .Cm yes .
1717 .It Cm PubkeyAcceptedAlgorithms
1718 The default is handled system-wide by
1719 .Xr crypto-policies 7 .
1720 Information about defaults, how to modify the defaults and how to customize
1721 existing policies with sub-policies are present in manual page
1722 .Xr update-crypto-policies 8 .
1723 .Pp
1724 Specifies the signature algorithms that will be accepted for public key
1725 authentication as a list of comma-separated patterns.
1726 Alternately if the specified list begins with a
1727 .Sq +
1728 character, then the specified algorithms will be appended to the built-in
1729 openssh default set instead of replacing them.
1730 If the specified list begins with a
1731 .Sq -
1732 character, then the specified algorithms (including wildcards) will be removed
1733 from the built-in openssh default set instead of replacing them.
1734 If the specified list begins with a
1735 .Sq ^
1736 character, then the specified algorithms will be placed at the head of the
1737 built-in openssh default set.
1738 .Pp
1739 The list of available signature algorithms may also be obtained using
1740 .Qq ssh -Q PubkeyAcceptedAlgorithms .
1741 .It Cm PubkeyAuthOptions
1742 Sets one or more public key authentication options.
1743 The supported keywords are:
1744 .Cm none
1745 (the default; indicating no additional options are enabled),
1746 .Cm touch-required
1747 and
1748 .Cm verify-required .
1749 .Pp
1750 The
1751 .Cm touch-required
1752 option causes public key authentication using a FIDO authenticator algorithm
1753 (i.e.\&
1754 .Cm ecdsa-sk
1755 or
1756 .Cm ed25519-sk )
1757 to always require the signature to attest that a physically present user
1758 explicitly confirmed the authentication (usually by touching the authenticator).
1759 By default,
1760 .Xr sshd 8
1761 requires user presence unless overridden with an authorized_keys option.
1762 The
1763 .Cm touch-required
1764 flag disables this override.
1765 .Pp
1766 The
1767 .Cm verify-required
1768 option requires a FIDO key signature attest that the user was verified,
1769 e.g. via a PIN.
1770 .Pp
1771 Neither the
1772 .Cm touch-required
1773 or
1774 .Cm verify-required
1775 options have any effect for other, non-FIDO, public key types.
1776 .It Cm PubkeyAuthentication
1777 Specifies whether public key authentication is allowed.
1778 The default is
1779 .Cm yes .
1780 .It Cm RefuseConnection
1781 Indicates that
1782 .Xr sshd 8
1783 should unconditionally terminate the connection.
1784 Additionally, a
1785 .Cm refuseconnection
1786 penalty may be recorded against the source of the connection if
1787 .Cm PerSourcePenalties
1788 are enabled.
1789 This option is only really useful in a
1790 .Cm Match
1791 block.
1792 .It Cm RekeyLimit
1793 Specifies the maximum amount of data that may be transmitted or received
1794 before the session key is renegotiated, optionally followed by a maximum
1795 amount of time that may pass before the session key is renegotiated.
1796 The first argument is specified in bytes and may have a suffix of
1797 .Sq K ,
1798 .Sq M ,
1799 or
1800 .Sq G
1801 to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1802 The default is between
1803 .Sq 1G
1804 and
1805 .Sq 4G ,
1806 depending on the cipher.
1807 The optional second value is specified in seconds and may use any of the
1808 units documented in the
1809 .Sx TIME FORMATS
1810 section.
1811 The default value for
1812 .Cm RekeyLimit
1813 is
1814 .Cm default none ,
1815 which means that rekeying is performed after the cipher's default amount
1816 of data has been sent or received and no time based rekeying is done.
1817 .It Cm RequiredRSASize
1818 Specifies the minimum RSA key size (in bits) that
1819 .Xr sshd 8
1820 will accept.
1821 User and host-based authentication keys smaller than this limit will be
1822 refused.
1823 The default is
1824 .Cm 1024
1825 bits.
1826 Note that this limit may only be raised from the default.
1827 .It Cm RevokedKeys
1828 Specifies revoked public keys file, or
1829 .Cm none
1830 to not use one.
1831 Keys listed in this file will be refused for public key authentication.
1832 Note that if this file is not readable, then public key authentication will
1833 be refused for all users.
1834 Keys may be specified as a text file, listing one public key per line, or as
1835 an OpenSSH Key Revocation List (KRL) as generated by
1836 .Xr ssh-keygen 1 .
1837 For more information on KRLs, see the KEY REVOCATION LISTS section in
1838 .Xr ssh-keygen 1 .
1839 .It Cm RDomain
1840 Specifies an explicit routing domain that is applied after authentication
1841 has completed.
1842 The user session, as well as any forwarded or listening IP sockets,
1843 will be bound to this
1844 .Xr rdomain 4 .
1845 If the routing domain is set to
1846 .Cm \&%D ,
1847 then the domain in which the incoming connection was received will be applied.
1848 .It Cm SecurityKeyProvider
1849 Specifies a path to a library that will be used when loading
1850 FIDO authenticator-hosted keys, overriding the default of using
1851 the built-in USB HID support.
1852 .It Cm SetEnv
1853 Specifies one or more environment variables to set in child sessions started
1854 by
1855 .Xr sshd 8
1856 as
1857 .Dq NAME=VALUE .
1858 The environment value may be quoted (e.g. if it contains whitespace
1859 characters).
1860 Environment variables set by
1861 .Cm SetEnv
1862 override the default environment and any variables specified by the user
1863 via
1864 .Cm AcceptEnv
1865 or
1866 .Cm PermitUserEnvironment .
1867 .It Cm SshdAuthPath
1868 Overrides the default path to the
1869 .Cm sshd-auth
1870 binary that is invoked to complete user authentication.
1871 The default is
1872 .Pa /usr/libexec/ssh/sshd-auth .
1873 This option is intended for use by tests.
1874 .It Cm SshdSessionPath
1875 Overrides the default path to the
1876 .Cm sshd-session
1877 binary that is invoked to handle each connection.
1878 The default is
1879 .Pa /usr/libexec/ssh/sshd-session .
1880 This option is intended for use by tests.
1881 .It Cm StreamLocalBindMask
1882 Sets the octal file creation mode mask
1883 .Pq umask
1884 used when creating a Unix-domain socket file for local or remote
1885 port forwarding.
1886 This option is only used for port forwarding to a Unix-domain socket file.
1887 .Pp
1888 The default value is 0177, which creates a Unix-domain socket file that is
1889 readable and writable only by the owner.
1890 Note that not all operating systems honor the file mode on Unix-domain
1891 socket files.
1892 .It Cm StreamLocalBindUnlink
1893 Specifies whether to remove an existing Unix-domain socket file for local
1894 or remote port forwarding before creating a new one.
1895 If the socket file already exists and
1896 .Cm StreamLocalBindUnlink
1897 is not enabled,
1898 .Nm sshd
1899 will be unable to forward the port to the Unix-domain socket file.
1900 This option is only used for port forwarding to a Unix-domain socket file.
1901 .Pp
1902 The argument must be
1903 .Cm yes
1904 or
1905 .Cm no .
1906 The default is
1907 .Cm no .
1908 .It Cm StrictModes
1909 Specifies whether
1910 .Xr sshd 8
1911 should check file modes and ownership of the
1912 user's files and home directory before accepting login.
1913 This is normally desirable because novices sometimes accidentally leave their
1914 directory or files world-writable.
1915 The default is
1916 .Cm yes .
1917 Note that this does not apply to
1918 .Cm ChrootDirectory ,
1919 whose permissions and ownership are checked unconditionally.
1920 .It Cm Subsystem
1921 Configures an external subsystem (e.g. file transfer daemon).
1922 Arguments should be a subsystem name and a command (with optional arguments)
1923 to execute upon subsystem request.
1924 .Pp
1925 The command
1926 .Cm sftp-server
1927 implements the SFTP file transfer subsystem.
1928 .Pp
1929 Alternately the name
1930 .Cm internal-sftp
1931 implements an in-process SFTP server.
1932 This may simplify configurations using
1933 .Cm ChrootDirectory
1934 to force a different filesystem root on clients.
1935 It accepts the same command line arguments as
1936 .Cm sftp-server
1937 and even though it is in-process, settings such as
1938 .Cm LogLevel
1939 or
1940 .Cm SyslogFacility
1941 do not apply to it and must be set explicitly via
1942 command line arguments.
1943 .Pp
1944 By default no subsystems are defined.
1945 .It Cm SyslogFacility
1946 Gives the facility code that is used when logging messages from
1947 .Xr sshd 8 .
1948 The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1949 LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1950 The default is AUTH.
1951 .It Cm TCPKeepAlive
1952 Specifies whether the system should send TCP keepalive messages to the
1953 other side.
1954 If they are sent, death of the connection or crash of one
1955 of the machines will be properly noticed.
1956 However, this means that
1957 connections will die if the route is down temporarily, and some people
1958 find it annoying.
1959 On the other hand, if TCP keepalives are not sent,
1960 sessions may hang indefinitely on the server, leaving
1961 .Qq ghost
1962 users and consuming server resources.
1963 .Pp
1964 The default is
1965 .Cm yes
1966 (to send TCP keepalive messages), and the server will notice
1967 if the network goes down or the client host crashes.
1968 This avoids infinitely hanging sessions.
1969 .Pp
1970 To disable TCP keepalive messages, the value should be set to
1971 .Cm no .
1972 .It Cm TrustedUserCAKeys
1973 Specifies a file containing public keys of certificate authorities that are
1974 trusted to sign user certificates for authentication, or
1975 .Cm none
1976 to not use one.
1977 Keys are listed one per line; empty lines and comments starting with
1978 .Ql #
1979 are allowed.
1980 If a certificate is presented for authentication and has its signing CA key
1981 listed in this file, then it may be used for authentication for any user
1982 listed in the certificate's principals list.
1983 Note that certificates that lack a list of principals will not be permitted
1984 for authentication using
1985 .Cm TrustedUserCAKeys .
1986 For more details on certificates, see the CERTIFICATES section in
1987 .Xr ssh-keygen 1 .
1988 .It Cm UnusedConnectionTimeout
1989 Specifies whether and how quickly
1990 .Xr sshd 8
1991 should close client connections with no open channels.
1992 Open channels include active shell, command execution or subsystem
1993 sessions, connected network, socket, agent or X11 forwardings.
1994 Forwarding listeners, such as those from the
1995 .Xr ssh 1
1996 .Fl R
1997 flag, are not considered as open channels and do not prevent the timeout.
1998 The timeout value
1999 is specified in seconds or may use any of the units documented in the
2000 .Sx TIME FORMATS
2001 section.
2002 .Pp
2003 Note that this timeout starts when the client connection completes
2004 user authentication but before the client has an opportunity to open any
2005 channels.
2006 Caution should be used when using short timeout values, as they may not
2007 provide sufficient time for the client to request and open its channels
2008 before terminating the connection.
2009 .Pp
2010 The default
2011 .Cm none
2012 is to never expire connections for having no open channels.
2013 This option may be useful in conjunction with
2014 .Cm ChannelTimeout .
2015 .It Cm UseDNS
2016 Specifies whether
2017 .Xr sshd 8
2018 should look up the remote host name, and to check that
2019 the resolved host name for the remote IP address maps back to the
2020 very same IP address.
2021 .Pp
2022 If this option is set to
2023 .Cm no
2024 (the default) then only addresses and not host names may be used in
2025 .Pa ~/.ssh/authorized_keys
2026 .Cm from
2027 and
2028 .Nm
2029 .Cm Match
2030 .Cm Host
2031 directives.
2032 .It Cm UsePAM
2033 Enables the Pluggable Authentication Module interface.
2034 If set to
2035 .Cm yes
2036 this will enable PAM authentication using
2037 .Cm KbdInteractiveAuthentication
2038 and
2039 .Cm PasswordAuthentication
2040 in addition to PAM account and session module processing for all
2041 authentication types.
2042 .Pp
2043 Because PAM keyboard-interactive authentication usually serves an equivalent
2044 role to password authentication, you should disable either
2045 .Cm PasswordAuthentication
2046 or
2047 .Cm KbdInteractiveAuthentication .
2048 .Pp
2049 If
2050 .Cm UsePAM
2051 is enabled, you will not be able to run
2052 .Xr sshd 8
2053 as a non-root user.
2054 The default is
2055 .Cm no .
2056 .It Cm UsePAMCheckLocks
2057 When set to
2058 .Dq yes
2059 , the checks whether the account has been locked with
2060 .Pa passwd -l
2061 are performed even when PAM authentication is enabled via
2062 .Cm UsePAM .
2063 This is to ensure that it is not possible to log in with e.g. a
2064 public key (in such a case PAM is used only to set up the session and some PAM
2065 modules will not check whether the account is locked in this scenario). The
2066 default is
2067 .Dq no .
2068 .It Cm VersionAddendum
2069 Optionally specifies additional text to append to the SSH protocol banner
2070 sent by the server upon connection.
2071 The default is
2072 .Cm none .
2073 .It Cm X11DisplayOffset
2074 Specifies the first display number available for
2075 .Xr sshd 8 Ns 's
2076 X11 forwarding.
2077 This prevents sshd from interfering with real X11 servers.
2078 The default is 10.
2079 .It Cm X11Forwarding
2080 Specifies whether X11 forwarding is permitted.
2081 The argument must be
2082 .Cm yes
2083 or
2084 .Cm no .
2085 The default is
2086 .Cm no .
2087 .Pp
2088 When X11 forwarding is enabled, there may be additional exposure to
2089 the server and to client displays if the
2090 .Xr sshd 8
2091 proxy display is configured to listen on the wildcard address (see
2092 .Cm X11UseLocalhost ) ,
2093 though this is not the default.
2094 Additionally, the authentication spoofing and authentication data
2095 verification and substitution occur on the client side.
2096 The security risk of using X11 forwarding is that the client's X11
2097 display server may be exposed to attack when the SSH client requests
2098 forwarding (see the warnings for
2099 .Cm ForwardX11
2100 in
2101 .Xr ssh_config 5 ) .
2102 A system administrator may have a stance in which they want to
2103 protect clients that may expose themselves to attack by unwittingly
2104 requesting X11 forwarding, which can warrant a
2105 .Cm no
2106 setting.
2107 .Pp
2108 Note that disabling X11 forwarding does not prevent users from
2109 forwarding X11 traffic, as users can always install their own forwarders.
2110 .It Cm X11UseLocalhost
2111 Specifies whether
2112 .Xr sshd 8
2113 should bind the X11 forwarding server to the loopback address or to
2114 the wildcard address.
2115 By default,
2116 sshd binds the forwarding server to the loopback address and sets the
2117 hostname part of the
2118 .Ev DISPLAY
2119 environment variable to
2120 .Cm localhost .
2121 This prevents remote hosts from connecting to the proxy display.
2122 However, some older X11 clients may not function with this
2123 configuration.
2124 .Cm X11UseLocalhost
2125 may be set to
2126 .Cm no
2127 to specify that the forwarding server should be bound to the wildcard
2128 address.
2129 The argument must be
2130 .Cm yes
2131 or
2132 .Cm no .
2133 The default is
2134 .Cm yes .
2135 .It Cm XAuthLocation
2136 Specifies the full pathname of the
2137 .Xr xauth 1
2138 program, or
2139 .Cm none
2140 to not use one.
2141 The default is
2142 .Pa /usr/bin/xauth .
2143 .El
2144 .Sh TIME FORMATS
2145 .Xr sshd 8
2146 command-line arguments and configuration file options that specify time
2147 may be expressed using a sequence of the form:
2148 .Sm off
2149 .Ar time Op Ar qualifier ,
2150 .Sm on
2151 where
2152 .Ar time
2153 is a positive integer value and
2154 .Ar qualifier
2155 is one of the following:
2156 .Pp
2157 .Bl -tag -width Ds -compact -offset indent
2158 .It Aq Cm none
2159 seconds
2160 .It Cm s | Cm S
2161 seconds
2162 .It Cm m | Cm M
2163 minutes
2164 .It Cm h | Cm H
2165 hours
2166 .It Cm d | Cm D
2167 days
2168 .It Cm w | Cm W
2169 weeks
2170 .El
2171 .Pp
2172 Each member of the sequence is added together to calculate
2173 the total time value.
2174 .Pp
2175 Time format examples:
2176 .Pp
2177 .Bl -tag -width Ds -compact -offset indent
2178 .It 600
2179 600 seconds (10 minutes)
2180 .It 10m
2181 10 minutes
2182 .It 1h30m
2183 1 hour 30 minutes (90 minutes)
2184 .El
2185 .Sh TOKENS
2186 Arguments to some keywords can make use of tokens,
2187 which are expanded at runtime:
2188 .Pp
2189 .Bl -tag -width XXXX -offset indent -compact
2190 .It %%
2191 A literal
2192 .Sq % .
2193 .It \&%C
2194 Identifies the connection endpoints, containing
2195 four space-separated values: client address, client port number,
2196 server address, and server port number.
2197 .It \&%D
2198 The routing domain in which the incoming connection was received.
2199 .It %F
2200 The fingerprint of the CA key.
2201 .It %f
2202 The fingerprint of the key or certificate.
2203 .It %h
2204 The home directory of the user.
2205 .It %i
2206 The key ID in the certificate.
2207 .It %K
2208 The base64-encoded CA key.
2209 .It %k
2210 The base64-encoded key or certificate for authentication.
2211 .It %s
2212 The serial number of the certificate.
2213 .It \&%T
2214 The type of the CA key.
2215 .It %t
2216 The key or certificate type.
2217 .It \&%U
2218 The numeric user ID of the target user.
2219 .It %u
2220 The username.
2221 .El
2222 .Pp
2223 .Cm AuthorizedKeysCommand
2224 accepts the tokens %%, %C, %D, %f, %h, %k, %t, %U, and %u.
2225 .Pp
2226 .Cm AuthorizedKeysFile
2227 accepts the tokens %%, %h, %U, and %u.
2228 .Pp
2229 .Cm AuthorizedPrincipalsCommand
2230 accepts the tokens %%, %C, %D, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u.
2231 .Pp
2232 .Cm AuthorizedPrincipalsFile
2233 accepts the tokens %%, %h, %U, and %u.
2234 .Pp
2235 .Cm ChrootDirectory
2236 accepts the tokens %%, %h, %U, and %u.
2237 .Pp
2238 .Cm RoutingDomain
2239 accepts the token %D.
2240 .Sh FILES
2241 .Bl -tag -width Ds
2242 .It Pa /etc/ssh/sshd_config
2243 Contains configuration data for
2244 .Xr sshd 8 .
2245 This file should be writable by root only, but it is recommended
2246 (though not necessary) that it be world-readable.
2247 .El
2248 .Sh SEE ALSO
2249 .Xr sftp-server 8 ,
2250 .Xr sshd 8 ,
2251 .Xr crypto-policies 7 ,
2252 .Xr update-crypto-policies 8
2253 .Sh AUTHORS
2254 .An -nosplit
2255 OpenSSH is a derivative of the original and free
2256 ssh 1.2.12 release by
2257 .An Tatu Ylonen .
2258 .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
2259 .An Theo de Raadt
2260 and
2261 .An Dug Song
2262 removed many bugs, re-added newer features and
2263 created OpenSSH.
2264 .An Markus Friedl
2265 contributed the support for SSH protocol versions 1.5 and 2.0.
2266 .An Niels Provos
2267 and
2268 .An Markus Friedl
2269 contributed support for privilege separation.