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