blob: 69d3be2b897035f5ff2bd54f3e14a5211a0ae9a8 [file] [log] [blame]
Ben Lindstrom9f049032002-06-21 00:59:05 +00001.\"
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.\"
djm@openbsd.org56d1c832014-12-21 22:27:55 +000036.\" $OpenBSD: sshd_config.5,v 1.183 2014/12/21 22:27:55 djm Exp $
37.Dd $Mdocdate: December 21 2014 $
Ben Lindstrom9f049032002-06-21 00:59:05 +000038.Dt SSHD_CONFIG 5
39.Os
40.Sh NAME
41.Nm sshd_config
42.Nd OpenSSH SSH daemon configuration file
43.Sh SYNOPSIS
Damien Millerd94fc722007-01-05 16:29:30 +110044.Nm /etc/ssh/sshd_config
Ben Lindstrom9f049032002-06-21 00:59:05 +000045.Sh DESCRIPTION
Damien Millerf4f22b52006-03-15 11:57:25 +110046.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +000047reads 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.
Damien Miller306d1182006-03-15 12:05:59 +110056Arguments may optionally be enclosed in double quotes
57.Pq \&"
58in order to represent arguments containing spaces.
Ben Lindstrom9f049032002-06-21 00:59:05 +000059.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
Darren Tucker46bc0752004-05-02 22:11:30 +100064.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.
Darren Tucker1e0c9bf2004-05-02 22:12:48 +100073Note that environment passing is only supported for protocol 2.
Darren Tucker46bc0752004-05-02 22:11:30 +100074Variables are specified by name, which may contain the wildcard characters
Damien Miller208f1ed2006-03-15 11:56:03 +110075.Ql *
Darren Tucker46bc0752004-05-02 22:11:30 +100076and
77.Ql \&? .
Darren Tucker1e0c9bf2004-05-02 22:12:48 +100078Multiple environment variables may be separated by whitespace or spread
Darren Tucker46bc0752004-05-02 22:11:30 +100079across multiple
80.Cm AcceptEnv
81directives.
Darren Tucker1e0c9bf2004-05-02 22:12:48 +100082Be warned that some environment variables could be used to bypass restricted
Darren Tucker46bc0752004-05-02 22:11:30 +100083user environments.
84For this reason, care should be taken in the use of this directive.
85The default is not to accept any environment variables.
Darren Tucker0f383232005-01-20 10:57:56 +110086.It Cm AddressFamily
87Specifies which address family should be used by
Damien Millerf4f22b52006-03-15 11:57:25 +110088.Xr sshd 8 .
Darren Tucker0f383232005-01-20 10:57:56 +110089Valid arguments are
90.Dq any ,
91.Dq inet
Damien Miller5b0d63f2006-03-15 11:56:56 +110092(use IPv4 only), or
Darren Tucker0f383232005-01-20 10:57:56 +110093.Dq inet6
94(use IPv6 only).
95The default is
96.Dq any .
Damien Millere9890192008-05-19 14:59:02 +100097.It Cm AllowAgentForwarding
98Specifies whether
99.Xr ssh-agent 1
100forwarding is permitted.
101The default is
102.Dq yes .
103Note that disabling agent forwarding does not improve security
104unless users are also denied shell access, as they can always install
105their own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000106.It Cm AllowGroups
107This keyword can be followed by a list of group name patterns, separated
108by spaces.
109If specified, login is allowed only for users whose primary
110group or supplementary group list matches one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000111Only group names are valid; a numerical group ID is not recognized.
112By default, login is allowed for all groups.
Damien Millerac73e512006-03-15 11:58:49 +1100113The allow/deny directives are processed in the following order:
114.Cm DenyUsers ,
115.Cm AllowUsers ,
116.Cm DenyGroups ,
117and finally
118.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100119.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000120See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100121.Xr ssh_config 5
122for more information on patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000123.It Cm AllowTcpForwarding
124Specifies whether TCP forwarding is permitted.
Damien Milleraa5b3f82012-12-03 09:50:54 +1100125The available options are
126.Dq yes
127or
128.Dq all
129to allow TCP forwarding,
130.Dq no
131to prevent all TCP forwarding,
132.Dq local
133to allow local (from the perspective of
Darren Tuckerf9333d52012-12-07 13:06:13 +1100134.Xr ssh 1 )
135forwarding only or
Damien Milleraa5b3f82012-12-03 09:50:54 +1100136.Dq remote
137to allow remote forwarding only.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000138The default is
139.Dq yes .
140Note that disabling TCP forwarding does not improve security unless
141users are also denied shell access, as they can always install their
142own forwarders.
Damien Miller7acefbb2014-07-18 14:11:24 +1000143.It Cm AllowStreamLocalForwarding
144Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
145The available options are
146.Dq yes
147or
148.Dq all
149to allow StreamLocal forwarding,
150.Dq no
151to prevent all StreamLocal forwarding,
152.Dq local
153to allow local (from the perspective of
154.Xr ssh 1 )
155forwarding only or
156.Dq remote
157to allow remote forwarding only.
158The default is
159.Dq yes .
160Note that disabling StreamLocal forwarding does not improve security unless
161users are also denied shell access, as they can always install their
162own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000163.It Cm AllowUsers
164This keyword can be followed by a list of user name patterns, separated
165by spaces.
Damien Miller5a93add2003-01-24 11:34:52 +1100166If specified, login is allowed only for user names that
Ben Lindstrom9f049032002-06-21 00:59:05 +0000167match one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000168Only user names are valid; a numerical user ID is not recognized.
169By default, login is allowed for all users.
170If the pattern takes the form USER@HOST then USER and HOST
171are separately checked, restricting logins to particular
172users from particular hosts.
Damien Millerac73e512006-03-15 11:58:49 +1100173The allow/deny directives are processed in the following order:
174.Cm DenyUsers ,
175.Cm AllowUsers ,
176.Cm DenyGroups ,
177and finally
178.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100179.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000180See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100181.Xr ssh_config 5
182for more information on patterns.
Damien Millera6e3f012012-11-04 23:21:40 +1100183.It Cm AuthenticationMethods
184Specifies the authentication methods that must be successfully completed
185for a user to be granted access.
186This option must be followed by one or more comma-separated lists of
187authentication method names.
188Successful authentication requires completion of every method in at least
189one of these lists.
190.Pp
191For example, an argument of
192.Dq publickey,password publickey,keyboard-interactive
193would require the user to complete public key authentication, followed by
194either password or keyboard interactive authentication.
195Only methods that are next in one or more lists are offered at each stage,
196so for this example, it would not be possible to attempt password or
197keyboard-interactive authentication before public key.
198.Pp
Damien Miller91a55f22013-04-23 15:18:10 +1000199For keyboard interactive authentication it is also possible to
200restrict authentication to a specific device by appending a
201colon followed by the device identifier
202.Dq bsdauth ,
203.Dq pam ,
204or
205.Dq skey ,
206depending on the server configuration.
207For example,
208.Dq keyboard-interactive:bsdauth
209would restrict keyboard interactive authentication to the
210.Dq bsdauth
211device.
212.Pp
Damien Millera6e3f012012-11-04 23:21:40 +1100213This option is only available for SSH protocol 2 and will yield a fatal
214error if enabled if protocol 1 is also enabled.
215Note that each authentication method listed should also be explicitly enabled
216in the configuration.
217The default is not to require multiple authentication; successful completion
218of a single authentication method is sufficient.
Damien Miller09d3e122012-10-31 08:58:58 +1100219.It Cm AuthorizedKeysCommand
Damien Millerf33580e2012-11-04 22:22:52 +1100220Specifies a program to be used to look up the user's public keys.
Damien Miller467b00c2013-04-23 15:23:07 +1000221The program must be owned by root and not writable by group or others.
222It will be invoked with a single argument of the username
Damien Miller09d3e122012-10-31 08:58:58 +1100223being authenticated, and should produce on standard output zero or
Damien Millerfecfd112013-07-18 16:11:50 +1000224more lines of authorized_keys output (see AUTHORIZED_KEYS in
Damien Millerf33580e2012-11-04 22:22:52 +1100225.Xr sshd 8 ) .
Damien Miller09d3e122012-10-31 08:58:58 +1100226If a key supplied by AuthorizedKeysCommand does not successfully authenticate
227and authorize the user then public key authentication continues using the usual
228.Cm AuthorizedKeysFile
229files.
230By default, no AuthorizedKeysCommand is run.
231.It Cm AuthorizedKeysCommandUser
232Specifies the user under whose account the AuthorizedKeysCommand is run.
Damien Miller09d3e122012-10-31 08:58:58 +1100233It is recommended to use a dedicated user that has no other role on the host
234than running authorized keys commands.
djm@openbsd.orgd663bea2014-12-11 05:25:06 +0000235If no user is specified then
236.Cm AuthorizedKeysCommand
237is ignored.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000238.It Cm AuthorizedKeysFile
239Specifies the file that contains the public keys that can be used
240for user authentication.
Damien Miller6018a362010-07-02 13:35:19 +1000241The format is described in the
Damien Millerfecfd112013-07-18 16:11:50 +1000242AUTHORIZED_KEYS FILE FORMAT
Damien Miller6018a362010-07-02 13:35:19 +1000243section of
244.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000245.Cm AuthorizedKeysFile
246may contain tokens of the form %T which are substituted during connection
Damien Miller5b0d63f2006-03-15 11:56:56 +1100247setup.
Damien Millerfbf486b2003-05-23 18:44:23 +1000248The following tokens are defined: %% is replaced by a literal '%',
Damien Miller5b0d63f2006-03-15 11:56:56 +1100249%h is replaced by the home directory of the user being authenticated, and
Ben Lindstrom9f049032002-06-21 00:59:05 +0000250%u is replaced by the username of that user.
251After expansion,
252.Cm AuthorizedKeysFile
253is taken to be an absolute path or one relative to the user's home
254directory.
Damien Millerb9132fc2011-05-29 21:41:40 +1000255Multiple files may be listed, separated by whitespace.
256The default is
257.Dq .ssh/authorized_keys .ssh/authorized_keys2 .
Damien Miller30da3442010-05-10 11:58:03 +1000258.It Cm AuthorizedPrincipalsFile
259Specifies a file that lists principal names that are accepted for
260certificate authentication.
261When using certificates signed by a key listed in
262.Cm TrustedUserCAKeys ,
263this file lists names, one of which must appear in the certificate for it
264to be accepted for authentication.
Damien Millerd59dab82010-07-02 13:37:17 +1000265Names are listed one per line preceded by key options (as described
Damien Millerfecfd112013-07-18 16:11:50 +1000266in AUTHORIZED_KEYS FILE FORMAT in
Damien Millerd59dab82010-07-02 13:37:17 +1000267.Xr sshd 8 ) .
Damien Miller6018a362010-07-02 13:35:19 +1000268Empty lines and comments starting with
Damien Miller30da3442010-05-10 11:58:03 +1000269.Ql #
270are ignored.
271.Pp
272.Cm AuthorizedPrincipalsFile
273may contain tokens of the form %T which are substituted during connection
274setup.
275The following tokens are defined: %% is replaced by a literal '%',
276%h is replaced by the home directory of the user being authenticated, and
277%u is replaced by the username of that user.
278After expansion,
279.Cm AuthorizedPrincipalsFile
280is taken to be an absolute path or one relative to the user's home
281directory.
282.Pp
Damien Miller8fef9eb2012-04-22 11:25:10 +1000283The default is
284.Dq none ,
285i.e. not to use a principals file \(en in this case, the username
Damien Miller30da3442010-05-10 11:58:03 +1000286of the user must appear in a certificate's principals list for it to be
287accepted.
288Note that
289.Cm AuthorizedPrincipalsFile
290is only used when authentication proceeds using a CA listed in
291.Cm TrustedUserCAKeys
292and is not consulted for certification authorities trusted via
293.Pa ~/.ssh/authorized_keys ,
294though the
295.Cm principals=
296key option offers a similar facility (see
297.Xr sshd 8
298for details).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000299.It Cm Banner
Ben Lindstrom9f049032002-06-21 00:59:05 +0000300The contents of the specified file are sent to the remote user before
301authentication is allowed.
Damien Miller4890e532007-09-17 11:57:38 +1000302If the argument is
303.Dq none
304then no banner is displayed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000305This option is only available for protocol version 2.
306By default, no banner is displayed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000307.It Cm ChallengeResponseAuthentication
Damien Miller9c7bf8d2009-08-28 10:27:08 +1000308Specifies whether challenge-response authentication is allowed (e.g. via
Damien Millere8c9f262014-10-03 09:24:56 +1000309PAM or through authentication styles supported in
Damien Miller9c7bf8d2009-08-28 10:27:08 +1000310.Xr login.conf 5 )
Ben Lindstrom9f049032002-06-21 00:59:05 +0000311The default is
312.Dq yes .
Damien Millerd8cb1f12008-02-10 22:40:12 +1100313.It Cm ChrootDirectory
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100314Specifies the pathname of a directory to
Damien Millerd8cb1f12008-02-10 22:40:12 +1100315.Xr chroot 2
316to after authentication.
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100317All components of the pathname must be root-owned directories that are
Damien Millerd8cb1f12008-02-10 22:40:12 +1100318not writable by any other user or group.
Darren Tucker51dbe502009-06-21 17:56:51 +1000319After the chroot,
320.Xr sshd 8
321changes the working directory to the user's home directory.
Damien Millerd8cb1f12008-02-10 22:40:12 +1100322.Pp
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100323The pathname may contain the following tokens that are expanded at runtime once
Damien Millerd8cb1f12008-02-10 22:40:12 +1100324the connecting user has been authenticated: %% is replaced by a literal '%',
325%h is replaced by the home directory of the user being authenticated, and
326%u is replaced by the username of that user.
327.Pp
328The
329.Cm ChrootDirectory
330must contain the necessary files and directories to support the
Darren Tuckeraf501cf2009-06-21 17:53:04 +1000331user's session.
Damien Millerd8cb1f12008-02-10 22:40:12 +1100332For an interactive session this requires at least a shell, typically
333.Xr sh 1 ,
334and basic
335.Pa /dev
336nodes such as
337.Xr null 4 ,
338.Xr zero 4 ,
339.Xr stdin 4 ,
340.Xr stdout 4 ,
341.Xr stderr 4 ,
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000342and
Damien Millerd8cb1f12008-02-10 22:40:12 +1100343.Xr tty 4
344devices.
345For file transfer sessions using
Darren Tuckerf92077f2009-06-21 17:56:25 +1000346.Dq sftp ,
Damien Millerd8cb1f12008-02-10 22:40:12 +1100347no additional configuration of the environment is necessary if the
Darren Tuckerf92077f2009-06-21 17:56:25 +1000348in-process sftp server is used,
Damien Miller426117b2014-07-30 12:33:20 +1000349though sessions which use logging may require
Darren Tucker00fcd712009-06-21 17:56:00 +1000350.Pa /dev/log
Damien Miller426117b2014-07-30 12:33:20 +1000351inside the chroot directory on some operating systems (see
Darren Tucker00fcd712009-06-21 17:56:00 +1000352.Xr sftp-server 8
353for details).
Damien Millerd8cb1f12008-02-10 22:40:12 +1100354.Pp
355The default is not to
356.Xr chroot 2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000357.It Cm Ciphers
358Specifies the ciphers allowed for protocol version 2.
359Multiple ciphers must be comma-separated.
Damien Miller0fde8ac2013-11-21 14:12:23 +1100360The supported ciphers are:
361.Pp
Damien Millerc1621c82014-04-20 13:22:46 +1000362.Bl -item -compact -offset indent
363.It
3643des-cbc
365.It
366aes128-cbc
367.It
368aes192-cbc
369.It
370aes256-cbc
371.It
372aes128-ctr
373.It
374aes192-ctr
375.It
376aes256-ctr
377.It
378aes128-gcm@openssh.com
379.It
380aes256-gcm@openssh.com
381.It
382arcfour
383.It
384arcfour128
385.It
386arcfour256
387.It
388blowfish-cbc
389.It
390cast128-cbc
391.It
392chacha20-poly1305@openssh.com
393.El
Damien Miller0fde8ac2013-11-21 14:12:23 +1100394.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +1100395The default is:
Damien Millerc1621c82014-04-20 13:22:46 +1000396.Bd -literal -offset indent
397aes128-ctr,aes192-ctr,aes256-ctr,
Damien Miller1d75abf2013-01-09 16:12:19 +1100398aes128-gcm@openssh.com,aes256-gcm@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +1000399chacha20-poly1305@openssh.com
Ben Lindstrom9f049032002-06-21 00:59:05 +0000400.Ed
Damien Miller0fde8ac2013-11-21 14:12:23 +1100401.Pp
402The list of available ciphers may also be obtained using the
403.Fl Q
404option of
405.Xr ssh 1 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000406.It Cm ClientAliveCountMax
Damien Millerb7977702006-01-03 18:47:31 +1100407Sets the number of client alive messages (see below) which may be
Ben Lindstrom9f049032002-06-21 00:59:05 +0000408sent without
Damien Miller5b0d63f2006-03-15 11:56:56 +1100409.Xr sshd 8
Damien Millerfbf486b2003-05-23 18:44:23 +1000410receiving any messages back from the client.
411If this threshold is reached while client alive messages are being sent,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100412sshd will disconnect the client, terminating the session.
Damien Millerfbf486b2003-05-23 18:44:23 +1000413It is important to note that the use of client alive messages is very
414different from
Damien Miller12c150e2003-12-17 16:31:10 +1100415.Cm TCPKeepAlive
Damien Millerfbf486b2003-05-23 18:44:23 +1000416(below).
417The client alive messages are sent through the encrypted channel
418and therefore will not be spoofable.
419The TCP keepalive option enabled by
Damien Miller12c150e2003-12-17 16:31:10 +1100420.Cm TCPKeepAlive
Damien Millerfbf486b2003-05-23 18:44:23 +1000421is spoofable.
422The client alive mechanism is valuable when the client or
Ben Lindstrom9f049032002-06-21 00:59:05 +0000423server depend on knowing when a connection has become inactive.
424.Pp
Damien Millerfbf486b2003-05-23 18:44:23 +1000425The default value is 3.
426If
Ben Lindstrom9f049032002-06-21 00:59:05 +0000427.Cm ClientAliveInterval
Damien Millerb7977702006-01-03 18:47:31 +1100428(see below) is set to 15, and
Ben Lindstrom9f049032002-06-21 00:59:05 +0000429.Cm ClientAliveCountMax
Damien Miller5b0d63f2006-03-15 11:56:56 +1100430is left at the default, unresponsive SSH clients
Ben Lindstrom9f049032002-06-21 00:59:05 +0000431will be disconnected after approximately 45 seconds.
Damien Millercc3e8ba2006-03-15 12:06:55 +1100432This option applies to protocol version 2 only.
Damien Miller1594ad52005-05-26 12:12:19 +1000433.It Cm ClientAliveInterval
434Sets a timeout interval in seconds after which if no data has been received
435from the client,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100436.Xr sshd 8
Damien Miller1594ad52005-05-26 12:12:19 +1000437will send a message through the encrypted
438channel to request a response from the client.
439The default
440is 0, indicating that these messages will not be sent to the client.
441This option applies to protocol version 2 only.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000442.It Cm Compression
Damien Miller9786e6e2005-07-26 21:54:56 +1000443Specifies whether compression is allowed, or delayed until
444the user has authenticated successfully.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000445The argument must be
Damien Miller9786e6e2005-07-26 21:54:56 +1000446.Dq yes ,
447.Dq delayed ,
Ben Lindstrom9f049032002-06-21 00:59:05 +0000448or
449.Dq no .
450The default is
Damien Miller9786e6e2005-07-26 21:54:56 +1000451.Dq delayed .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000452.It Cm DenyGroups
453This keyword can be followed by a list of group name patterns, separated
454by spaces.
455Login is disallowed for users whose primary group or supplementary
456group list matches one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000457Only group names are valid; a numerical group ID is not recognized.
458By default, login is allowed for all groups.
Damien Millerac73e512006-03-15 11:58:49 +1100459The allow/deny directives are processed in the following order:
460.Cm DenyUsers ,
461.Cm AllowUsers ,
462.Cm DenyGroups ,
463and finally
464.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100465.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000466See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100467.Xr ssh_config 5
468for more information on patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000469.It Cm DenyUsers
470This keyword can be followed by a list of user name patterns, separated
471by spaces.
472Login is disallowed for user names that match one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000473Only user names are valid; a numerical user ID is not recognized.
474By default, login is allowed for all users.
475If the pattern takes the form USER@HOST then USER and HOST
476are separately checked, restricting logins to particular
477users from particular hosts.
Damien Millerac73e512006-03-15 11:58:49 +1100478The allow/deny directives are processed in the following order:
479.Cm DenyUsers ,
480.Cm AllowUsers ,
481.Cm DenyGroups ,
482and finally
483.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100484.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000485See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100486.Xr ssh_config 5
487for more information on patterns.
djm@openbsd.org56d1c832014-12-21 22:27:55 +0000488.It Cm FingerprintHash
489Specifies the hash algorithm used when logging key fingerprints.
490Valid options are:
491.Dq md5
492and
493.Dq sha256 .
494The default is
495.Dq sha256 .
496.Pp
Damien Millere2754432006-07-24 14:06:47 +1000497.It Cm ForceCommand
498Forces the execution of the command specified by
499.Cm ForceCommand ,
Damien Millera1b48cc2008-03-27 11:02:02 +1100500ignoring any command supplied by the client and
501.Pa ~/.ssh/rc
502if present.
Damien Millere2754432006-07-24 14:06:47 +1000503The command is invoked by using the user's login shell with the -c option.
504This applies to shell, command, or subsystem execution.
505It is most useful inside a
506.Cm Match
507block.
508The command originally supplied by the client is available in the
509.Ev SSH_ORIGINAL_COMMAND
510environment variable.
Damien Millercdb6e652008-02-10 22:47:24 +1100511Specifying a command of
512.Dq internal-sftp
513will force the use of an in-process sftp server that requires no support
514files when used with
515.Cm ChrootDirectory .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000516.It Cm GatewayPorts
517Specifies whether remote hosts are allowed to connect to ports
518forwarded for the client.
519By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100520.Xr sshd 8
Damien Miller495dca32003-04-01 21:42:14 +1000521binds remote port forwardings to the loopback address.
522This prevents other remote hosts from connecting to forwarded ports.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000523.Cm GatewayPorts
Damien Miller5b0d63f2006-03-15 11:56:56 +1100524can be used to specify that sshd
Damien Millerf91ee4c2005-03-01 21:24:33 +1100525should allow remote port forwardings to bind to non-loopback addresses, thus
526allowing other hosts to connect.
527The argument may be
528.Dq no
529to force remote port forwardings to be available to the local host only,
Ben Lindstrom9f049032002-06-21 00:59:05 +0000530.Dq yes
Damien Millerf91ee4c2005-03-01 21:24:33 +1100531to force remote port forwardings to bind to the wildcard address, or
532.Dq clientspecified
533to allow the client to select the address to which the forwarding is bound.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000534The default is
535.Dq no .
Darren Tucker0efd1552003-08-26 11:49:55 +1000536.It Cm GSSAPIAuthentication
Damien Miller9b7b03b2003-09-02 22:57:05 +1000537Specifies whether user authentication based on GSSAPI is allowed.
Damien Millera8e06ce2003-11-21 23:48:55 +1100538The default is
Darren Tucker0efd1552003-08-26 11:49:55 +1000539.Dq no .
540Note that this option applies to protocol version 2 only.
541.It Cm GSSAPICleanupCredentials
542Specifies whether to automatically destroy the user's credentials cache
543on logout.
544The default is
545.Dq yes .
546Note that this option applies to protocol version 2 only.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000547.It Cm HostbasedAuthentication
548Specifies whether rhosts or /etc/hosts.equiv authentication together
549with successful public key client host authentication is allowed
Damien Miller1faa7132006-03-15 11:55:31 +1100550(host-based authentication).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000551This option is similar to
552.Cm RhostsRSAAuthentication
553and applies to protocol version 2 only.
554The default is
555.Dq no .
Damien Millerb594f382006-08-30 11:06:34 +1000556.It Cm HostbasedUsesNameFromPacketOnly
557Specifies whether or not the server will attempt to perform a reverse
558name lookup when matching the name in the
559.Pa ~/.shosts ,
560.Pa ~/.rhosts ,
561and
562.Pa /etc/hosts.equiv
563files during
564.Cm HostbasedAuthentication .
565A setting of
566.Dq yes
567means that
568.Xr sshd 8
569uses the name supplied by the client rather than
570attempting to resolve the name from the TCP connection itself.
571The default is
572.Dq no .
Damien Miller0a80ca12010-02-27 07:55:05 +1100573.It Cm HostCertificate
574Specifies a file containing a public host certificate.
575The certificate's public key must match a private host key already specified
576by
577.Cm HostKey .
578The default behaviour of
579.Xr sshd 8
580is not to load any certificates.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000581.It Cm HostKey
582Specifies a file containing a private host key
583used by SSH.
584The default is
585.Pa /etc/ssh/ssh_host_key
586for protocol version 1, and
Damien Millereb8b60e2010-08-31 22:41:14 +1000587.Pa /etc/ssh/ssh_host_dsa_key ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100588.Pa /etc/ssh/ssh_host_ecdsa_key ,
589.Pa /etc/ssh/ssh_host_ed25519_key
Ben Lindstrom9f049032002-06-21 00:59:05 +0000590and
Damien Millereb8b60e2010-08-31 22:41:14 +1000591.Pa /etc/ssh/ssh_host_rsa_key
Ben Lindstrom9f049032002-06-21 00:59:05 +0000592for protocol version 2.
593Note that
Damien Miller5b0d63f2006-03-15 11:56:56 +1100594.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000595will refuse to use a file if it is group/world-accessible.
596It is possible to have multiple host key files.
597.Dq rsa1
598keys are used for version 1 and
Damien Millereb8b60e2010-08-31 22:41:14 +1000599.Dq dsa ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100600.Dq ecdsa ,
601.Dq ed25519
Ben Lindstrom9f049032002-06-21 00:59:05 +0000602or
603.Dq rsa
604are used for version 2 of the SSH protocol.
Damien Miller85b45e02013-07-20 13:21:52 +1000605It is also possible to specify public host key files instead.
606In this case operations on the private key will be delegated
607to an
608.Xr ssh-agent 1 .
609.It Cm HostKeyAgent
610Identifies the UNIX-domain socket used to communicate
611with an agent that has access to the private host keys.
612If
613.Dq SSH_AUTH_SOCK
614is specified, the location of the socket will be read from the
615.Ev SSH_AUTH_SOCK
616environment variable.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000617.It Cm IgnoreRhosts
618Specifies that
619.Pa .rhosts
620and
621.Pa .shosts
622files will not be used in
Ben Lindstrom9f049032002-06-21 00:59:05 +0000623.Cm RhostsRSAAuthentication
624or
625.Cm HostbasedAuthentication .
626.Pp
627.Pa /etc/hosts.equiv
628and
629.Pa /etc/shosts.equiv
630are still used.
631The default is
632.Dq yes .
633.It Cm IgnoreUserKnownHosts
634Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +1100635.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000636should ignore the user's
Damien Miller167ea5d2005-05-26 12:04:02 +1000637.Pa ~/.ssh/known_hosts
Ben Lindstrom9f049032002-06-21 00:59:05 +0000638during
639.Cm RhostsRSAAuthentication
640or
641.Cm HostbasedAuthentication .
642The default is
643.Dq no .
Damien Miller0dac6fb2010-11-20 15:19:38 +1100644.It Cm IPQoS
645Specifies the IPv4 type-of-service or DSCP class for the connection.
646Accepted values are
647.Dq af11 ,
648.Dq af12 ,
649.Dq af13 ,
Damien Millerf6e758c2011-09-22 21:37:13 +1000650.Dq af21 ,
Damien Miller0dac6fb2010-11-20 15:19:38 +1100651.Dq af22 ,
652.Dq af23 ,
653.Dq af31 ,
654.Dq af32 ,
655.Dq af33 ,
656.Dq af41 ,
657.Dq af42 ,
658.Dq af43 ,
659.Dq cs0 ,
660.Dq cs1 ,
661.Dq cs2 ,
662.Dq cs3 ,
663.Dq cs4 ,
664.Dq cs5 ,
665.Dq cs6 ,
666.Dq cs7 ,
667.Dq ef ,
668.Dq lowdelay ,
669.Dq throughput ,
670.Dq reliability ,
671or a numeric value.
Damien Miller928362d2010-12-26 14:26:45 +1100672This option may take one or two arguments, separated by whitespace.
Damien Miller0dac6fb2010-11-20 15:19:38 +1100673If one argument is specified, it is used as the packet class unconditionally.
674If two values are specified, the first is automatically selected for
675interactive sessions and the second for non-interactive sessions.
676The default is
677.Dq lowdelay
678for interactive sessions and
679.Dq throughput
680for non-interactive sessions.
Damien Millere1e480a2014-02-04 11:13:17 +1100681.It Cm KbdInteractiveAuthentication
682Specifies whether to allow keyboard-interactive authentication.
683The argument to this keyword must be
684.Dq yes
685or
686.Dq no .
687The default is to use whatever value
688.Cm ChallengeResponseAuthentication
689is set to
690(by default
691.Dq yes ) .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000692.It Cm KerberosAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000693Specifies whether the password provided by the user for
Ben Lindstrom9f049032002-06-21 00:59:05 +0000694.Cm PasswordAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000695will be validated through the Kerberos KDC.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000696To use this option, the server needs a
697Kerberos servtab which allows the verification of the KDC's identity.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100698The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000699.Dq no .
Damien Miller8448e662004-03-08 23:13:15 +1100700.It Cm KerberosGetAFSToken
Darren Tuckere2dd2d52005-10-03 18:19:06 +1000701If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
Damien Miller8448e662004-03-08 23:13:15 +1100702an AFS token before accessing the user's home directory.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100703The default is
Damien Miller8448e662004-03-08 23:13:15 +1100704.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000705.It Cm KerberosOrLocalPasswd
Damien Miller5b0d63f2006-03-15 11:56:56 +1100706If password authentication through Kerberos fails then
Ben Lindstrom9f049032002-06-21 00:59:05 +0000707the password will be validated via any additional local mechanism
708such as
709.Pa /etc/passwd .
Damien Miller5b0d63f2006-03-15 11:56:56 +1100710The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000711.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000712.It Cm KerberosTicketCleanup
713Specifies whether to automatically destroy the user's ticket cache
714file on logout.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100715The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000716.Dq yes .
Damien Millerd5f62bf2010-09-24 22:11:14 +1000717.It Cm KexAlgorithms
718Specifies the available KEX (Key Exchange) algorithms.
719Multiple algorithms must be comma-separated.
Damien Millerc1621c82014-04-20 13:22:46 +1000720The supported algorithms are:
721.Pp
722.Bl -item -compact -offset indent
723.It
724curve25519-sha256@libssh.org
725.It
726diffie-hellman-group1-sha1
727.It
728diffie-hellman-group14-sha1
729.It
730diffie-hellman-group-exchange-sha1
731.It
732diffie-hellman-group-exchange-sha256
733.It
734ecdh-sha2-nistp256
735.It
736ecdh-sha2-nistp384
737.It
738ecdh-sha2-nistp521
739.El
740.Pp
741The default is:
Damien Miller6575c3a2013-12-18 17:47:02 +1100742.Bd -literal -offset indent
743curve25519-sha256@libssh.org,
744ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
745diffie-hellman-group-exchange-sha256,
Damien Millerc1621c82014-04-20 13:22:46 +1000746diffie-hellman-group14-sha1
Damien Miller6575c3a2013-12-18 17:47:02 +1100747.Ed
Ben Lindstrom9f049032002-06-21 00:59:05 +0000748.It Cm KeyRegenerationInterval
749In protocol version 1, the ephemeral server key is automatically regenerated
750after this many seconds (if it has been used).
751The purpose of regeneration is to prevent
752decrypting captured sessions by later breaking into the machine and
753stealing the keys.
754The key is never stored anywhere.
755If the value is 0, the key is never regenerated.
756The default is 3600 (seconds).
757.It Cm ListenAddress
758Specifies the local addresses
Damien Miller5b0d63f2006-03-15 11:56:56 +1100759.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000760should listen on.
761The following forms may be used:
762.Pp
763.Bl -item -offset indent -compact
764.It
765.Cm ListenAddress
766.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000767.Ar host | Ar IPv4_addr | Ar IPv6_addr
Ben Lindstrom9f049032002-06-21 00:59:05 +0000768.Sm on
769.It
770.Cm ListenAddress
771.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000772.Ar host | Ar IPv4_addr : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000773.Sm on
774.It
775.Cm ListenAddress
776.Sm off
777.Oo
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000778.Ar host | Ar IPv6_addr Oc : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000779.Sm on
780.El
781.Pp
782If
783.Ar port
784is not specified,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100785sshd will listen on the address and all prior
Ben Lindstrom9f049032002-06-21 00:59:05 +0000786.Cm Port
Damien Millerfbf486b2003-05-23 18:44:23 +1000787options specified.
788The default is to listen on all local addresses.
Damien Miller495dca32003-04-01 21:42:14 +1000789Multiple
Ben Lindstrom9f049032002-06-21 00:59:05 +0000790.Cm ListenAddress
Damien Millerfbf486b2003-05-23 18:44:23 +1000791options are permitted.
792Additionally, any
Ben Lindstrom9f049032002-06-21 00:59:05 +0000793.Cm Port
Damien Miller5b0d63f2006-03-15 11:56:56 +1100794options must precede this option for non-port qualified addresses.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000795.It Cm LoginGraceTime
796The server disconnects after this time if the user has not
797successfully logged in.
798If the value is 0, there is no time limit.
Damien Millerc1348632002-09-05 14:35:14 +1000799The default is 120 seconds.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000800.It Cm LogLevel
801Gives the verbosity level that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +1100802.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000803The possible values are:
Damien Miller5b0d63f2006-03-15 11:56:56 +1100804QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
Damien Miller495dca32003-04-01 21:42:14 +1000805The default is INFO.
806DEBUG and DEBUG1 are equivalent.
807DEBUG2 and DEBUG3 each specify higher levels of debugging output.
808Logging with a DEBUG level violates the privacy of users and is not recommended.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000809.It Cm MACs
810Specifies the available MAC (message authentication code) algorithms.
811The MAC algorithm is used in protocol version 2
812for data integrity protection.
813Multiple algorithms must be comma-separated.
Damien Milleraf43a7a2012-12-12 10:46:31 +1100814The algorithms that contain
815.Dq -etm
816calculate the MAC after encryption (encrypt-then-mac).
817These are considered safer and their use recommended.
Damien Millerc1621c82014-04-20 13:22:46 +1000818The supported MACs are:
819.Pp
820.Bl -item -compact -offset indent
821.It
822hmac-md5
823.It
824hmac-md5-96
825.It
826hmac-ripemd160
827.It
828hmac-sha1
829.It
830hmac-sha1-96
831.It
832hmac-sha2-256
833.It
834hmac-sha2-512
835.It
836umac-64@openssh.com
837.It
838umac-128@openssh.com
839.It
840hmac-md5-etm@openssh.com
841.It
842hmac-md5-96-etm@openssh.com
843.It
844hmac-ripemd160-etm@openssh.com
845.It
846hmac-sha1-etm@openssh.com
847.It
848hmac-sha1-96-etm@openssh.com
849.It
850hmac-sha2-256-etm@openssh.com
851.It
852hmac-sha2-512-etm@openssh.com
853.It
854umac-64-etm@openssh.com
855.It
856umac-128-etm@openssh.com
857.El
858.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +1100859The default is:
Damien Miller22b7b492007-06-11 14:07:12 +1000860.Bd -literal -offset indent
Damien Milleraf43a7a2012-12-12 10:46:31 +1100861umac-64-etm@openssh.com,umac-128-etm@openssh.com,
862hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +1000863umac-64@openssh.com,umac-128@openssh.com,
864hmac-sha2-256,hmac-sha2-512
Damien Miller22b7b492007-06-11 14:07:12 +1000865.Ed
Darren Tucker45150472006-07-12 22:34:17 +1000866.It Cm Match
Damien Millerd04f3572006-07-24 13:46:50 +1000867Introduces a conditional block.
Damien Miller8c234032006-07-24 14:05:08 +1000868If all of the criteria on the
Darren Tucker45150472006-07-12 22:34:17 +1000869.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +1000870line are satisfied, the keywords on the following lines override those
871set in the global section of the config file, until either another
Darren Tucker45150472006-07-12 22:34:17 +1000872.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +1000873line or the end of the file.
Damien Millerfc5d6752014-02-28 10:01:28 +1100874If a keyword appears in multiple
875.Cm Match
sobrado@openbsd.org180bcb42014-08-30 16:32:25 +0000876blocks that are satisfied, only the first instance of the keyword is
Damien Millerfc5d6752014-02-28 10:01:28 +1100877applied.
Darren Tucker7a3935d2008-06-10 22:59:10 +1000878.Pp
Damien Millerd04f3572006-07-24 13:46:50 +1000879The arguments to
Darren Tucker45150472006-07-12 22:34:17 +1000880.Cm Match
Damien Millercf31f382013-10-24 21:02:56 +1100881are one or more criteria-pattern pairs or the single token
882.Cm All
883which matches all criteria.
Darren Tucker45150472006-07-12 22:34:17 +1000884The available criteria are
885.Cm User ,
Damien Miller565ca3f2006-08-19 00:23:15 +1000886.Cm Group ,
Darren Tucker45150472006-07-12 22:34:17 +1000887.Cm Host ,
Darren Tuckerfbcf8272012-05-19 19:37:01 +1000888.Cm LocalAddress ,
889.Cm LocalPort ,
Darren Tucker45150472006-07-12 22:34:17 +1000890and
891.Cm Address .
Darren Tucker7a3935d2008-06-10 22:59:10 +1000892The match patterns may consist of single entries or comma-separated
893lists and may use the wildcard and negation operators described in the
Damien Millerfecfd112013-07-18 16:11:50 +1000894PATTERNS section of
Darren Tuckerb06cc4a2008-06-10 22:59:53 +1000895.Xr ssh_config 5 .
Darren Tucker7a3935d2008-06-10 22:59:10 +1000896.Pp
897The patterns in an
898.Cm Address
899criteria may additionally contain addresses to match in CIDR
Darren Tucker6a2a4002008-06-10 23:03:04 +1000900address/masklen format, e.g.\&
Darren Tucker7a3935d2008-06-10 22:59:10 +1000901.Dq 192.0.2.0/24
902or
903.Dq 3ffe:ffff::/32 .
904Note that the mask length provided must be consistent with the address -
905it is an error to specify a mask length that is too long for the address
Darren Tucker6a2a4002008-06-10 23:03:04 +1000906or one with bits set in this host portion of the address.
907For example,
Darren Tucker7a3935d2008-06-10 22:59:10 +1000908.Dq 192.0.2.0/33
909and
Darren Tucker6a2a4002008-06-10 23:03:04 +1000910.Dq 192.0.2.0/8
Darren Tucker7a3935d2008-06-10 22:59:10 +1000911respectively.
912.Pp
Darren Tucker45150472006-07-12 22:34:17 +1000913Only a subset of keywords may be used on the lines following a
914.Cm Match
915keyword.
916Available keywords are
Damien Millerf8268502012-06-20 21:54:15 +1000917.Cm AcceptEnv ,
Damien Miller17819012009-01-28 16:20:17 +1100918.Cm AllowAgentForwarding ,
Damien Millerf8268502012-06-20 21:54:15 +1000919.Cm AllowGroups ,
Damien Miller9b439df2006-07-24 14:04:00 +1000920.Cm AllowTcpForwarding ,
Damien Millerc24da772012-06-20 21:53:58 +1000921.Cm AllowUsers ,
Damien Millera6e3f012012-11-04 23:21:40 +1100922.Cm AuthenticationMethods ,
Damien Miller09d3e122012-10-31 08:58:58 +1100923.Cm AuthorizedKeysCommand ,
924.Cm AuthorizedKeysCommandUser ,
Damien Millerf33580e2012-11-04 22:22:52 +1100925.Cm AuthorizedKeysFile ,
Damien Millerab6de352010-06-26 09:38:45 +1000926.Cm AuthorizedPrincipalsFile ,
Darren Tucker1629c072007-02-19 22:25:37 +1100927.Cm Banner ,
Damien Miller797e3d12008-05-19 14:27:42 +1000928.Cm ChrootDirectory ,
Damien Millerc24da772012-06-20 21:53:58 +1000929.Cm DenyGroups ,
930.Cm DenyUsers ,
Damien Millere2754432006-07-24 14:06:47 +1000931.Cm ForceCommand ,
Damien Millerc24da772012-06-20 21:53:58 +1000932.Cm GatewayPorts ,
Damien Millerf8268502012-06-20 21:54:15 +1000933.Cm GSSAPIAuthentication ,
Damien Miller25434de2008-05-19 14:29:08 +1000934.Cm HostbasedAuthentication ,
Damien Millerab6de352010-06-26 09:38:45 +1000935.Cm HostbasedUsesNameFromPacketOnly ,
Darren Tucker1d75f222007-03-01 21:31:28 +1100936.Cm KbdInteractiveAuthentication ,
Damien Miller5737e362007-03-06 21:21:18 +1100937.Cm KerberosAuthentication ,
Damien Miller307c1d12008-06-16 07:56:20 +1000938.Cm MaxAuthTries ,
Damien Millerc62a5af2008-06-16 07:55:46 +1000939.Cm MaxSessions ,
Darren Tucker1629c072007-02-19 22:25:37 +1100940.Cm PasswordAuthentication ,
Damien Miller51bde602008-11-03 19:23:10 +1100941.Cm PermitEmptyPasswords ,
Damien Millerd1de9952006-07-24 14:05:48 +1000942.Cm PermitOpen ,
Darren Tucker15f94272008-01-01 20:36:56 +1100943.Cm PermitRootLogin ,
Damien Miller5ff30c62013-10-30 22:21:50 +1100944.Cm PermitTTY ,
Damien Millerab6de352010-06-26 09:38:45 +1000945.Cm PermitTunnel ,
Damien Miller72e6b5c2014-07-04 09:00:04 +1000946.Cm PermitUserRC ,
Darren Tucker1477ea12009-10-07 08:36:05 +1100947.Cm PubkeyAuthentication ,
Darren Tucker5f96f3b2013-05-16 20:29:28 +1000948.Cm RekeyLimit ,
Damien Millerc24da772012-06-20 21:53:58 +1000949.Cm RhostsRSAAuthentication ,
Damien Millerf8268502012-06-20 21:54:15 +1000950.Cm RSAAuthentication ,
Damien Millerd1de9952006-07-24 14:05:48 +1000951.Cm X11DisplayOffset ,
Damien Miller19913842009-02-23 10:53:58 +1100952.Cm X11Forwarding
Darren Tucker45150472006-07-12 22:34:17 +1000953and
Damien Miller0296ae82009-02-23 11:00:24 +1100954.Cm X11UseLocalHost .
Darren Tucker89413db2004-05-24 10:36:23 +1000955.It Cm MaxAuthTries
956Specifies the maximum number of authentication attempts permitted per
Damien Miller26213e52004-06-30 22:39:34 +1000957connection.
958Once the number of failures reaches half this value,
959additional failures are logged.
960The default is 6.
Damien Miller7207f642008-05-19 15:34:50 +1000961.It Cm MaxSessions
962Specifies the maximum number of open sessions permitted per network connection.
963The default is 10.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000964.It Cm MaxStartups
965Specifies the maximum number of concurrent unauthenticated connections to the
Damien Miller5b0d63f2006-03-15 11:56:56 +1100966SSH daemon.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000967Additional connections will be dropped until authentication succeeds or the
968.Cm LoginGraceTime
969expires for a connection.
Damien Miller1f583df2013-02-12 11:02:08 +1100970The default is 10:30:100.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000971.Pp
972Alternatively, random early drop can be enabled by specifying
973the three colon separated values
974.Dq start:rate:full
Damien Miller208f1ed2006-03-15 11:56:03 +1100975(e.g. "10:30:60").
Damien Millerf4f22b52006-03-15 11:57:25 +1100976.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000977will refuse connection attempts with a probability of
978.Dq rate/100
979(30%)
980if there are currently
981.Dq start
982(10)
983unauthenticated connections.
984The probability increases linearly and all connection attempts
985are refused if the number of unauthenticated connections reaches
986.Dq full
987(60).
988.It Cm PasswordAuthentication
989Specifies whether password authentication is allowed.
990The default is
991.Dq yes .
992.It Cm PermitEmptyPasswords
993When password authentication is allowed, it specifies whether the
994server allows login to accounts with empty password strings.
995The default is
996.Dq no .
Damien Miller9b439df2006-07-24 14:04:00 +1000997.It Cm PermitOpen
998Specifies the destinations to which TCP port forwarding is permitted.
999The forwarding specification must be one of the following forms:
1000.Pp
1001.Bl -item -offset indent -compact
1002.It
1003.Cm PermitOpen
1004.Sm off
1005.Ar host : port
1006.Sm on
1007.It
1008.Cm PermitOpen
1009.Sm off
1010.Ar IPv4_addr : port
1011.Sm on
1012.It
1013.Cm PermitOpen
1014.Sm off
1015.Ar \&[ IPv6_addr \&] : port
1016.Sm on
1017.El
1018.Pp
Damien Millera765cf42006-07-24 14:08:13 +10001019Multiple forwards may be specified by separating them with whitespace.
Damien Miller9b439df2006-07-24 14:04:00 +10001020An argument of
1021.Dq any
1022can be used to remove all restrictions and permit any forwarding requests.
Darren Tuckerba9ea322012-05-19 19:37:33 +10001023An argument of
1024.Dq none
1025can be used to prohibit all forwarding requests.
Damien Miller65bc2c42006-07-24 14:04:16 +10001026By default all port forwarding requests are permitted.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001027.It Cm PermitRootLogin
Darren Tuckerb3509012005-01-20 11:01:46 +11001028Specifies whether root can log in using
Ben Lindstrom9f049032002-06-21 00:59:05 +00001029.Xr ssh 1 .
1030The argument must be
1031.Dq yes ,
1032.Dq without-password ,
Damien Miller5b0d63f2006-03-15 11:56:56 +11001033.Dq forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001034or
1035.Dq no .
1036The default is
1037.Dq yes .
1038.Pp
1039If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001040.Dq without-password ,
Darren Tucker9dca0992005-02-01 19:16:45 +11001041password authentication is disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001042.Pp
1043If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001044.Dq forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001045root login with public key authentication will be allowed,
1046but only if the
1047.Ar command
1048option has been specified
1049(which may be useful for taking remote backups even if root login is
Damien Millerfbf486b2003-05-23 18:44:23 +10001050normally not allowed).
1051All other authentication methods are disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001052.Pp
1053If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001054.Dq no ,
Darren Tuckerb3509012005-01-20 11:01:46 +11001055root is not allowed to log in.
Damien Millerd27b9472005-12-13 19:29:02 +11001056.It Cm PermitTunnel
1057Specifies whether
1058.Xr tun 4
1059device forwarding is allowed.
Damien Miller7b58e802005-12-13 19:33:19 +11001060The argument must be
1061.Dq yes ,
Damien Miller991dba42006-07-10 20:16:27 +10001062.Dq point-to-point
1063(layer 3),
1064.Dq ethernet
1065(layer 2), or
Damien Miller7b58e802005-12-13 19:33:19 +11001066.Dq no .
Damien Miller991dba42006-07-10 20:16:27 +10001067Specifying
1068.Dq yes
1069permits both
1070.Dq point-to-point
1071and
1072.Dq ethernet .
Damien Millerd27b9472005-12-13 19:29:02 +11001073The default is
1074.Dq no .
djm@openbsd.org48dffd52014-09-09 09:45:36 +00001075.Pp
1076Independent of this setting, the permissions of the selected
1077.Xr tun 4
1078device must allow access to the user.
Damien Miller5ff30c62013-10-30 22:21:50 +11001079.It Cm PermitTTY
1080Specifies whether
Damien Miller63857c92013-10-30 22:31:06 +11001081.Xr pty 4
Damien Miller5ff30c62013-10-30 22:21:50 +11001082allocation is permitted.
1083The default is
1084.Dq yes .
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001085.It Cm PermitUserEnvironment
1086Specifies whether
1087.Pa ~/.ssh/environment
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001088and
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001089.Cm environment=
1090options in
1091.Pa ~/.ssh/authorized_keys
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001092are processed by
Damien Miller5b0d63f2006-03-15 11:56:56 +11001093.Xr sshd 8 .
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001094The default is
1095.Dq no .
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001096Enabling environment processing may enable users to bypass access
1097restrictions in some configurations using mechanisms such as
1098.Ev LD_PRELOAD .
Damien Miller72e6b5c2014-07-04 09:00:04 +10001099.It Cm PermitUserRC
1100Specifies whether any
1101.Pa ~/.ssh/rc
1102file is executed.
1103The default is
1104.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001105.It Cm PidFile
Ben Lindstrom959de992002-06-23 00:35:25 +00001106Specifies the file that contains the process ID of the
Damien Millerf4f22b52006-03-15 11:57:25 +11001107SSH daemon.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001108The default is
1109.Pa /var/run/sshd.pid .
1110.It Cm Port
1111Specifies the port number that
Damien Miller5b0d63f2006-03-15 11:56:56 +11001112.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001113listens on.
1114The default is 22.
1115Multiple options of this type are permitted.
1116See also
1117.Cm ListenAddress .
1118.It Cm PrintLastLog
1119Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001120.Xr sshd 8
Darren Tucker7cc5c232004-11-05 20:06:59 +11001121should print the date and time of the last user login when a user logs
1122in interactively.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001123The default is
1124.Dq yes .
1125.It Cm PrintMotd
1126Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001127.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001128should print
1129.Pa /etc/motd
1130when a user logs in interactively.
1131(On some systems it is also printed by the shell,
1132.Pa /etc/profile ,
1133or equivalent.)
1134The default is
1135.Dq yes .
1136.It Cm Protocol
1137Specifies the protocol versions
Damien Miller5b0d63f2006-03-15 11:56:56 +11001138.Xr sshd 8
Ben Lindstrom9c445542002-07-11 03:59:18 +00001139supports.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001140The possible values are
Damien Miller5b0d63f2006-03-15 11:56:56 +11001141.Sq 1
Ben Lindstrom9f049032002-06-21 00:59:05 +00001142and
Damien Miller5b0d63f2006-03-15 11:56:56 +11001143.Sq 2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001144Multiple versions must be comma-separated.
1145The default is
Darren Tucker7a4a7652009-10-11 21:51:40 +11001146.Sq 2 .
Ben Lindstrom9c445542002-07-11 03:59:18 +00001147Note that the order of the protocol list does not indicate preference,
1148because the client selects among multiple protocol versions offered
1149by the server.
1150Specifying
1151.Dq 2,1
1152is identical to
1153.Dq 1,2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001154.It Cm PubkeyAuthentication
1155Specifies whether public key authentication is allowed.
1156The default is
1157.Dq yes .
1158Note that this option applies to protocol version 2 only.
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001159.It Cm RekeyLimit
1160Specifies the maximum amount of data that may be transmitted before the
1161session key is renegotiated, optionally followed a maximum amount of
1162time that may pass before the session key is renegotiated.
1163The first argument is specified in bytes and may have a suffix of
1164.Sq K ,
1165.Sq M ,
1166or
1167.Sq G
1168to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1169The default is between
1170.Sq 1G
1171and
1172.Sq 4G ,
1173depending on the cipher.
1174The optional second value is specified in seconds and may use any of the
1175units documented in the
1176.Sx TIME FORMATS
Darren Tucker64d22942013-05-16 20:31:29 +10001177section.
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001178The default value for
1179.Cm RekeyLimit
1180is
1181.Dq default none ,
1182which means that rekeying is performed after the cipher's default amount
1183of data has been sent or received and no time based rekeying is done.
1184This option applies to protocol version 2 only.
Damien Miller1aed65e2010-03-04 21:53:35 +11001185.It Cm RevokedKeys
Damien Millerf3747bf2013-01-18 11:44:04 +11001186Specifies revoked public keys.
Damien Miller1aed65e2010-03-04 21:53:35 +11001187Keys listed in this file will be refused for public key authentication.
1188Note that if this file is not readable, then public key authentication will
1189be refused for all users.
Damien Millerf3747bf2013-01-18 11:44:04 +11001190Keys may be specified as a text file, listing one public key per line, or as
1191an OpenSSH Key Revocation List (KRL) as generated by
Damien Miller72abeb72013-01-20 22:33:44 +11001192.Xr ssh-keygen 1 .
Damien Millerfecfd112013-07-18 16:11:50 +10001193For more information on KRLs, see the KEY REVOCATION LISTS section in
Damien Millerf3747bf2013-01-18 11:44:04 +11001194.Xr ssh-keygen 1 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001195.It Cm RhostsRSAAuthentication
1196Specifies whether rhosts or /etc/hosts.equiv authentication together
1197with successful RSA host authentication is allowed.
1198The default is
1199.Dq no .
1200This option applies to protocol version 1 only.
1201.It Cm RSAAuthentication
1202Specifies whether pure RSA authentication is allowed.
1203The default is
1204.Dq yes .
1205This option applies to protocol version 1 only.
1206.It Cm ServerKeyBits
1207Defines the number of bits in the ephemeral protocol version 1 server key.
Darren Tucker7499b0c2008-07-02 22:35:43 +10001208The minimum value is 512, and the default is 1024.
Damien Miller7acefbb2014-07-18 14:11:24 +10001209.It Cm StreamLocalBindMask
1210Sets the octal file creation mode mask
1211.Pq umask
1212used when creating a Unix-domain socket file for local or remote
1213port forwarding.
1214This option is only used for port forwarding to a Unix-domain socket file.
1215.Pp
1216The default value is 0177, which creates a Unix-domain socket file that is
1217readable and writable only by the owner.
1218Note that not all operating systems honor the file mode on Unix-domain
1219socket files.
1220.It Cm StreamLocalBindUnlink
1221Specifies whether to remove an existing Unix-domain socket file for local
1222or remote port forwarding before creating a new one.
1223If the socket file already exists and
1224.Cm StreamLocalBindUnlink
1225is not enabled,
1226.Nm sshd
1227will be unable to forward the port to the Unix-domain socket file.
1228This option is only used for port forwarding to a Unix-domain socket file.
1229.Pp
1230The argument must be
1231.Dq yes
1232or
1233.Dq no .
1234The default is
1235.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001236.It Cm StrictModes
1237Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001238.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001239should check file modes and ownership of the
1240user's files and home directory before accepting login.
1241This is normally desirable because novices sometimes accidentally leave their
1242directory or files world-writable.
1243The default is
1244.Dq yes .
Darren Tuckerf788a912010-01-08 17:06:47 +11001245Note that this does not apply to
1246.Cm ChrootDirectory ,
1247whose permissions and ownership are checked unconditionally.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001248.It Cm Subsystem
Damien Miller208f1ed2006-03-15 11:56:03 +11001249Configures an external subsystem (e.g. file transfer daemon).
Damien Miller917f9b62006-07-10 20:36:47 +10001250Arguments should be a subsystem name and a command (with optional arguments)
1251to execute upon subsystem request.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001252.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001253The command
1254.Xr sftp-server 8
1255implements the
1256.Dq sftp
1257file transfer subsystem.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001258.Pp
1259Alternately the name
1260.Dq internal-sftp
1261implements an in-process
1262.Dq sftp
1263server.
1264This may simplify configurations using
1265.Cm ChrootDirectory
1266to force a different filesystem root on clients.
1267.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001268By default no subsystems are defined.
1269Note that this option applies to protocol version 2 only.
1270.It Cm SyslogFacility
1271Gives the facility code that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +11001272.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001273The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1274LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1275The default is AUTH.
Damien Miller12c150e2003-12-17 16:31:10 +11001276.It Cm TCPKeepAlive
1277Specifies whether the system should send TCP keepalive messages to the
1278other side.
1279If they are sent, death of the connection or crash of one
1280of the machines will be properly noticed.
1281However, this means that
1282connections will die if the route is down temporarily, and some people
1283find it annoying.
1284On the other hand, if TCP keepalives are not sent,
1285sessions may hang indefinitely on the server, leaving
1286.Dq ghost
1287users and consuming server resources.
1288.Pp
1289The default is
1290.Dq yes
1291(to send TCP keepalive messages), and the server will notice
1292if the network goes down or the client host crashes.
1293This avoids infinitely hanging sessions.
1294.Pp
1295To disable TCP keepalive messages, the value should be set to
1296.Dq no .
Damien Miller1aed65e2010-03-04 21:53:35 +11001297.It Cm TrustedUserCAKeys
1298Specifies a file containing public keys of certificate authorities that are
Damien Millerc6db99e2010-03-05 10:41:45 +11001299trusted to sign user certificates for authentication.
Damien Miller72b33822010-03-05 07:39:01 +11001300Keys are listed one per line; empty lines and comments starting with
Damien Miller1aed65e2010-03-04 21:53:35 +11001301.Ql #
1302are allowed.
1303If a certificate is presented for authentication and has its signing CA key
1304listed in this file, then it may be used for authentication for any user
1305listed in the certificate's principals list.
1306Note that certificates that lack a list of principals will not be permitted
1307for authentication using
1308.Cm TrustedUserCAKeys .
Damien Millerfecfd112013-07-18 16:11:50 +10001309For more details on certificates, see the CERTIFICATES section in
Damien Miller1aed65e2010-03-04 21:53:35 +11001310.Xr ssh-keygen 1 .
Damien Miller3a961dc2003-06-03 10:25:48 +10001311.It Cm UseDNS
1312Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001313.Xr sshd 8
Darren Tucker83d5a982005-03-31 21:33:50 +10001314should look up the remote host name and check that
Damien Miller3a961dc2003-06-03 10:25:48 +10001315the resolved host name for the remote IP address maps back to the
1316very same IP address.
1317The default is
1318.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001319.It Cm UseLogin
1320Specifies whether
1321.Xr login 1
1322is used for interactive login sessions.
1323The default is
1324.Dq no .
1325Note that
1326.Xr login 1
1327is never used for remote command execution.
1328Note also, that if this is enabled,
1329.Cm X11Forwarding
1330will be disabled because
1331.Xr login 1
1332does not know how to handle
1333.Xr xauth 1
Damien Miller495dca32003-04-01 21:42:14 +10001334cookies.
1335If
Ben Lindstrom9f049032002-06-21 00:59:05 +00001336.Cm UsePrivilegeSeparation
1337is specified, it will be disabled after authentication.
Damien Miller2e193e22003-05-14 15:13:03 +10001338.It Cm UsePAM
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001339Enables the Pluggable Authentication Module interface.
1340If set to
1341.Dq yes
1342this will enable PAM authentication using
1343.Cm ChallengeResponseAuthentication
Darren Tuckera4904f72006-02-23 21:35:30 +11001344and
1345.Cm PasswordAuthentication
1346in addition to PAM account and session module processing for all
1347authentication types.
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001348.Pp
1349Because PAM challenge-response authentication usually serves an equivalent
1350role to password authentication, you should disable either
1351.Cm PasswordAuthentication
1352or
1353.Cm ChallengeResponseAuthentication.
1354.Pp
1355If
1356.Cm UsePAM
1357is enabled, you will not be able to run
1358.Xr sshd 8
1359as a non-root user.
1360The default is
Darren Tucker6c0c0702003-10-09 14:13:53 +10001361.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001362.It Cm UsePrivilegeSeparation
1363Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001364.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001365separates privileges by creating an unprivileged child process
Damien Miller495dca32003-04-01 21:42:14 +10001366to deal with incoming network traffic.
1367After successful authentication, another process will be created that has
1368the privilege of the authenticated user.
1369The goal of privilege separation is to prevent privilege
Ben Lindstrom9f049032002-06-21 00:59:05 +00001370escalation by containing any corruption within the unprivileged processes.
1371The default is
1372.Dq yes .
Damien Miller69ff1df2011-06-23 08:30:03 +10001373If
1374.Cm UsePrivilegeSeparation
1375is set to
1376.Dq sandbox
1377then the pre-authentication unprivileged process is subject to additional
1378restrictions.
Damien Miller23528812012-04-22 11:24:43 +10001379.It Cm VersionAddendum
1380Optionally specifies additional text to append to the SSH protocol banner
1381sent by the server upon connection.
1382The default is
1383.Dq none .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001384.It Cm X11DisplayOffset
1385Specifies the first display number available for
Damien Miller5b0d63f2006-03-15 11:56:56 +11001386.Xr sshd 8 Ns 's
Ben Lindstrom9f049032002-06-21 00:59:05 +00001387X11 forwarding.
Damien Miller5b0d63f2006-03-15 11:56:56 +11001388This prevents sshd from interfering with real X11 servers.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001389The default is 10.
1390.It Cm X11Forwarding
1391Specifies whether X11 forwarding is permitted.
Damien Miller101c4a72002-09-19 11:51:21 +10001392The argument must be
1393.Dq yes
1394or
1395.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001396The default is
1397.Dq no .
Damien Miller101c4a72002-09-19 11:51:21 +10001398.Pp
1399When X11 forwarding is enabled, there may be additional exposure to
1400the server and to client displays if the
Damien Miller5b0d63f2006-03-15 11:56:56 +11001401.Xr sshd 8
Damien Miller101c4a72002-09-19 11:51:21 +10001402proxy display is configured to listen on the wildcard address (see
1403.Cm X11UseLocalhost
Damien Miller5b0d63f2006-03-15 11:56:56 +11001404below), though this is not the default.
Damien Miller101c4a72002-09-19 11:51:21 +10001405Additionally, the authentication spoofing and authentication data
1406verification and substitution occur on the client side.
1407The security risk of using X11 forwarding is that the client's X11
Damien Miller5b0d63f2006-03-15 11:56:56 +11001408display server may be exposed to attack when the SSH client requests
Damien Miller101c4a72002-09-19 11:51:21 +10001409forwarding (see the warnings for
1410.Cm ForwardX11
1411in
Damien Millerf1ce5052003-06-11 22:04:39 +10001412.Xr ssh_config 5 ) .
Damien Miller101c4a72002-09-19 11:51:21 +10001413A system administrator may have a stance in which they want to
1414protect clients that may expose themselves to attack by unwittingly
1415requesting X11 forwarding, which can warrant a
1416.Dq no
1417setting.
1418.Pp
1419Note that disabling X11 forwarding does not prevent users from
1420forwarding X11 traffic, as users can always install their own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001421X11 forwarding is automatically disabled if
1422.Cm UseLogin
1423is enabled.
1424.It Cm X11UseLocalhost
1425Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001426.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001427should bind the X11 forwarding server to the loopback address or to
Damien Miller495dca32003-04-01 21:42:14 +10001428the wildcard address.
1429By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +11001430sshd binds the forwarding server to the loopback address and sets the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001431hostname part of the
1432.Ev DISPLAY
1433environment variable to
1434.Dq localhost .
Ben Lindstrom15b61202002-08-20 18:44:24 +00001435This prevents remote hosts from connecting to the proxy display.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001436However, some older X11 clients may not function with this
1437configuration.
1438.Cm X11UseLocalhost
1439may be set to
1440.Dq no
1441to specify that the forwarding server should be bound to the wildcard
1442address.
1443The argument must be
1444.Dq yes
1445or
1446.Dq no .
1447The default is
1448.Dq yes .
1449.It Cm XAuthLocation
Damien Miller05913ba2002-09-04 16:51:03 +10001450Specifies the full pathname of the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001451.Xr xauth 1
1452program.
1453The default is
1454.Pa /usr/X11R6/bin/xauth .
1455.El
Damien Millere3beba22006-03-15 11:59:25 +11001456.Sh TIME FORMATS
Damien Millerf4f22b52006-03-15 11:57:25 +11001457.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001458command-line arguments and configuration file options that specify time
1459may be expressed using a sequence of the form:
1460.Sm off
Ben Lindstrom1f8cf4f2002-08-20 18:43:27 +00001461.Ar time Op Ar qualifier ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001462.Sm on
1463where
1464.Ar time
1465is a positive integer value and
1466.Ar qualifier
1467is one of the following:
1468.Pp
1469.Bl -tag -width Ds -compact -offset indent
Damien Miller393821a2006-07-24 14:04:53 +10001470.It Aq Cm none
Ben Lindstrom9f049032002-06-21 00:59:05 +00001471seconds
1472.It Cm s | Cm S
1473seconds
1474.It Cm m | Cm M
1475minutes
1476.It Cm h | Cm H
1477hours
1478.It Cm d | Cm D
1479days
1480.It Cm w | Cm W
1481weeks
1482.El
1483.Pp
1484Each member of the sequence is added together to calculate
1485the total time value.
1486.Pp
1487Time format examples:
1488.Pp
1489.Bl -tag -width Ds -compact -offset indent
1490.It 600
1491600 seconds (10 minutes)
1492.It 10m
149310 minutes
1494.It 1h30m
14951 hour 30 minutes (90 minutes)
1496.El
1497.Sh FILES
1498.Bl -tag -width Ds
1499.It Pa /etc/ssh/sshd_config
1500Contains configuration data for
Damien Millerf4f22b52006-03-15 11:57:25 +11001501.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001502This file should be writable by root only, but it is recommended
1503(though not necessary) that it be world-readable.
1504.El
Damien Millerf1ce5052003-06-11 22:04:39 +10001505.Sh SEE ALSO
1506.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001507.Sh AUTHORS
1508OpenSSH is a derivative of the original and free
1509ssh 1.2.12 release by Tatu Ylonen.
1510Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1511Theo de Raadt and Dug Song
1512removed many bugs, re-added newer features and
1513created OpenSSH.
1514Markus Friedl contributed the support for SSH
1515protocol versions 1.5 and 2.0.
1516Niels Provos and Markus Friedl contributed support
1517for privilege separation.