Debian Codegraph @

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