Debian Codegraph @

upstream/mageia-cauldron/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.381 2025/02/15 01:52:07 djm Exp $
37 .Dd $Mdocdate: February 15 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 a
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 a
448 .Xr sshd 8
449 listening on behalf of a
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 GSSAPIStrictAcceptorCheck
737 Determines whether to be strict about the identity of the GSSAPI acceptor
738 a client authenticates against.
739 If set to
740 .Cm yes
741 then the client must authenticate against the host
742 service on the current hostname.
743 If set to
744 .Cm no
745 then the client may authenticate against any service key stored in the
746 machine's default store.
747 This facility is provided to assist with operation on multi homed machines.
748 The default is
749 .Cm yes .
750 .It Cm HostbasedAcceptedAlgorithms
751 Specifies the signature algorithms that will be accepted for hostbased
752 authentication as a list of comma-separated patterns.
753 Alternately if the specified list begins with a
754 .Sq +
755 character, then the specified signature algorithms will be appended to
756 the default set instead of replacing them.
757 If the specified list begins with a
758 .Sq -
759 character, then the specified signature algorithms (including wildcards)
760 will be removed from the default set instead of replacing them.
761 If the specified list begins with a
762 .Sq ^
763 character, then the specified signature algorithms will be placed at
764 the head of the default set.
765 The default for this option is:
766 .Bd -literal -offset 3n
767 [email protected],
768 [email protected],
769 [email protected],
770 [email protected],
771 [email protected],
772 [email protected],
773 [email protected],
774 [email protected],
775 ssh-ed25519,
776 ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
777 [email protected],
778 [email protected],
779 rsa-sha2-512,rsa-sha2-256
780 .Ed
781 .Pp
782 The list of available signature algorithms may also be obtained using
783 .Qq ssh -Q HostbasedAcceptedAlgorithms .
784 This was formerly named HostbasedAcceptedKeyTypes.
785 .It Cm HostbasedAuthentication
786 Specifies whether rhosts or /etc/hosts.equiv authentication together
787 with successful public key client host authentication is allowed
788 (host-based authentication).
789 The default is
790 .Cm no .
791 .It Cm HostbasedUsesNameFromPacketOnly
792 Specifies whether or not the server will attempt to perform a reverse
793 name lookup when matching the name in the
794 .Pa ~/.shosts ,
795 .Pa ~/.rhosts ,
796 and
797 .Pa /etc/hosts.equiv
798 files during
799 .Cm HostbasedAuthentication .
800 A setting of
801 .Cm yes
802 means that
803 .Xr sshd 8
804 uses the name supplied by the client rather than
805 attempting to resolve the name from the TCP connection itself.
806 The default is
807 .Cm no .
808 .It Cm HostCertificate
809 Specifies a file containing a public host certificate.
810 The certificate's public key must match a private host key already specified
811 by
812 .Cm HostKey .
813 The default behaviour of
814 .Xr sshd 8
815 is not to load any certificates.
816 .It Cm HostKey
817 Specifies a file containing a private host key
818 used by SSH.
819 The defaults are
820 .Pa /etc/ssh/ssh_host_ecdsa_key ,
821 .Pa /etc/ssh/ssh_host_ed25519_key
822 and
823 .Pa /etc/ssh/ssh_host_rsa_key .
824 .Pp
825 Note that
826 .Xr sshd 8
827 will refuse to use a file if it is group/world-accessible
828 and that the
829 .Cm HostKeyAlgorithms
830 option restricts which of the keys are actually used by
831 .Xr sshd 8 .
832 .Pp
833 It is possible to have multiple host key files.
834 It is also possible to specify public host key files instead.
835 In this case operations on the private key will be delegated
836 to an
837 .Xr ssh-agent 1 .
838 .It Cm HostKeyAgent
839 Identifies the UNIX-domain socket used to communicate
840 with an agent that has access to the private host keys.
841 If the string
842 .Qq SSH_AUTH_SOCK
843 is specified, the location of the socket will be read from the
844 .Ev SSH_AUTH_SOCK
845 environment variable.
846 .It Cm HostKeyAlgorithms
847 The default is handled system-wide by
848 .Xr crypto-policies 7 .
849 Information about defaults, how to modify the defaults and how to customize existing policies with sub-policies are present in manual page
850 .Xr update-crypto-policies 8 .
851 .Pp
852 Specifies the host key signature algorithms
853 that the server offers.
854 The default for this option is:
855 The list of available signature algorithms may also be obtained using
856 .Qq ssh -Q HostKeyAlgorithms .
857 .It Cm IgnoreRhosts
858 Specifies whether to ignore per-user
859 .Pa .rhosts
860 and
861 .Pa .shosts
862 files during
863 .Cm HostbasedAuthentication .
864 The system-wide
865 .Pa /etc/hosts.equiv
866 and
867 .Pa /etc/ssh/shosts.equiv
868 are still used regardless of this setting.
869 .Pp
870 Accepted values are
871 .Cm yes
872 (the default) to ignore all per-user files,
873 .Cm shosts-only
874 to allow the use of
875 .Pa .shosts
876 but to ignore
877 .Pa .rhosts
878 or
879 .Cm no
880 to allow both
881 .Pa .shosts
882 and
883 .Pa rhosts .
884 .It Cm IgnoreUserKnownHosts
885 Specifies whether
886 .Xr sshd 8
887 should ignore the user's
888 .Pa ~/.ssh/known_hosts
889 during
890 .Cm HostbasedAuthentication
891 and use only the system-wide known hosts file
892 .Pa /etc/ssh/ssh_known_hosts .
893 The default is
894 .Dq no .
895 .It Cm Include
896 Include the specified configuration file(s).
897 Multiple pathnames may be specified and each pathname may contain
898 .Xr glob 7
899 wildcards that will be expanded and processed in lexical order.
900 Files without absolute paths are assumed to be in
901 .Pa /etc/ssh .
902 An
903 .Cm Include
904 directive may appear inside a
905 .Cm Match
906 block
907 to perform conditional inclusion.
908 .It Cm IPQoS
909 Specifies the IPv4 type-of-service or DSCP class for the connection.
910 Accepted values are
911 .Cm af11 ,
912 .Cm af12 ,
913 .Cm af13 ,
914 .Cm af21 ,
915 .Cm af22 ,
916 .Cm af23 ,
917 .Cm af31 ,
918 .Cm af32 ,
919 .Cm af33 ,
920 .Cm af41 ,
921 .Cm af42 ,
922 .Cm af43 ,
923 .Cm cs0 ,
924 .Cm cs1 ,
925 .Cm cs2 ,
926 .Cm cs3 ,
927 .Cm cs4 ,
928 .Cm cs5 ,
929 .Cm cs6 ,
930 .Cm cs7 ,
931 .Cm ef ,
932 .Cm le ,
933 .Cm lowdelay ,
934 .Cm throughput ,
935 .Cm reliability ,
936 a numeric value, or
937 .Cm none
938 to use the operating system default.
939 This option may take one or two arguments, separated by whitespace.
940 If one argument is specified, it is used as the packet class unconditionally.
941 If two values are specified, the first is automatically selected for
942 interactive sessions and the second for non-interactive sessions.
943 The default is
944 .Cm af21
945 (Low-Latency Data)
946 for interactive sessions and
947 .Cm cs1
948 (Lower Effort)
949 for non-interactive sessions.
950 .It Cm KbdInteractiveAuthentication
951 Specifies whether to allow keyboard-interactive authentication.
952 All authentication styles from
953 .Xr login.conf 5
954 are supported.
955 The default is
956 .Cm yes .
957 The argument to this keyword must be
958 .Cm yes
959 or
960 .Cm no .
961 .Cm ChallengeResponseAuthentication
962 is a deprecated alias for this.
963 .It Cm KerberosAuthentication
964 Specifies whether the password provided by the user for
965 .Cm PasswordAuthentication
966 will be validated through the Kerberos KDC.
967 To use this option, the server needs a
968 Kerberos servtab which allows the verification of the KDC's identity.
969 The default is
970 .Cm no .
971 .It Cm KerberosGetAFSToken
972 If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
973 an AFS token before accessing the user's home directory.
974 The default is
975 .Cm no .
976 .It Cm KerberosOrLocalPasswd
977 If password authentication through Kerberos fails then
978 the password will be validated via any additional local mechanism
979 such as
980 .Pa /etc/passwd .
981 The default is
982 .Cm yes .
983 .It Cm KerberosTicketCleanup
984 Specifies whether to automatically destroy the user's ticket cache
985 file on logout.
986 The default is
987 .Cm yes .
988 .It Cm KexAlgorithms
989 The default is handled system-wide by
990 .Xr crypto-policies 7 .
991 Information about defaults, how to modify the defaults and how to customize existing policies with sub-policies are present in manual page
992 .Xr update-crypto-policies 8 .
993 .Pp
994 Specifies the permitted KEX (Key Exchange) algorithms that the server will
995 offer to clients.
996 The ordering of this list is not important, as the client specifies the
997 preference order.
998 Multiple algorithms must be comma-separated.
999 .Pp
1000 If the specified list begins with a
1001 .Sq +
1002 character, then the specified methods will be appended to the built-in
1003 openssh default set instead of replacing them.
1004 If the specified list begins with a
1005 .Sq -
1006 character, then the specified algorithms (including wildcards) will be removed
1007 from the built-in openssh default set instead of replacing them.
1008 If the specified list begins with a
1009 .Sq ^
1010 character, then the specified algorithms will be placed at the head of the
1011 built-in openssh default set.
1012 .Pp
1013 The supported algorithms are:
1014 .Pp
1015 .Bl -item -compact -offset indent
1016 .It
1017 curve25519-sha256
1018 .It
1019 [email protected]
1020 .It
1021 diffie-hellman-group1-sha1
1022 .It
1023 diffie-hellman-group14-sha1
1024 .It
1025 diffie-hellman-group14-sha256
1026 .It
1027 diffie-hellman-group16-sha512
1028 .It
1029 diffie-hellman-group18-sha512
1030 .It
1031 diffie-hellman-group-exchange-sha1
1032 .It
1033 diffie-hellman-group-exchange-sha256
1034 .It
1035 ecdh-sha2-nistp256
1036 .It
1037 ecdh-sha2-nistp384
1038 .It
1039 ecdh-sha2-nistp521
1040 .It
1041 mlkem768x25519-sha256
1042 .It
1043 sntrup761x25519-sha512
1044 .It
1045 [email protected]
1046 .El
1047 .Pp
1048 The list of supported key exchange algorithms may also be obtained using
1049 .Qq ssh -Q KexAlgorithms .
1050 .It Cm ListenAddress
1051 Specifies the local addresses
1052 .Xr sshd 8
1053 should listen on.
1054 The following forms may be used:
1055 .Pp
1056 .Bl -item -offset indent -compact
1057 .It
1058 .Cm ListenAddress
1059 .Sm off
1060 .Ar hostname | address
1061 .Sm on
1062 .Op Cm rdomain Ar domain
1063 .It
1064 .Cm ListenAddress
1065 .Sm off
1066 .Ar hostname : port
1067 .Sm on
1068 .Op Cm rdomain Ar domain
1069 .It
1070 .Cm ListenAddress
1071 .Sm off
1072 .Ar IPv4_address : port
1073 .Sm on
1074 .Op Cm rdomain Ar domain
1075 .It
1076 .Cm ListenAddress
1077 .Sm off
1078 .Oo Ar hostname | address Oc : Ar port
1079 .Sm on
1080 .Op Cm rdomain Ar domain
1081 .El
1082 .Pp
1083 The optional
1084 .Cm rdomain
1085 qualifier requests
1086 .Xr sshd 8
1087 listen in an explicit routing domain.
1088 If
1089 .Ar port
1090 is not specified,
1091 sshd will listen on the address and all
1092 .Cm Port
1093 options specified.
1094 The default is to listen on all local addresses on the current default
1095 routing domain.
1096 Multiple
1097 .Cm ListenAddress
1098 options are permitted.
1099 For more information on routing domains, see
1100 .Xr rdomain 4 .
1101 .It Cm LoginGraceTime
1102 The server disconnects after this time if the user has not
1103 successfully logged in.
1104 If the value is 0, there is no time limit.
1105 The default is 120 seconds.
1106 .It Cm LogLevel
1107 Gives the verbosity level that is used when logging messages from
1108 .Xr sshd 8 .
1109 The possible values are:
1110 QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
1111 The default is INFO.
1112 DEBUG and DEBUG1 are equivalent.
1113 DEBUG2 and DEBUG3 each specify higher levels of debugging output.
1114 Logging with a DEBUG level violates the privacy of users and is not recommended.
1115 .It Cm LogVerbose
1116 Specify one or more overrides to
1117 .Cm LogLevel .
1118 An override consists of one or more pattern lists that matches the
1119 source file, function and line number to force detailed logging for.
1120 For example, an override pattern of:
1121 .Bd -literal -offset indent
1122 kex.c:*:1000,*:kex_exchange_identification():*,packet.c:*
1123 .Ed
1124 .Pp
1125 would enable detailed logging for line 1000 of
1126 .Pa kex.c ,
1127 everything in the
1128 .Fn kex_exchange_identification
1129 function, and all code in the
1130 .Pa packet.c
1131 file.
1132 This option is intended for debugging and no overrides are enabled by default.
1133 .It Cm MACs
1134 The default is handled system-wide by
1135 .Xr crypto-policies 7 .
1136 Information about defaults, how to modify the defaults and how to customize existing policies with sub-policies are present in manual page
1137 .Xr update-crypto-policies 8 .
1138 .Pp
1139 Specifies the available MAC (message authentication code) algorithms.
1140 The MAC algorithm is used for data integrity protection.
1141 Multiple algorithms must be comma-separated.
1142 If the specified list begins with a
1143 .Sq +
1144 character, then the specified algorithms will be appended to the built-in
1145 openssh default set instead of replacing them.
1146 If the specified list begins with a
1147 .Sq -
1148 character, then the specified algorithms (including wildcards) will be removed
1149 from the built-in openssh default set instead of replacing them.
1150 If the specified list begins with a
1151 .Sq ^
1152 character, then the specified algorithms will be placed at the head of the
1153 built-in openssh default set.
1154 .Pp
1155 The algorithms that contain
1156 .Qq -etm
1157 calculate the MAC after encryption (encrypt-then-mac).
1158 These are considered safer and their use recommended.
1159 The supported MACs are:
1160 .Pp
1161 .Bl -item -compact -offset indent
1162 .It
1163 hmac-md5
1164 .It
1165 hmac-md5-96
1166 .It
1167 hmac-sha1
1168 .It
1169 hmac-sha1-96
1170 .It
1171 hmac-sha2-256
1172 .It
1173 hmac-sha2-512
1174 .It
1175 [email protected]
1176 .It
1177 [email protected]
1178 .It
1179 [email protected]
1180 .It
1181 [email protected]
1182 .It
1183 [email protected]
1184 .It
1185 [email protected]
1186 .It
1187 [email protected]
1188 .It
1189 [email protected]
1190 .It
1191 [email protected]
1192 .It
1193 [email protected]
1194 .El
1195 .Pp
1196 The list of available MAC algorithms may also be obtained using
1197 .Qq ssh -Q mac .
1198 .It Cm Match
1199 Introduces a conditional block.
1200 If all of the criteria on the
1201 .Cm Match
1202 line are satisfied, the keywords on the following lines override those
1203 set in the global section of the config file, until either another
1204 .Cm Match
1205 line or the end of the file.
1206 If a keyword appears in multiple
1207 .Cm Match
1208 blocks that are satisfied, only the first instance of the keyword is
1209 applied.
1210 .Pp
1211 The arguments to
1212 .Cm Match
1213 are one or more criteria-pattern pairs or one of the single token criteria:
1214 .Cm All ,
1215 which matches all criteria, or
1216 .Cm Invalid-User ,
1217 which matches when the requested user-name does not match any known account.
1218 The available criteria are
1219 .Cm User ,
1220 .Cm Group ,
1221 .Cm Host ,
1222 .Cm LocalAddress ,
1223 .Cm LocalPort ,
1224 .Cm Version ,
1225 .Cm RDomain ,
1226 and
1227 .Cm Address
1228 (with
1229 .Cm RDomain
1230 representing the
1231 .Xr rdomain 4
1232 on which the connection was received).
1233 .Pp
1234 The match patterns may consist of single entries or comma-separated
1235 lists and may use the wildcard and negation operators described in the
1236 .Sx PATTERNS
1237 section of
1238 .Xr ssh_config 5 .
1239 .Pp
1240 The patterns in an
1241 .Cm Address
1242 criteria may additionally contain addresses to match in CIDR
1243 address/masklen format,
1244 such as 192.0.2.0/24 or 2001:db8::/32.
1245 Note that the mask length provided must be consistent with the address -
1246 it is an error to specify a mask length that is too long for the address
1247 or one with bits set in this host portion of the address.
1248 For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
1249 .Pp
1250 The
1251 .Cm Version
1252 keyword matches against the version string of
1253 .Xr sshd 8 ,
1254 for example
1255 .Dq OpenSSH_10.0 .
1256 .Pp
1257 Only a subset of keywords may be used on the lines following a
1258 .Cm Match
1259 keyword.
1260 Available keywords are
1261 .Cm AcceptEnv ,
1262 .Cm AllowAgentForwarding ,
1263 .Cm AllowGroups ,
1264 .Cm AllowStreamLocalForwarding ,
1265 .Cm AllowTcpForwarding ,
1266 .Cm AllowUsers ,
1267 .Cm AuthenticationMethods ,
1268 .Cm AuthorizedKeysCommand ,
1269 .Cm AuthorizedKeysCommandUser ,
1270 .Cm AuthorizedKeysFile ,
1271 .Cm AuthorizedPrincipalsCommand ,
1272 .Cm AuthorizedPrincipalsCommandUser ,
1273 .Cm AuthorizedPrincipalsFile ,
1274 .Cm Banner ,
1275 .Cm CASignatureAlgorithms ,
1276 .Cm ChannelTimeout ,
1277 .Cm ChrootDirectory ,
1278 .Cm ClientAliveCountMax ,
1279 .Cm ClientAliveInterval ,
1280 .Cm DenyGroups ,
1281 .Cm DenyUsers ,
1282 .Cm DisableForwarding ,
1283 .Cm ExposeAuthInfo ,
1284 .Cm ForceCommand ,
1285 .Cm GatewayPorts ,
1286 .Cm GSSAPIAuthentication ,
1287 .Cm HostbasedAcceptedAlgorithms ,
1288 .Cm HostbasedAuthentication ,
1289 .Cm HostbasedUsesNameFromPacketOnly ,
1290 .Cm IgnoreRhosts ,
1291 .Cm Include ,
1292 .Cm IPQoS ,
1293 .Cm KbdInteractiveAuthentication ,
1294 .Cm KerberosAuthentication ,
1295 .Cm LogLevel ,
1296 .Cm MaxAuthTries ,
1297 .Cm MaxSessions ,
1298 .Cm PAMServiceName ,
1299 .Cm PasswordAuthentication ,
1300 .Cm PermitEmptyPasswords ,
1301 .Cm PermitListen ,
1302 .Cm PermitOpen ,
1303 .Cm PermitRootLogin ,
1304 .Cm PermitTTY ,
1305 .Cm PermitTunnel ,
1306 .Cm PermitUserRC ,
1307 .Cm PubkeyAcceptedAlgorithms ,
1308 .Cm PubkeyAuthentication ,
1309 .Cm PubkeyAuthOptions ,
1310 .Cm RefuseConnection ,
1311 .Cm RekeyLimit ,
1312 .Cm RevokedKeys ,
1313 .Cm RDomain ,
1314 .Cm SetEnv ,
1315 .Cm StreamLocalBindMask ,
1316 .Cm StreamLocalBindUnlink ,
1317 .Cm TrustedUserCAKeys ,
1318 .Cm UnusedConnectionTimeout ,
1319 .Cm X11DisplayOffset ,
1320 .Cm X11MaxDisplays ,
1321 .Cm X11Forwarding
1322 and
1323 .Cm X11UseLocalhost .
1324 .It Cm MaxAuthTries
1325 Specifies the maximum number of authentication attempts permitted per
1326 connection.
1327 Once the number of failures reaches half this value,
1328 additional failures are logged.
1329 The default is 6.
1330 .It Cm MaxSessions
1331 Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
1332 sessions permitted per network connection.
1333 Multiple sessions may be established by clients that support connection
1334 multiplexing.
1335 Setting
1336 .Cm MaxSessions
1337 to 1 will effectively disable session multiplexing, whereas setting it to 0
1338 will prevent all shell, login and subsystem sessions while still permitting
1339 forwarding.
1340 The default is 10.
1341 .It Cm MaxStartups
1342 Specifies the maximum number of concurrent unauthenticated connections to the
1343 SSH daemon.
1344 Additional connections will be dropped until authentication succeeds or the
1345 .Cm LoginGraceTime
1346 expires for a connection.
1347 The default is 10:30:100.
1348 .Pp
1349 Alternatively, random early drop can be enabled by specifying
1350 the three colon separated values
1351 start:rate:full (e.g. "10:30:60").
1352 .Xr sshd 8
1353 will refuse connection attempts with a probability of rate/100 (30%)
1354 if there are currently start (10) unauthenticated connections.
1355 The probability increases linearly and all connection attempts
1356 are refused if the number of unauthenticated connections reaches full (60).
1357 .It Cm ModuliFile
1358 Specifies the
1359 .Xr moduli 5
1360 file that contains the Diffie-Hellman groups used for the
1361 .Dq diffie-hellman-group-exchange-sha1
1362 and
1363 .Dq diffie-hellman-group-exchange-sha256
1364 key exchange methods.
1365 The default is
1366 .Pa /etc/ssh/moduli .
1367 .It Cm PAMServiceName
1368 Specifies the service name used for Pluggable Authentication Modules (PAM)
1369 authentication, authorisation and session controls when
1370 .Cm UsePAM
1371 is enabled.
1372 The default is
1373 .Cm sshd .
1374 .It Cm PasswordAuthentication
1375 Specifies whether password authentication is allowed.
1376 The default is
1377 .Cm yes .
1378 .It Cm PermitEmptyPasswords
1379 When password authentication is allowed, it specifies whether the
1380 server allows login to accounts with empty password strings.
1381 The default is
1382 .Cm no .
1383 .It Cm PermitListen
1384 Specifies the addresses/ports on which a remote TCP port forwarding may listen.
1385 The listen specification must be one of the following forms:
1386 .Pp
1387 .Bl -item -offset indent -compact
1388 .It
1389 .Cm PermitListen
1390 .Sm off
1391 .Ar port
1392 .Sm on
1393 .It
1394 .Cm PermitListen
1395 .Sm off
1396 .Ar host : port
1397 .Sm on
1398 .El
1399 .Pp
1400 Multiple permissions may be specified by separating them with whitespace.
1401 An argument of
1402 .Cm any
1403 can be used to remove all restrictions and permit any listen requests.
1404 An argument of
1405 .Cm none
1406 can be used to prohibit all listen requests.
1407 The host name may contain wildcards as described in the PATTERNS section in
1408 .Xr ssh_config 5 .
1409 The wildcard
1410 .Sq *
1411 can also be used in place of a port number to allow all ports.
1412 By default all port forwarding listen requests are permitted.
1413 Note that the
1414 .Cm GatewayPorts
1415 option may further restrict which addresses may be listened on.
1416 Note also that
1417 .Xr ssh 1
1418 will request a listen host of
1419 .Dq localhost
1420 if no listen host was specifically requested, and this name is
1421 treated differently to explicit localhost addresses of
1422 .Dq 127.0.0.1
1423 and
1424 .Dq ::1 .
1425 .It Cm PermitOpen
1426 Specifies the destinations to which TCP port forwarding is permitted.
1427 The forwarding specification must be one of the following forms:
1428 .Pp
1429 .Bl -item -offset indent -compact
1430 .It
1431 .Cm PermitOpen
1432 .Sm off
1433 .Ar host : port
1434 .Sm on
1435 .It
1436 .Cm PermitOpen
1437 .Sm off
1438 .Ar IPv4_addr : port
1439 .Sm on
1440 .It
1441 .Cm PermitOpen
1442 .Sm off
1443 .Ar \&[ IPv6_addr \&] : port
1444 .Sm on
1445 .El
1446 .Pp
1447 Multiple forwards may be specified by separating them with whitespace.
1448 An argument of
1449 .Cm any
1450 can be used to remove all restrictions and permit any forwarding requests.
1451 An argument of
1452 .Cm none
1453 can be used to prohibit all forwarding requests.
1454 The wildcard
1455 .Sq *
1456 can be used for host or port to allow all hosts or ports respectively.
1457 Otherwise, no pattern matching or address lookups are performed on supplied
1458 names.
1459 By default all port forwarding requests are permitted.
1460 .It Cm PermitRootLogin
1461 Specifies whether root can log in using
1462 .Xr ssh 1 .
1463 The argument must be
1464 .Cm yes ,
1465 .Cm prohibit-password ,
1466 .Cm forced-commands-only ,
1467 or
1468 .Cm no .
1469 The default is
1470 .Cm prohibit-password .
1471 .Pp
1472 If this option is set to
1473 .Cm prohibit-password
1474 (or its deprecated alias,
1475 .Cm without-password ) ,
1476 password and keyboard-interactive authentication are disabled for root.
1477 .Pp
1478 If this option is set to
1479 .Cm forced-commands-only ,
1480 root login with public key authentication will be allowed,
1481 but only if the
1482 .Ar command
1483 option has been specified
1484 (which may be useful for taking remote backups even if root login is
1485 normally not allowed).
1486 All other authentication methods are disabled for root.
1487 .Pp
1488 If this option is set to
1489 .Cm no ,
1490 root is not allowed to log in.
1491 .It Cm PermitTTY
1492 Specifies whether
1493 .Xr pty 4
1494 allocation is permitted.
1495 The default is
1496 .Cm yes .
1497 .It Cm PermitTunnel
1498 Specifies whether
1499 .Xr tun 4
1500 device forwarding is allowed.
1501 The argument must be
1502 .Cm yes ,
1503 .Cm point-to-point
1504 (layer 3),
1505 .Cm ethernet
1506 (layer 2), or
1507 .Cm no .
1508 Specifying
1509 .Cm yes
1510 permits both
1511 .Cm point-to-point
1512 and
1513 .Cm ethernet .
1514 The default is
1515 .Cm no .
1516 .Pp
1517 Independent of this setting, the permissions of the selected
1518 .Xr tun 4
1519 device must allow access to the user.
1520 .It Cm PermitUserEnvironment
1521 Specifies whether
1522 .Pa ~/.ssh/environment
1523 and
1524 .Cm environment=
1525 options in
1526 .Pa ~/.ssh/authorized_keys
1527 are processed by
1528 .Xr sshd 8 .
1529 Valid options are
1530 .Cm yes ,
1531 .Cm no
1532 or a pattern-list specifying which environment variable names to accept
1533 (for example
1534 .Qq LANG,LC_* ) .
1535 The default is
1536 .Cm no .
1537 Enabling environment processing may enable users to bypass access
1538 restrictions in some configurations using mechanisms such as
1539 .Ev LD_PRELOAD .
1540 .It Cm PermitUserRC
1541 Specifies whether any
1542 .Pa ~/.ssh/rc
1543 file is executed.
1544 The default is
1545 .Cm yes .
1546 .It Cm PerSourceMaxStartups
1547 Specifies the number of unauthenticated connections allowed from a
1548 given source address, or
1549 .Dq none
1550 if there is no limit.
1551 This limit is applied in addition to
1552 .Cm MaxStartups ,
1553 whichever is lower.
1554 The default is
1555 .Cm none .
1556 .It Cm PerSourceNetBlockSize
1557 Specifies the number of bits of source address that are grouped together
1558 for the purposes of applying PerSourceMaxStartups limits.
1559 Values for IPv4 and optionally IPv6 may be specified, separated by a colon.
1560 The default is
1561 .Cm 32:128 ,
1562 which means each address is considered individually.
1563 .It Cm PerSourcePenalties
1564 Controls penalties for various conditions that may represent attacks on
1565 .Xr sshd 8 .
1566 If a penalty is enforced against a client then its source address and any
1567 others in the same network, as defined by
1568 .Cm PerSourceNetBlockSize ,
1569 will be refused connection for a period.
1570 .Pp
1571 A penalty doesn't affect concurrent connections in progress, but multiple
1572 penalties from the same source from concurrent connections will accumulate
1573 up to a maximum.
1574 Conversely, penalties are not applied until a minimum threshold time has been
1575 accumulated.
1576 .Pp
1577 Penalties are enabled by default with the default settings listed below
1578 but may disabled using the
1579 .Cm no
1580 keyword.
1581 The defaults may be overridden by specifying one or more of the keywords below,
1582 separated by whitespace.
1583 All keywords accept arguments, e.g.\&
1584 .Qq crash:2m .
1585 .Bl -tag -width Ds
1586 .It Cm crash:duration
1587 Specifies how long to refuse clients that cause a crash of
1588 .Xr sshd 8 (default: 90s).
1589 .It Cm authfail:duration
1590 Specifies how long to refuse clients that disconnect after making one or more
1591 unsuccessful authentication attempts (default: 5s).
1592 .It Cm refuseconnection:duration
1593 Specifies how long to refuse clients that were administratively prohibited
1594 connection via the
1595 .Cm RefuseConnection
1596 option (default: 10s).
1597 .It Cm noauth:duration
1598 Specifies how long to refuse clients that disconnect without attempting
1599 authentication (default: 1s).
1600 This timeout should be used cautiously otherwise it may penalise legitimate
1601 scanning tools such as
1602 .Xr ssh-keyscan 1 .
1603 .It Cm grace-exceeded:duration
1604 Specifies how long to refuse clients that fail to authenticate after
1605 .Cm LoginGraceTime
1606 (default: 10s).
1607 .It Cm max:duration
1608 Specifies the maximum time a particular source address range will be refused
1609 access for (default: 10m).
1610 Repeated penalties will accumulate up to this maximum.
1611 .It Cm min:duration
1612 Specifies the minimum penalty that must accrue before enforcement begins
1613 (default: 15s).
1614 .It Cm max-sources4:number , max-sources6:number
1615 Specifies the maximum number of client IPv4 and IPv6 address ranges to
1616 track for penalties (default: 65536 for both).
1617 .It Cm overflow:mode
1618 Controls how the server behaves when
1619 .Cm max-sources4
1620 or
1621 .Cm max-sources6
1622 is exceeded.
1623 There are two operating modes:
1624 .Cm deny-all ,
1625 which denies all incoming connections other than those exempted via
1626 .Cm PerSourcePenaltyExemptList
1627 until a penalty expires, and
1628 .Cm permissive ,
1629 which allows new connections by removing existing penalties early
1630 (default: permissive).
1631 Note that client penalties below the
1632 .Cm min
1633 threshold count against the total number of tracked penalties.
1634 IPv4 and IPv6 addresses are tracked separately, so an overflow in one will
1635 not affect the other.
1636 .It Cm overflow6:mode
1637 Allows specifying a different overflow mode for IPv6 addresses.
1638 The default it to use the same overflow mode as was specified for IPv4.
1639 .El
1640 .It Cm PerSourcePenaltyExemptList
1641 Specifies a comma-separated list of addresses to exempt from penalties.
1642 This list may contain wildcards and CIDR address/masklen ranges.
1643 Note that the mask length provided must be consistent with the address -
1644 it is an error to specify a mask length that is too long for the address
1645 or one with bits set in this host portion of the address.
1646 For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
1647 The default is not to exempt any addresses.
1648 .It Cm PidFile
1649 Specifies the file that contains the process ID of the
1650 SSH daemon, or
1651 .Cm none
1652 to not write one.
1653 The default is
1654 .Pa /var/run/sshd.pid .
1655 .It Cm Port
1656 Specifies the port number that
1657 .Xr sshd 8
1658 listens on.
1659 The default is 22.
1660 Multiple options of this type are permitted.
1661 See also
1662 .Cm ListenAddress .
1663 .It Cm PrintLastLog
1664 Specifies whether
1665 .Xr sshd 8
1666 should print the date and time of the last user login when a user logs
1667 in interactively.
1668 The default is
1669 .Cm yes .
1670 .It Cm PrintMotd
1671 Specifies whether
1672 .Xr sshd 8
1673 should print
1674 .Pa /etc/motd
1675 when a user logs in interactively.
1676 (On some systems it is also printed by the shell,
1677 .Pa /etc/profile ,
1678 or equivalent.)
1679 The default is
1680 .Cm yes .
1681 .It Cm PubkeyAcceptedAlgorithms
1682 The default is handled system-wide by
1683 .Xr crypto-policies 7 .
1684 Information about defaults, how to modify the defaults and how to customize existing policies with sub-policies are present in manual page
1685 .Xr update-crypto-policies 8 .
1686 .Pp
1687 Specifies the signature algorithms that will be accepted for public key
1688 authentication as a list of comma-separated patterns.
1689 Alternately if the specified list begins with a
1690 .Sq +
1691 character, then the specified algorithms will be appended to the built-in
1692 openssh default set instead of replacing them.
1693 If the specified list begins with a
1694 .Sq -
1695 character, then the specified algorithms (including wildcards) will be removed
1696 from the built-in openssh default set instead of replacing them.
1697 If the specified list begins with a
1698 .Sq ^
1699 character, then the specified algorithms will be placed at the head of the
1700 built-in openssh default set.
1701 .Pp
1702 The list of available signature algorithms may also be obtained using
1703 .Qq ssh -Q PubkeyAcceptedAlgorithms .
1704 .It Cm PubkeyAuthOptions
1705 Sets one or more public key authentication options.
1706 The supported keywords are:
1707 .Cm none
1708 (the default; indicating no additional options are enabled),
1709 .Cm touch-required
1710 and
1711 .Cm verify-required .
1712 .Pp
1713 The
1714 .Cm touch-required
1715 option causes public key authentication using a FIDO authenticator algorithm
1716 (i.e.\&
1717 .Cm ecdsa-sk
1718 or
1719 .Cm ed25519-sk )
1720 to always require the signature to attest that a physically present user
1721 explicitly confirmed the authentication (usually by touching the authenticator).
1722 By default,
1723 .Xr sshd 8
1724 requires user presence unless overridden with an authorized_keys option.
1725 The
1726 .Cm touch-required
1727 flag disables this override.
1728 .Pp
1729 The
1730 .Cm verify-required
1731 option requires a FIDO key signature attest that the user was verified,
1732 e.g. via a PIN.
1733 .Pp
1734 Neither the
1735 .Cm touch-required
1736 or
1737 .Cm verify-required
1738 options have any effect for other, non-FIDO, public key types.
1739 .It Cm PubkeyAuthentication
1740 Specifies whether public key authentication is allowed.
1741 The default is
1742 .Cm yes .
1743 .It Cm RefuseConnection
1744 Indicates that
1745 .Xr sshd 8
1746 should unconditionally terminate the connection.
1747 Additionally, a
1748 .Cm refuseconnection
1749 penalty may be recorded against the source of the connection if
1750 .Cm PerSourcePenalties
1751 are enabled.
1752 This option is only really useful in a
1753 .Cm Match
1754 block.
1755 .It Cm RekeyLimit
1756 Specifies the maximum amount of data that may be transmitted or received
1757 before the session key is renegotiated, optionally followed by a maximum
1758 amount of time that may pass before the session key is renegotiated.
1759 The first argument is specified in bytes and may have a suffix of
1760 .Sq K ,
1761 .Sq M ,
1762 or
1763 .Sq G
1764 to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1765 The default is between
1766 .Sq 1G
1767 and
1768 .Sq 4G ,
1769 depending on the cipher.
1770 The optional second value is specified in seconds and may use any of the
1771 units documented in the
1772 .Sx TIME FORMATS
1773 section.
1774 The default value for
1775 .Cm RekeyLimit
1776 is
1777 .Cm default none ,
1778 which means that rekeying is performed after the cipher's default amount
1779 of data has been sent or received and no time based rekeying is done.
1780 .It Cm RequiredRSASize
1781 Specifies the minimum RSA key size (in bits) that
1782 .Xr sshd 8
1783 will accept.
1784 User and host-based authentication keys smaller than this limit will be
1785 refused.
1786 The default is
1787 .Cm 1024
1788 bits.
1789 Note that this limit may only be raised from the default.
1790 .It Cm RevokedKeys
1791 Specifies revoked public keys file, or
1792 .Cm none
1793 to not use one.
1794 Keys listed in this file will be refused for public key authentication.
1795 Note that if this file is not readable, then public key authentication will
1796 be refused for all users.
1797 Keys may be specified as a text file, listing one public key per line, or as
1798 an OpenSSH Key Revocation List (KRL) as generated by
1799 .Xr ssh-keygen 1 .
1800 For more information on KRLs, see the KEY REVOCATION LISTS section in
1801 .Xr ssh-keygen 1 .
1802 .It Cm RDomain
1803 Specifies an explicit routing domain that is applied after authentication
1804 has completed.
1805 The user session, as well as any forwarded or listening IP sockets,
1806 will be bound to this
1807 .Xr rdomain 4 .
1808 If the routing domain is set to
1809 .Cm \&%D ,
1810 then the domain in which the incoming connection was received will be applied.
1811 .It Cm SecurityKeyProvider
1812 Specifies a path to a library that will be used when loading
1813 FIDO authenticator-hosted keys, overriding the default of using
1814 the built-in USB HID support.
1815 .It Cm SetEnv
1816 Specifies one or more environment variables to set in child sessions started
1817 by
1818 .Xr sshd 8
1819 as
1820 .Dq NAME=VALUE .
1821 The environment value may be quoted (e.g. if it contains whitespace
1822 characters).
1823 Environment variables set by
1824 .Cm SetEnv
1825 override the default environment and any variables specified by the user
1826 via
1827 .Cm AcceptEnv
1828 or
1829 .Cm PermitUserEnvironment .
1830 .It Cm SshdAuthPath
1831 Overrides the default path to the
1832 .Cm sshd-auth
1833 binary that is invoked to complete user authentication.
1834 The default is
1835 .Pa /usr/libexec/openssh/sshd-auth .
1836 This option is intended for use by tests.
1837 .It Cm SshdSessionPath
1838 Overrides the default path to the
1839 .Cm sshd-session
1840 binary that is invoked to handle each connection.
1841 The default is
1842 .Pa /usr/libexec/openssh/sshd-session .
1843 This option is intended for use by tests.
1844 .It Cm StreamLocalBindMask
1845 Sets the octal file creation mode mask
1846 .Pq umask
1847 used when creating a Unix-domain socket file for local or remote
1848 port forwarding.
1849 This option is only used for port forwarding to a Unix-domain socket file.
1850 .Pp
1851 The default value is 0177, which creates a Unix-domain socket file that is
1852 readable and writable only by the owner.
1853 Note that not all operating systems honor the file mode on Unix-domain
1854 socket files.
1855 .It Cm StreamLocalBindUnlink
1856 Specifies whether to remove an existing Unix-domain socket file for local
1857 or remote port forwarding before creating a new one.
1858 If the socket file already exists and
1859 .Cm StreamLocalBindUnlink
1860 is not enabled,
1861 .Nm sshd
1862 will be unable to forward the port to the Unix-domain socket file.
1863 This option is only used for port forwarding to a Unix-domain socket file.
1864 .Pp
1865 The argument must be
1866 .Cm yes
1867 or
1868 .Cm no .
1869 The default is
1870 .Cm no .
1871 .It Cm StrictModes
1872 Specifies whether
1873 .Xr sshd 8
1874 should check file modes and ownership of the
1875 user's files and home directory before accepting login.
1876 This is normally desirable because novices sometimes accidentally leave their
1877 directory or files world-writable.
1878 The default is
1879 .Cm yes .
1880 Note that this does not apply to
1881 .Cm ChrootDirectory ,
1882 whose permissions and ownership are checked unconditionally.
1883 .It Cm Subsystem
1884 Configures an external subsystem (e.g. file transfer daemon).
1885 Arguments should be a subsystem name and a command (with optional arguments)
1886 to execute upon subsystem request.
1887 .Pp
1888 The command
1889 .Cm sftp-server
1890 implements the SFTP file transfer subsystem.
1891 .Pp
1892 Alternately the name
1893 .Cm internal-sftp
1894 implements an in-process SFTP server.
1895 This may simplify configurations using
1896 .Cm ChrootDirectory
1897 to force a different filesystem root on clients.
1898 It accepts the same command line arguments as
1899 .Cm sftp-server
1900 and even though it is in-process, settings such as
1901 .Cm LogLevel
1902 or
1903 .Cm SyslogFacility
1904 do not apply to it and must be set explicitly via
1905 command line arguments.
1906 .Pp
1907 By default no subsystems are defined.
1908 .It Cm SyslogFacility
1909 Gives the facility code that is used when logging messages from
1910 .Xr sshd 8 .
1911 The possible values are: DAEMON, USER, AUTH, AUTHPRIV, LOCAL0, LOCAL1, LOCAL2,
1912 LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1913 The default is AUTH.
1914 .It Cm TCPKeepAlive
1915 Specifies whether the system should send TCP keepalive messages to the
1916 other side.
1917 If they are sent, death of the connection or crash of one
1918 of the machines will be properly noticed.
1919 However, this means that
1920 connections will die if the route is down temporarily, and some people
1921 find it annoying.
1922 On the other hand, if TCP keepalives are not sent,
1923 sessions may hang indefinitely on the server, leaving
1924 .Qq ghost
1925 users and consuming server resources.
1926 .Pp
1927 The default is
1928 .Cm yes
1929 (to send TCP keepalive messages), and the server will notice
1930 if the network goes down or the client host crashes.
1931 This avoids infinitely hanging sessions.
1932 .Pp
1933 To disable TCP keepalive messages, the value should be set to
1934 .Cm no .
1935 .It Cm TrustedUserCAKeys
1936 Specifies a file containing public keys of certificate authorities that are
1937 trusted to sign user certificates for authentication, or
1938 .Cm none
1939 to not use one.
1940 Keys are listed one per line; empty lines and comments starting with
1941 .Ql #
1942 are allowed.
1943 If a certificate is presented for authentication and has its signing CA key
1944 listed in this file, then it may be used for authentication for any user
1945 listed in the certificate's principals list.
1946 Note that certificates that lack a list of principals will not be permitted
1947 for authentication using
1948 .Cm TrustedUserCAKeys .
1949 For more details on certificates, see the CERTIFICATES section in
1950 .Xr ssh-keygen 1 .
1951 .It Cm UnusedConnectionTimeout
1952 Specifies whether and how quickly
1953 .Xr sshd 8
1954 should close client connections with no open channels.
1955 Open channels include active shell, command execution or subsystem
1956 sessions, connected network, socket, agent or X11 forwardings.
1957 Forwarding listeners, such as those from the
1958 .Xr ssh 1
1959 .Fl R
1960 flag, are not considered as open channels and do not prevent the timeout.
1961 The timeout value
1962 is specified in seconds or may use any of the units documented in the
1963 .Sx TIME FORMATS
1964 section.
1965 .Pp
1966 Note that this timeout starts when the client connection completes
1967 user authentication but before the client has an opportunity to open any
1968 channels.
1969 Caution should be used when using short timeout values, as they may not
1970 provide sufficient time for the client to request and open its channels
1971 before terminating the connection.
1972 .Pp
1973 The default
1974 .Cm none
1975 is to never expire connections for having no open channels.
1976 This option may be useful in conjunction with
1977 .Cm ChannelTimeout .
1978 .It Cm UseDNS
1979 Specifies whether
1980 .Xr sshd 8
1981 should look up the remote host name, and to check that
1982 the resolved host name for the remote IP address maps back to the
1983 very same IP address.
1984 .Pp
1985 If this option is set to
1986 .Cm no
1987 (the default) then only addresses and not host names may be used in
1988 .Pa ~/.ssh/authorized_keys
1989 .Cm from
1990 and
1991 .Nm
1992 .Cm Match
1993 .Cm Host
1994 directives.
1995 .It Cm UsePAM
1996 Enables the Pluggable Authentication Module interface.
1997 If set to
1998 .Cm yes
1999 this will enable PAM authentication using
2000 .Cm KbdInteractiveAuthentication
2001 and
2002 .Cm PasswordAuthentication
2003 in addition to PAM account and session module processing for all
2004 authentication types.
2005 .Pp
2006 Because PAM keyboard-interactive authentication usually serves an equivalent
2007 role to password authentication, you should disable either
2008 .Cm PasswordAuthentication
2009 or
2010 .Cm KbdInteractiveAuthentication .
2011 .Pp
2012 If
2013 .Cm UsePAM
2014 is enabled, you will not be able to run
2015 .Xr sshd 8
2016 as a non-root user.
2017 The default is
2018 .Cm no .
2019 .It Cm VersionAddendum
2020 Optionally specifies additional text to append to the SSH protocol banner
2021 sent by the server upon connection.
2022 The default is
2023 .Cm none .
2024 .It Cm X11DisplayOffset
2025 Specifies the first display number available for
2026 .Xr sshd 8 Ns 's
2027 X11 forwarding.
2028 This prevents sshd from interfering with real X11 servers.
2029 The default is 10.
2030 .It Cm X11MaxDisplays
2031 Specifies the maximum number of displays available for
2032 .Xr sshd 8 Ns 's
2033 X11 forwarding.
2034 This prevents sshd from exhausting local ports.
2035 The default is 1000.
2036 .It Cm X11Forwarding
2037 Specifies whether X11 forwarding is permitted.
2038 The argument must be
2039 .Cm yes
2040 or
2041 .Cm no .
2042 The default is
2043 .Cm no .
2044 .Pp
2045 When X11 forwarding is enabled, there may be additional exposure to
2046 the server and to client displays if the
2047 .Xr sshd 8
2048 proxy display is configured to listen on the wildcard address (see
2049 .Cm X11UseLocalhost ) ,
2050 though this is not the default.
2051 Additionally, the authentication spoofing and authentication data
2052 verification and substitution occur on the client side.
2053 The security risk of using X11 forwarding is that the client's X11
2054 display server may be exposed to attack when the SSH client requests
2055 forwarding (see the warnings for
2056 .Cm ForwardX11
2057 in
2058 .Xr ssh_config 5 ) .
2059 A system administrator may have a stance in which they want to
2060 protect clients that may expose themselves to attack by unwittingly
2061 requesting X11 forwarding, which can warrant a
2062 .Cm no
2063 setting.
2064 .Pp
2065 Note that disabling X11 forwarding does not prevent users from
2066 forwarding X11 traffic, as users can always install their own forwarders.
2067 .It Cm X11UseLocalhost
2068 Specifies whether
2069 .Xr sshd 8
2070 should bind the X11 forwarding server to the loopback address or to
2071 the wildcard address.
2072 By default,
2073 sshd binds the forwarding server to the loopback address and sets the
2074 hostname part of the
2075 .Ev DISPLAY
2076 environment variable to
2077 .Cm localhost .
2078 This prevents remote hosts from connecting to the proxy display.
2079 However, some older X11 clients may not function with this
2080 configuration.
2081 .Cm X11UseLocalhost
2082 may be set to
2083 .Cm no
2084 to specify that the forwarding server should be bound to the wildcard
2085 address.
2086 The argument must be
2087 .Cm yes
2088 or
2089 .Cm no .
2090 The default is
2091 .Cm yes .
2092 .It Cm XAuthLocation
2093 Specifies the full pathname of the
2094 .Xr xauth 1
2095 program, or
2096 .Cm none
2097 to not use one.
2098 The default is
2099 .Pa /usr/bin/xauth .
2100 .El
2101 .Sh TIME FORMATS
2102 .Xr sshd 8
2103 command-line arguments and configuration file options that specify time
2104 may be expressed using a sequence of the form:
2105 .Sm off
2106 .Ar time Op Ar qualifier ,
2107 .Sm on
2108 where
2109 .Ar time
2110 is a positive integer value and
2111 .Ar qualifier
2112 is one of the following:
2113 .Pp
2114 .Bl -tag -width Ds -compact -offset indent
2115 .It Aq Cm none
2116 seconds
2117 .It Cm s | Cm S
2118 seconds
2119 .It Cm m | Cm M
2120 minutes
2121 .It Cm h | Cm H
2122 hours
2123 .It Cm d | Cm D
2124 days
2125 .It Cm w | Cm W
2126 weeks
2127 .El
2128 .Pp
2129 Each member of the sequence is added together to calculate
2130 the total time value.
2131 .Pp
2132 Time format examples:
2133 .Pp
2134 .Bl -tag -width Ds -compact -offset indent
2135 .It 600
2136 600 seconds (10 minutes)
2137 .It 10m
2138 10 minutes
2139 .It 1h30m
2140 1 hour 30 minutes (90 minutes)
2141 .El
2142 .Sh TOKENS
2143 Arguments to some keywords can make use of tokens,
2144 which are expanded at runtime:
2145 .Pp
2146 .Bl -tag -width XXXX -offset indent -compact
2147 .It %%
2148 A literal
2149 .Sq % .
2150 .It \&%C
2151 Identifies the connection endpoints, containing
2152 four space-separated values: client address, client port number,
2153 server address, and server port number.
2154 .It \&%D
2155 The routing domain in which the incoming connection was received.
2156 .It %F
2157 The fingerprint of the CA key.
2158 .It %f
2159 The fingerprint of the key or certificate.
2160 .It %h
2161 The home directory of the user.
2162 .It %i
2163 The key ID in the certificate.
2164 .It %K
2165 The base64-encoded CA key.
2166 .It %k
2167 The base64-encoded key or certificate for authentication.
2168 .It %s
2169 The serial number of the certificate.
2170 .It \&%T
2171 The type of the CA key.
2172 .It %t
2173 The key or certificate type.
2174 .It \&%U
2175 The numeric user ID of the target user.
2176 .It %u
2177 The username.
2178 .El
2179 .Pp
2180 .Cm AuthorizedKeysCommand
2181 accepts the tokens %%, %C, %D, %f, %h, %k, %t, %U, and %u.
2182 .Pp
2183 .Cm AuthorizedKeysFile
2184 accepts the tokens %%, %h, %U, and %u.
2185 .Pp
2186 .Cm AuthorizedPrincipalsCommand
2187 accepts the tokens %%, %C, %D, %F, %f, %h, %i, %K, %k, %s, %T, %t, %U, and %u.
2188 .Pp
2189 .Cm AuthorizedPrincipalsFile
2190 accepts the tokens %%, %h, %U, and %u.
2191 .Pp
2192 .Cm ChrootDirectory
2193 accepts the tokens %%, %h, %U, and %u.
2194 .Pp
2195 .Cm RoutingDomain
2196 accepts the token %D.
2197 .Sh FILES
2198 .Bl -tag -width Ds
2199 .It Pa /etc/ssh/sshd_config
2200 Contains configuration data for
2201 .Xr sshd 8 .
2202 This file should be writable by root only, but it is recommended
2203 (though not necessary) that it be world-readable.
2204 .El
2205 .Sh SEE ALSO
2206 .Xr sftp-server 8 ,
2207 .Xr sshd 8 ,
2208 .Xr crypto-policies 7 ,
2209 .Xr update-crypto-policies 8
2210 .Sh AUTHORS
2211 .An -nosplit
2212 OpenSSH is a derivative of the original and free
2213 ssh 1.2.12 release by
2214 .An Tatu Ylonen .
2215 .An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
2216 .An Theo de Raadt
2217 and
2218 .An Dug Song
2219 removed many bugs, re-added newer features and
2220 created OpenSSH.
2221 .An Markus Friedl
2222 contributed the support for SSH protocol versions 1.5 and 2.0.
2223 .An Niels Provos
2224 and
2225 .An Markus Friedl
2226 contributed support for privilege separation.