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