blob: ef36d33388f4cebd9d8ef6d1eb4967fd6e3d6156 [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.orgc7219f42014-12-12 00:02:17 +000036.\" $OpenBSD: sshd_config.5,v 1.182 2014/12/12 00:02:17 djm Exp $
37.Dd $Mdocdate: December 12 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.
Damien Millere2754432006-07-24 14:06:47 +1000488.It Cm ForceCommand
489Forces the execution of the command specified by
490.Cm ForceCommand ,
Damien Millera1b48cc2008-03-27 11:02:02 +1100491ignoring any command supplied by the client and
492.Pa ~/.ssh/rc
493if present.
Damien Millere2754432006-07-24 14:06:47 +1000494The command is invoked by using the user's login shell with the -c option.
495This applies to shell, command, or subsystem execution.
496It is most useful inside a
497.Cm Match
498block.
499The command originally supplied by the client is available in the
500.Ev SSH_ORIGINAL_COMMAND
501environment variable.
Damien Millercdb6e652008-02-10 22:47:24 +1100502Specifying a command of
503.Dq internal-sftp
504will force the use of an in-process sftp server that requires no support
505files when used with
506.Cm ChrootDirectory .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000507.It Cm GatewayPorts
508Specifies whether remote hosts are allowed to connect to ports
509forwarded for the client.
510By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100511.Xr sshd 8
Damien Miller495dca32003-04-01 21:42:14 +1000512binds remote port forwardings to the loopback address.
513This prevents other remote hosts from connecting to forwarded ports.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000514.Cm GatewayPorts
Damien Miller5b0d63f2006-03-15 11:56:56 +1100515can be used to specify that sshd
Damien Millerf91ee4c2005-03-01 21:24:33 +1100516should allow remote port forwardings to bind to non-loopback addresses, thus
517allowing other hosts to connect.
518The argument may be
519.Dq no
520to force remote port forwardings to be available to the local host only,
Ben Lindstrom9f049032002-06-21 00:59:05 +0000521.Dq yes
Damien Millerf91ee4c2005-03-01 21:24:33 +1100522to force remote port forwardings to bind to the wildcard address, or
523.Dq clientspecified
524to allow the client to select the address to which the forwarding is bound.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000525The default is
526.Dq no .
Darren Tucker0efd1552003-08-26 11:49:55 +1000527.It Cm GSSAPIAuthentication
Damien Miller9b7b03b2003-09-02 22:57:05 +1000528Specifies whether user authentication based on GSSAPI is allowed.
Damien Millera8e06ce2003-11-21 23:48:55 +1100529The default is
Darren Tucker0efd1552003-08-26 11:49:55 +1000530.Dq no .
531Note that this option applies to protocol version 2 only.
532.It Cm GSSAPICleanupCredentials
533Specifies whether to automatically destroy the user's credentials cache
534on logout.
535The default is
536.Dq yes .
537Note that this option applies to protocol version 2 only.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000538.It Cm HostbasedAuthentication
539Specifies whether rhosts or /etc/hosts.equiv authentication together
540with successful public key client host authentication is allowed
Damien Miller1faa7132006-03-15 11:55:31 +1100541(host-based authentication).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000542This option is similar to
543.Cm RhostsRSAAuthentication
544and applies to protocol version 2 only.
545The default is
546.Dq no .
Damien Millerb594f382006-08-30 11:06:34 +1000547.It Cm HostbasedUsesNameFromPacketOnly
548Specifies whether or not the server will attempt to perform a reverse
549name lookup when matching the name in the
550.Pa ~/.shosts ,
551.Pa ~/.rhosts ,
552and
553.Pa /etc/hosts.equiv
554files during
555.Cm HostbasedAuthentication .
556A setting of
557.Dq yes
558means that
559.Xr sshd 8
560uses the name supplied by the client rather than
561attempting to resolve the name from the TCP connection itself.
562The default is
563.Dq no .
Damien Miller0a80ca12010-02-27 07:55:05 +1100564.It Cm HostCertificate
565Specifies a file containing a public host certificate.
566The certificate's public key must match a private host key already specified
567by
568.Cm HostKey .
569The default behaviour of
570.Xr sshd 8
571is not to load any certificates.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000572.It Cm HostKey
573Specifies a file containing a private host key
574used by SSH.
575The default is
576.Pa /etc/ssh/ssh_host_key
577for protocol version 1, and
Damien Millereb8b60e2010-08-31 22:41:14 +1000578.Pa /etc/ssh/ssh_host_dsa_key ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100579.Pa /etc/ssh/ssh_host_ecdsa_key ,
580.Pa /etc/ssh/ssh_host_ed25519_key
Ben Lindstrom9f049032002-06-21 00:59:05 +0000581and
Damien Millereb8b60e2010-08-31 22:41:14 +1000582.Pa /etc/ssh/ssh_host_rsa_key
Ben Lindstrom9f049032002-06-21 00:59:05 +0000583for protocol version 2.
584Note that
Damien Miller5b0d63f2006-03-15 11:56:56 +1100585.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000586will refuse to use a file if it is group/world-accessible.
587It is possible to have multiple host key files.
588.Dq rsa1
589keys are used for version 1 and
Damien Millereb8b60e2010-08-31 22:41:14 +1000590.Dq dsa ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100591.Dq ecdsa ,
592.Dq ed25519
Ben Lindstrom9f049032002-06-21 00:59:05 +0000593or
594.Dq rsa
595are used for version 2 of the SSH protocol.
Damien Miller85b45e02013-07-20 13:21:52 +1000596It is also possible to specify public host key files instead.
597In this case operations on the private key will be delegated
598to an
599.Xr ssh-agent 1 .
600.It Cm HostKeyAgent
601Identifies the UNIX-domain socket used to communicate
602with an agent that has access to the private host keys.
603If
604.Dq SSH_AUTH_SOCK
605is specified, the location of the socket will be read from the
606.Ev SSH_AUTH_SOCK
607environment variable.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000608.It Cm IgnoreRhosts
609Specifies that
610.Pa .rhosts
611and
612.Pa .shosts
613files will not be used in
Ben Lindstrom9f049032002-06-21 00:59:05 +0000614.Cm RhostsRSAAuthentication
615or
616.Cm HostbasedAuthentication .
617.Pp
618.Pa /etc/hosts.equiv
619and
620.Pa /etc/shosts.equiv
621are still used.
622The default is
623.Dq yes .
624.It Cm IgnoreUserKnownHosts
625Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +1100626.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000627should ignore the user's
Damien Miller167ea5d2005-05-26 12:04:02 +1000628.Pa ~/.ssh/known_hosts
Ben Lindstrom9f049032002-06-21 00:59:05 +0000629during
630.Cm RhostsRSAAuthentication
631or
632.Cm HostbasedAuthentication .
633The default is
634.Dq no .
Damien Miller0dac6fb2010-11-20 15:19:38 +1100635.It Cm IPQoS
636Specifies the IPv4 type-of-service or DSCP class for the connection.
637Accepted values are
638.Dq af11 ,
639.Dq af12 ,
640.Dq af13 ,
Damien Millerf6e758c2011-09-22 21:37:13 +1000641.Dq af21 ,
Damien Miller0dac6fb2010-11-20 15:19:38 +1100642.Dq af22 ,
643.Dq af23 ,
644.Dq af31 ,
645.Dq af32 ,
646.Dq af33 ,
647.Dq af41 ,
648.Dq af42 ,
649.Dq af43 ,
650.Dq cs0 ,
651.Dq cs1 ,
652.Dq cs2 ,
653.Dq cs3 ,
654.Dq cs4 ,
655.Dq cs5 ,
656.Dq cs6 ,
657.Dq cs7 ,
658.Dq ef ,
659.Dq lowdelay ,
660.Dq throughput ,
661.Dq reliability ,
662or a numeric value.
Damien Miller928362d2010-12-26 14:26:45 +1100663This option may take one or two arguments, separated by whitespace.
Damien Miller0dac6fb2010-11-20 15:19:38 +1100664If one argument is specified, it is used as the packet class unconditionally.
665If two values are specified, the first is automatically selected for
666interactive sessions and the second for non-interactive sessions.
667The default is
668.Dq lowdelay
669for interactive sessions and
670.Dq throughput
671for non-interactive sessions.
Damien Millere1e480a2014-02-04 11:13:17 +1100672.It Cm KbdInteractiveAuthentication
673Specifies whether to allow keyboard-interactive authentication.
674The argument to this keyword must be
675.Dq yes
676or
677.Dq no .
678The default is to use whatever value
679.Cm ChallengeResponseAuthentication
680is set to
681(by default
682.Dq yes ) .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000683.It Cm KerberosAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000684Specifies whether the password provided by the user for
Ben Lindstrom9f049032002-06-21 00:59:05 +0000685.Cm PasswordAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000686will be validated through the Kerberos KDC.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000687To use this option, the server needs a
688Kerberos servtab which allows the verification of the KDC's identity.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100689The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000690.Dq no .
Damien Miller8448e662004-03-08 23:13:15 +1100691.It Cm KerberosGetAFSToken
Darren Tuckere2dd2d52005-10-03 18:19:06 +1000692If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
Damien Miller8448e662004-03-08 23:13:15 +1100693an AFS token before accessing the user's home directory.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100694The default is
Damien Miller8448e662004-03-08 23:13:15 +1100695.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000696.It Cm KerberosOrLocalPasswd
Damien Miller5b0d63f2006-03-15 11:56:56 +1100697If password authentication through Kerberos fails then
Ben Lindstrom9f049032002-06-21 00:59:05 +0000698the password will be validated via any additional local mechanism
699such as
700.Pa /etc/passwd .
Damien Miller5b0d63f2006-03-15 11:56:56 +1100701The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000702.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000703.It Cm KerberosTicketCleanup
704Specifies whether to automatically destroy the user's ticket cache
705file on logout.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100706The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000707.Dq yes .
Damien Millerd5f62bf2010-09-24 22:11:14 +1000708.It Cm KexAlgorithms
709Specifies the available KEX (Key Exchange) algorithms.
710Multiple algorithms must be comma-separated.
Damien Millerc1621c82014-04-20 13:22:46 +1000711The supported algorithms are:
712.Pp
713.Bl -item -compact -offset indent
714.It
715curve25519-sha256@libssh.org
716.It
717diffie-hellman-group1-sha1
718.It
719diffie-hellman-group14-sha1
720.It
721diffie-hellman-group-exchange-sha1
722.It
723diffie-hellman-group-exchange-sha256
724.It
725ecdh-sha2-nistp256
726.It
727ecdh-sha2-nistp384
728.It
729ecdh-sha2-nistp521
730.El
731.Pp
732The default is:
Damien Miller6575c3a2013-12-18 17:47:02 +1100733.Bd -literal -offset indent
734curve25519-sha256@libssh.org,
735ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
736diffie-hellman-group-exchange-sha256,
Damien Millerc1621c82014-04-20 13:22:46 +1000737diffie-hellman-group14-sha1
Damien Miller6575c3a2013-12-18 17:47:02 +1100738.Ed
Ben Lindstrom9f049032002-06-21 00:59:05 +0000739.It Cm KeyRegenerationInterval
740In protocol version 1, the ephemeral server key is automatically regenerated
741after this many seconds (if it has been used).
742The purpose of regeneration is to prevent
743decrypting captured sessions by later breaking into the machine and
744stealing the keys.
745The key is never stored anywhere.
746If the value is 0, the key is never regenerated.
747The default is 3600 (seconds).
748.It Cm ListenAddress
749Specifies the local addresses
Damien Miller5b0d63f2006-03-15 11:56:56 +1100750.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000751should listen on.
752The following forms may be used:
753.Pp
754.Bl -item -offset indent -compact
755.It
756.Cm ListenAddress
757.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000758.Ar host | Ar IPv4_addr | Ar IPv6_addr
Ben Lindstrom9f049032002-06-21 00:59:05 +0000759.Sm on
760.It
761.Cm ListenAddress
762.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000763.Ar host | Ar IPv4_addr : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000764.Sm on
765.It
766.Cm ListenAddress
767.Sm off
768.Oo
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000769.Ar host | Ar IPv6_addr Oc : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000770.Sm on
771.El
772.Pp
773If
774.Ar port
775is not specified,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100776sshd will listen on the address and all prior
Ben Lindstrom9f049032002-06-21 00:59:05 +0000777.Cm Port
Damien Millerfbf486b2003-05-23 18:44:23 +1000778options specified.
779The default is to listen on all local addresses.
Damien Miller495dca32003-04-01 21:42:14 +1000780Multiple
Ben Lindstrom9f049032002-06-21 00:59:05 +0000781.Cm ListenAddress
Damien Millerfbf486b2003-05-23 18:44:23 +1000782options are permitted.
783Additionally, any
Ben Lindstrom9f049032002-06-21 00:59:05 +0000784.Cm Port
Damien Miller5b0d63f2006-03-15 11:56:56 +1100785options must precede this option for non-port qualified addresses.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000786.It Cm LoginGraceTime
787The server disconnects after this time if the user has not
788successfully logged in.
789If the value is 0, there is no time limit.
Damien Millerc1348632002-09-05 14:35:14 +1000790The default is 120 seconds.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000791.It Cm LogLevel
792Gives the verbosity level that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +1100793.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000794The possible values are:
Damien Miller5b0d63f2006-03-15 11:56:56 +1100795QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
Damien Miller495dca32003-04-01 21:42:14 +1000796The default is INFO.
797DEBUG and DEBUG1 are equivalent.
798DEBUG2 and DEBUG3 each specify higher levels of debugging output.
799Logging with a DEBUG level violates the privacy of users and is not recommended.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000800.It Cm MACs
801Specifies the available MAC (message authentication code) algorithms.
802The MAC algorithm is used in protocol version 2
803for data integrity protection.
804Multiple algorithms must be comma-separated.
Damien Milleraf43a7a2012-12-12 10:46:31 +1100805The algorithms that contain
806.Dq -etm
807calculate the MAC after encryption (encrypt-then-mac).
808These are considered safer and their use recommended.
Damien Millerc1621c82014-04-20 13:22:46 +1000809The supported MACs are:
810.Pp
811.Bl -item -compact -offset indent
812.It
813hmac-md5
814.It
815hmac-md5-96
816.It
817hmac-ripemd160
818.It
819hmac-sha1
820.It
821hmac-sha1-96
822.It
823hmac-sha2-256
824.It
825hmac-sha2-512
826.It
827umac-64@openssh.com
828.It
829umac-128@openssh.com
830.It
831hmac-md5-etm@openssh.com
832.It
833hmac-md5-96-etm@openssh.com
834.It
835hmac-ripemd160-etm@openssh.com
836.It
837hmac-sha1-etm@openssh.com
838.It
839hmac-sha1-96-etm@openssh.com
840.It
841hmac-sha2-256-etm@openssh.com
842.It
843hmac-sha2-512-etm@openssh.com
844.It
845umac-64-etm@openssh.com
846.It
847umac-128-etm@openssh.com
848.El
849.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +1100850The default is:
Damien Miller22b7b492007-06-11 14:07:12 +1000851.Bd -literal -offset indent
Damien Milleraf43a7a2012-12-12 10:46:31 +1100852umac-64-etm@openssh.com,umac-128-etm@openssh.com,
853hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +1000854umac-64@openssh.com,umac-128@openssh.com,
855hmac-sha2-256,hmac-sha2-512
Damien Miller22b7b492007-06-11 14:07:12 +1000856.Ed
Darren Tucker45150472006-07-12 22:34:17 +1000857.It Cm Match
Damien Millerd04f3572006-07-24 13:46:50 +1000858Introduces a conditional block.
Damien Miller8c234032006-07-24 14:05:08 +1000859If all of the criteria on the
Darren Tucker45150472006-07-12 22:34:17 +1000860.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +1000861line are satisfied, the keywords on the following lines override those
862set in the global section of the config file, until either another
Darren Tucker45150472006-07-12 22:34:17 +1000863.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +1000864line or the end of the file.
Damien Millerfc5d6752014-02-28 10:01:28 +1100865If a keyword appears in multiple
866.Cm Match
sobrado@openbsd.org180bcb42014-08-30 16:32:25 +0000867blocks that are satisfied, only the first instance of the keyword is
Damien Millerfc5d6752014-02-28 10:01:28 +1100868applied.
Darren Tucker7a3935d2008-06-10 22:59:10 +1000869.Pp
Damien Millerd04f3572006-07-24 13:46:50 +1000870The arguments to
Darren Tucker45150472006-07-12 22:34:17 +1000871.Cm Match
Damien Millercf31f382013-10-24 21:02:56 +1100872are one or more criteria-pattern pairs or the single token
873.Cm All
874which matches all criteria.
Darren Tucker45150472006-07-12 22:34:17 +1000875The available criteria are
876.Cm User ,
Damien Miller565ca3f2006-08-19 00:23:15 +1000877.Cm Group ,
Darren Tucker45150472006-07-12 22:34:17 +1000878.Cm Host ,
Darren Tuckerfbcf8272012-05-19 19:37:01 +1000879.Cm LocalAddress ,
880.Cm LocalPort ,
Darren Tucker45150472006-07-12 22:34:17 +1000881and
882.Cm Address .
Darren Tucker7a3935d2008-06-10 22:59:10 +1000883The match patterns may consist of single entries or comma-separated
884lists and may use the wildcard and negation operators described in the
Damien Millerfecfd112013-07-18 16:11:50 +1000885PATTERNS section of
Darren Tuckerb06cc4a2008-06-10 22:59:53 +1000886.Xr ssh_config 5 .
Darren Tucker7a3935d2008-06-10 22:59:10 +1000887.Pp
888The patterns in an
889.Cm Address
890criteria may additionally contain addresses to match in CIDR
Darren Tucker6a2a4002008-06-10 23:03:04 +1000891address/masklen format, e.g.\&
Darren Tucker7a3935d2008-06-10 22:59:10 +1000892.Dq 192.0.2.0/24
893or
894.Dq 3ffe:ffff::/32 .
895Note that the mask length provided must be consistent with the address -
896it is an error to specify a mask length that is too long for the address
Darren Tucker6a2a4002008-06-10 23:03:04 +1000897or one with bits set in this host portion of the address.
898For example,
Darren Tucker7a3935d2008-06-10 22:59:10 +1000899.Dq 192.0.2.0/33
900and
Darren Tucker6a2a4002008-06-10 23:03:04 +1000901.Dq 192.0.2.0/8
Darren Tucker7a3935d2008-06-10 22:59:10 +1000902respectively.
903.Pp
Darren Tucker45150472006-07-12 22:34:17 +1000904Only a subset of keywords may be used on the lines following a
905.Cm Match
906keyword.
907Available keywords are
Damien Millerf8268502012-06-20 21:54:15 +1000908.Cm AcceptEnv ,
Damien Miller17819012009-01-28 16:20:17 +1100909.Cm AllowAgentForwarding ,
Damien Millerf8268502012-06-20 21:54:15 +1000910.Cm AllowGroups ,
Damien Miller9b439df2006-07-24 14:04:00 +1000911.Cm AllowTcpForwarding ,
Damien Millerc24da772012-06-20 21:53:58 +1000912.Cm AllowUsers ,
Damien Millera6e3f012012-11-04 23:21:40 +1100913.Cm AuthenticationMethods ,
Damien Miller09d3e122012-10-31 08:58:58 +1100914.Cm AuthorizedKeysCommand ,
915.Cm AuthorizedKeysCommandUser ,
Damien Millerf33580e2012-11-04 22:22:52 +1100916.Cm AuthorizedKeysFile ,
Damien Millerab6de352010-06-26 09:38:45 +1000917.Cm AuthorizedPrincipalsFile ,
Darren Tucker1629c072007-02-19 22:25:37 +1100918.Cm Banner ,
Damien Miller797e3d12008-05-19 14:27:42 +1000919.Cm ChrootDirectory ,
Damien Millerc24da772012-06-20 21:53:58 +1000920.Cm DenyGroups ,
921.Cm DenyUsers ,
Damien Millere2754432006-07-24 14:06:47 +1000922.Cm ForceCommand ,
Damien Millerc24da772012-06-20 21:53:58 +1000923.Cm GatewayPorts ,
Damien Millerf8268502012-06-20 21:54:15 +1000924.Cm GSSAPIAuthentication ,
Damien Miller25434de2008-05-19 14:29:08 +1000925.Cm HostbasedAuthentication ,
Damien Millerab6de352010-06-26 09:38:45 +1000926.Cm HostbasedUsesNameFromPacketOnly ,
Darren Tucker1d75f222007-03-01 21:31:28 +1100927.Cm KbdInteractiveAuthentication ,
Damien Miller5737e362007-03-06 21:21:18 +1100928.Cm KerberosAuthentication ,
Damien Miller307c1d12008-06-16 07:56:20 +1000929.Cm MaxAuthTries ,
Damien Millerc62a5af2008-06-16 07:55:46 +1000930.Cm MaxSessions ,
Darren Tucker1629c072007-02-19 22:25:37 +1100931.Cm PasswordAuthentication ,
Damien Miller51bde602008-11-03 19:23:10 +1100932.Cm PermitEmptyPasswords ,
Damien Millerd1de9952006-07-24 14:05:48 +1000933.Cm PermitOpen ,
Darren Tucker15f94272008-01-01 20:36:56 +1100934.Cm PermitRootLogin ,
Damien Miller5ff30c62013-10-30 22:21:50 +1100935.Cm PermitTTY ,
Damien Millerab6de352010-06-26 09:38:45 +1000936.Cm PermitTunnel ,
Damien Miller72e6b5c2014-07-04 09:00:04 +1000937.Cm PermitUserRC ,
Darren Tucker1477ea12009-10-07 08:36:05 +1100938.Cm PubkeyAuthentication ,
Darren Tucker5f96f3b2013-05-16 20:29:28 +1000939.Cm RekeyLimit ,
Damien Millerc24da772012-06-20 21:53:58 +1000940.Cm RhostsRSAAuthentication ,
Damien Millerf8268502012-06-20 21:54:15 +1000941.Cm RSAAuthentication ,
Damien Millerd1de9952006-07-24 14:05:48 +1000942.Cm X11DisplayOffset ,
Damien Miller19913842009-02-23 10:53:58 +1100943.Cm X11Forwarding
Darren Tucker45150472006-07-12 22:34:17 +1000944and
Damien Miller0296ae82009-02-23 11:00:24 +1100945.Cm X11UseLocalHost .
Darren Tucker89413db2004-05-24 10:36:23 +1000946.It Cm MaxAuthTries
947Specifies the maximum number of authentication attempts permitted per
Damien Miller26213e52004-06-30 22:39:34 +1000948connection.
949Once the number of failures reaches half this value,
950additional failures are logged.
951The default is 6.
Damien Miller7207f642008-05-19 15:34:50 +1000952.It Cm MaxSessions
953Specifies the maximum number of open sessions permitted per network connection.
954The default is 10.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000955.It Cm MaxStartups
956Specifies the maximum number of concurrent unauthenticated connections to the
Damien Miller5b0d63f2006-03-15 11:56:56 +1100957SSH daemon.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000958Additional connections will be dropped until authentication succeeds or the
959.Cm LoginGraceTime
960expires for a connection.
Damien Miller1f583df2013-02-12 11:02:08 +1100961The default is 10:30:100.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000962.Pp
963Alternatively, random early drop can be enabled by specifying
964the three colon separated values
965.Dq start:rate:full
Damien Miller208f1ed2006-03-15 11:56:03 +1100966(e.g. "10:30:60").
Damien Millerf4f22b52006-03-15 11:57:25 +1100967.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000968will refuse connection attempts with a probability of
969.Dq rate/100
970(30%)
971if there are currently
972.Dq start
973(10)
974unauthenticated connections.
975The probability increases linearly and all connection attempts
976are refused if the number of unauthenticated connections reaches
977.Dq full
978(60).
979.It Cm PasswordAuthentication
980Specifies whether password authentication is allowed.
981The default is
982.Dq yes .
983.It Cm PermitEmptyPasswords
984When password authentication is allowed, it specifies whether the
985server allows login to accounts with empty password strings.
986The default is
987.Dq no .
Damien Miller9b439df2006-07-24 14:04:00 +1000988.It Cm PermitOpen
989Specifies the destinations to which TCP port forwarding is permitted.
990The forwarding specification must be one of the following forms:
991.Pp
992.Bl -item -offset indent -compact
993.It
994.Cm PermitOpen
995.Sm off
996.Ar host : port
997.Sm on
998.It
999.Cm PermitOpen
1000.Sm off
1001.Ar IPv4_addr : port
1002.Sm on
1003.It
1004.Cm PermitOpen
1005.Sm off
1006.Ar \&[ IPv6_addr \&] : port
1007.Sm on
1008.El
1009.Pp
Damien Millera765cf42006-07-24 14:08:13 +10001010Multiple forwards may be specified by separating them with whitespace.
Damien Miller9b439df2006-07-24 14:04:00 +10001011An argument of
1012.Dq any
1013can be used to remove all restrictions and permit any forwarding requests.
Darren Tuckerba9ea322012-05-19 19:37:33 +10001014An argument of
1015.Dq none
1016can be used to prohibit all forwarding requests.
Damien Miller65bc2c42006-07-24 14:04:16 +10001017By default all port forwarding requests are permitted.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001018.It Cm PermitRootLogin
Darren Tuckerb3509012005-01-20 11:01:46 +11001019Specifies whether root can log in using
Ben Lindstrom9f049032002-06-21 00:59:05 +00001020.Xr ssh 1 .
1021The argument must be
1022.Dq yes ,
1023.Dq without-password ,
Damien Miller5b0d63f2006-03-15 11:56:56 +11001024.Dq forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001025or
1026.Dq no .
1027The default is
1028.Dq yes .
1029.Pp
1030If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001031.Dq without-password ,
Darren Tucker9dca0992005-02-01 19:16:45 +11001032password authentication is disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001033.Pp
1034If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001035.Dq forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001036root login with public key authentication will be allowed,
1037but only if the
1038.Ar command
1039option has been specified
1040(which may be useful for taking remote backups even if root login is
Damien Millerfbf486b2003-05-23 18:44:23 +10001041normally not allowed).
1042All other authentication methods are disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001043.Pp
1044If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001045.Dq no ,
Darren Tuckerb3509012005-01-20 11:01:46 +11001046root is not allowed to log in.
Damien Millerd27b9472005-12-13 19:29:02 +11001047.It Cm PermitTunnel
1048Specifies whether
1049.Xr tun 4
1050device forwarding is allowed.
Damien Miller7b58e802005-12-13 19:33:19 +11001051The argument must be
1052.Dq yes ,
Damien Miller991dba42006-07-10 20:16:27 +10001053.Dq point-to-point
1054(layer 3),
1055.Dq ethernet
1056(layer 2), or
Damien Miller7b58e802005-12-13 19:33:19 +11001057.Dq no .
Damien Miller991dba42006-07-10 20:16:27 +10001058Specifying
1059.Dq yes
1060permits both
1061.Dq point-to-point
1062and
1063.Dq ethernet .
Damien Millerd27b9472005-12-13 19:29:02 +11001064The default is
1065.Dq no .
djm@openbsd.org48dffd52014-09-09 09:45:36 +00001066.Pp
1067Independent of this setting, the permissions of the selected
1068.Xr tun 4
1069device must allow access to the user.
Damien Miller5ff30c62013-10-30 22:21:50 +11001070.It Cm PermitTTY
1071Specifies whether
Damien Miller63857c92013-10-30 22:31:06 +11001072.Xr pty 4
Damien Miller5ff30c62013-10-30 22:21:50 +11001073allocation is permitted.
1074The default is
1075.Dq yes .
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001076.It Cm PermitUserEnvironment
1077Specifies whether
1078.Pa ~/.ssh/environment
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001079and
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001080.Cm environment=
1081options in
1082.Pa ~/.ssh/authorized_keys
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001083are processed by
Damien Miller5b0d63f2006-03-15 11:56:56 +11001084.Xr sshd 8 .
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001085The default is
1086.Dq no .
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001087Enabling environment processing may enable users to bypass access
1088restrictions in some configurations using mechanisms such as
1089.Ev LD_PRELOAD .
Damien Miller72e6b5c2014-07-04 09:00:04 +10001090.It Cm PermitUserRC
1091Specifies whether any
1092.Pa ~/.ssh/rc
1093file is executed.
1094The default is
1095.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001096.It Cm PidFile
Ben Lindstrom959de992002-06-23 00:35:25 +00001097Specifies the file that contains the process ID of the
Damien Millerf4f22b52006-03-15 11:57:25 +11001098SSH daemon.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001099The default is
1100.Pa /var/run/sshd.pid .
1101.It Cm Port
1102Specifies the port number that
Damien Miller5b0d63f2006-03-15 11:56:56 +11001103.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001104listens on.
1105The default is 22.
1106Multiple options of this type are permitted.
1107See also
1108.Cm ListenAddress .
1109.It Cm PrintLastLog
1110Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001111.Xr sshd 8
Darren Tucker7cc5c232004-11-05 20:06:59 +11001112should print the date and time of the last user login when a user logs
1113in interactively.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001114The default is
1115.Dq yes .
1116.It Cm PrintMotd
1117Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001118.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001119should print
1120.Pa /etc/motd
1121when a user logs in interactively.
1122(On some systems it is also printed by the shell,
1123.Pa /etc/profile ,
1124or equivalent.)
1125The default is
1126.Dq yes .
1127.It Cm Protocol
1128Specifies the protocol versions
Damien Miller5b0d63f2006-03-15 11:56:56 +11001129.Xr sshd 8
Ben Lindstrom9c445542002-07-11 03:59:18 +00001130supports.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001131The possible values are
Damien Miller5b0d63f2006-03-15 11:56:56 +11001132.Sq 1
Ben Lindstrom9f049032002-06-21 00:59:05 +00001133and
Damien Miller5b0d63f2006-03-15 11:56:56 +11001134.Sq 2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001135Multiple versions must be comma-separated.
1136The default is
Darren Tucker7a4a7652009-10-11 21:51:40 +11001137.Sq 2 .
Ben Lindstrom9c445542002-07-11 03:59:18 +00001138Note that the order of the protocol list does not indicate preference,
1139because the client selects among multiple protocol versions offered
1140by the server.
1141Specifying
1142.Dq 2,1
1143is identical to
1144.Dq 1,2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001145.It Cm PubkeyAuthentication
1146Specifies whether public key authentication is allowed.
1147The default is
1148.Dq yes .
1149Note that this option applies to protocol version 2 only.
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001150.It Cm RekeyLimit
1151Specifies the maximum amount of data that may be transmitted before the
1152session key is renegotiated, optionally followed a maximum amount of
1153time that may pass before the session key is renegotiated.
1154The first argument is specified in bytes and may have a suffix of
1155.Sq K ,
1156.Sq M ,
1157or
1158.Sq G
1159to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1160The default is between
1161.Sq 1G
1162and
1163.Sq 4G ,
1164depending on the cipher.
1165The optional second value is specified in seconds and may use any of the
1166units documented in the
1167.Sx TIME FORMATS
Darren Tucker64d22942013-05-16 20:31:29 +10001168section.
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001169The default value for
1170.Cm RekeyLimit
1171is
1172.Dq default none ,
1173which means that rekeying is performed after the cipher's default amount
1174of data has been sent or received and no time based rekeying is done.
1175This option applies to protocol version 2 only.
Damien Miller1aed65e2010-03-04 21:53:35 +11001176.It Cm RevokedKeys
Damien Millerf3747bf2013-01-18 11:44:04 +11001177Specifies revoked public keys.
Damien Miller1aed65e2010-03-04 21:53:35 +11001178Keys listed in this file will be refused for public key authentication.
1179Note that if this file is not readable, then public key authentication will
1180be refused for all users.
Damien Millerf3747bf2013-01-18 11:44:04 +11001181Keys may be specified as a text file, listing one public key per line, or as
1182an OpenSSH Key Revocation List (KRL) as generated by
Damien Miller72abeb72013-01-20 22:33:44 +11001183.Xr ssh-keygen 1 .
Damien Millerfecfd112013-07-18 16:11:50 +10001184For more information on KRLs, see the KEY REVOCATION LISTS section in
Damien Millerf3747bf2013-01-18 11:44:04 +11001185.Xr ssh-keygen 1 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001186.It Cm RhostsRSAAuthentication
1187Specifies whether rhosts or /etc/hosts.equiv authentication together
1188with successful RSA host authentication is allowed.
1189The default is
1190.Dq no .
1191This option applies to protocol version 1 only.
1192.It Cm RSAAuthentication
1193Specifies whether pure RSA authentication is allowed.
1194The default is
1195.Dq yes .
1196This option applies to protocol version 1 only.
1197.It Cm ServerKeyBits
1198Defines the number of bits in the ephemeral protocol version 1 server key.
Darren Tucker7499b0c2008-07-02 22:35:43 +10001199The minimum value is 512, and the default is 1024.
Damien Miller7acefbb2014-07-18 14:11:24 +10001200.It Cm StreamLocalBindMask
1201Sets the octal file creation mode mask
1202.Pq umask
1203used when creating a Unix-domain socket file for local or remote
1204port forwarding.
1205This option is only used for port forwarding to a Unix-domain socket file.
1206.Pp
1207The default value is 0177, which creates a Unix-domain socket file that is
1208readable and writable only by the owner.
1209Note that not all operating systems honor the file mode on Unix-domain
1210socket files.
1211.It Cm StreamLocalBindUnlink
1212Specifies whether to remove an existing Unix-domain socket file for local
1213or remote port forwarding before creating a new one.
1214If the socket file already exists and
1215.Cm StreamLocalBindUnlink
1216is not enabled,
1217.Nm sshd
1218will be unable to forward the port to the Unix-domain socket file.
1219This option is only used for port forwarding to a Unix-domain socket file.
1220.Pp
1221The argument must be
1222.Dq yes
1223or
1224.Dq no .
1225The default is
1226.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001227.It Cm StrictModes
1228Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001229.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001230should check file modes and ownership of the
1231user's files and home directory before accepting login.
1232This is normally desirable because novices sometimes accidentally leave their
1233directory or files world-writable.
1234The default is
1235.Dq yes .
Darren Tuckerf788a912010-01-08 17:06:47 +11001236Note that this does not apply to
1237.Cm ChrootDirectory ,
1238whose permissions and ownership are checked unconditionally.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001239.It Cm Subsystem
Damien Miller208f1ed2006-03-15 11:56:03 +11001240Configures an external subsystem (e.g. file transfer daemon).
Damien Miller917f9b62006-07-10 20:36:47 +10001241Arguments should be a subsystem name and a command (with optional arguments)
1242to execute upon subsystem request.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001243.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001244The command
1245.Xr sftp-server 8
1246implements the
1247.Dq sftp
1248file transfer subsystem.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001249.Pp
1250Alternately the name
1251.Dq internal-sftp
1252implements an in-process
1253.Dq sftp
1254server.
1255This may simplify configurations using
1256.Cm ChrootDirectory
1257to force a different filesystem root on clients.
1258.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001259By default no subsystems are defined.
1260Note that this option applies to protocol version 2 only.
1261.It Cm SyslogFacility
1262Gives the facility code that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +11001263.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001264The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1265LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1266The default is AUTH.
Damien Miller12c150e2003-12-17 16:31:10 +11001267.It Cm TCPKeepAlive
1268Specifies whether the system should send TCP keepalive messages to the
1269other side.
1270If they are sent, death of the connection or crash of one
1271of the machines will be properly noticed.
1272However, this means that
1273connections will die if the route is down temporarily, and some people
1274find it annoying.
1275On the other hand, if TCP keepalives are not sent,
1276sessions may hang indefinitely on the server, leaving
1277.Dq ghost
1278users and consuming server resources.
1279.Pp
1280The default is
1281.Dq yes
1282(to send TCP keepalive messages), and the server will notice
1283if the network goes down or the client host crashes.
1284This avoids infinitely hanging sessions.
1285.Pp
1286To disable TCP keepalive messages, the value should be set to
1287.Dq no .
Damien Miller1aed65e2010-03-04 21:53:35 +11001288.It Cm TrustedUserCAKeys
1289Specifies a file containing public keys of certificate authorities that are
Damien Millerc6db99e2010-03-05 10:41:45 +11001290trusted to sign user certificates for authentication.
Damien Miller72b33822010-03-05 07:39:01 +11001291Keys are listed one per line; empty lines and comments starting with
Damien Miller1aed65e2010-03-04 21:53:35 +11001292.Ql #
1293are allowed.
1294If a certificate is presented for authentication and has its signing CA key
1295listed in this file, then it may be used for authentication for any user
1296listed in the certificate's principals list.
1297Note that certificates that lack a list of principals will not be permitted
1298for authentication using
1299.Cm TrustedUserCAKeys .
Damien Millerfecfd112013-07-18 16:11:50 +10001300For more details on certificates, see the CERTIFICATES section in
Damien Miller1aed65e2010-03-04 21:53:35 +11001301.Xr ssh-keygen 1 .
Damien Miller3a961dc2003-06-03 10:25:48 +10001302.It Cm UseDNS
1303Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001304.Xr sshd 8
Darren Tucker83d5a982005-03-31 21:33:50 +10001305should look up the remote host name and check that
Damien Miller3a961dc2003-06-03 10:25:48 +10001306the resolved host name for the remote IP address maps back to the
1307very same IP address.
1308The default is
1309.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001310.It Cm UseLogin
1311Specifies whether
1312.Xr login 1
1313is used for interactive login sessions.
1314The default is
1315.Dq no .
1316Note that
1317.Xr login 1
1318is never used for remote command execution.
1319Note also, that if this is enabled,
1320.Cm X11Forwarding
1321will be disabled because
1322.Xr login 1
1323does not know how to handle
1324.Xr xauth 1
Damien Miller495dca32003-04-01 21:42:14 +10001325cookies.
1326If
Ben Lindstrom9f049032002-06-21 00:59:05 +00001327.Cm UsePrivilegeSeparation
1328is specified, it will be disabled after authentication.
Damien Miller2e193e22003-05-14 15:13:03 +10001329.It Cm UsePAM
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001330Enables the Pluggable Authentication Module interface.
1331If set to
1332.Dq yes
1333this will enable PAM authentication using
1334.Cm ChallengeResponseAuthentication
Darren Tuckera4904f72006-02-23 21:35:30 +11001335and
1336.Cm PasswordAuthentication
1337in addition to PAM account and session module processing for all
1338authentication types.
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001339.Pp
1340Because PAM challenge-response authentication usually serves an equivalent
1341role to password authentication, you should disable either
1342.Cm PasswordAuthentication
1343or
1344.Cm ChallengeResponseAuthentication.
1345.Pp
1346If
1347.Cm UsePAM
1348is enabled, you will not be able to run
1349.Xr sshd 8
1350as a non-root user.
1351The default is
Darren Tucker6c0c0702003-10-09 14:13:53 +10001352.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001353.It Cm UsePrivilegeSeparation
1354Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001355.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001356separates privileges by creating an unprivileged child process
Damien Miller495dca32003-04-01 21:42:14 +10001357to deal with incoming network traffic.
1358After successful authentication, another process will be created that has
1359the privilege of the authenticated user.
1360The goal of privilege separation is to prevent privilege
Ben Lindstrom9f049032002-06-21 00:59:05 +00001361escalation by containing any corruption within the unprivileged processes.
1362The default is
1363.Dq yes .
Damien Miller69ff1df2011-06-23 08:30:03 +10001364If
1365.Cm UsePrivilegeSeparation
1366is set to
1367.Dq sandbox
1368then the pre-authentication unprivileged process is subject to additional
1369restrictions.
Damien Miller23528812012-04-22 11:24:43 +10001370.It Cm VersionAddendum
1371Optionally specifies additional text to append to the SSH protocol banner
1372sent by the server upon connection.
1373The default is
1374.Dq none .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001375.It Cm X11DisplayOffset
1376Specifies the first display number available for
Damien Miller5b0d63f2006-03-15 11:56:56 +11001377.Xr sshd 8 Ns 's
Ben Lindstrom9f049032002-06-21 00:59:05 +00001378X11 forwarding.
Damien Miller5b0d63f2006-03-15 11:56:56 +11001379This prevents sshd from interfering with real X11 servers.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001380The default is 10.
1381.It Cm X11Forwarding
1382Specifies whether X11 forwarding is permitted.
Damien Miller101c4a72002-09-19 11:51:21 +10001383The argument must be
1384.Dq yes
1385or
1386.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001387The default is
1388.Dq no .
Damien Miller101c4a72002-09-19 11:51:21 +10001389.Pp
1390When X11 forwarding is enabled, there may be additional exposure to
1391the server and to client displays if the
Damien Miller5b0d63f2006-03-15 11:56:56 +11001392.Xr sshd 8
Damien Miller101c4a72002-09-19 11:51:21 +10001393proxy display is configured to listen on the wildcard address (see
1394.Cm X11UseLocalhost
Damien Miller5b0d63f2006-03-15 11:56:56 +11001395below), though this is not the default.
Damien Miller101c4a72002-09-19 11:51:21 +10001396Additionally, the authentication spoofing and authentication data
1397verification and substitution occur on the client side.
1398The security risk of using X11 forwarding is that the client's X11
Damien Miller5b0d63f2006-03-15 11:56:56 +11001399display server may be exposed to attack when the SSH client requests
Damien Miller101c4a72002-09-19 11:51:21 +10001400forwarding (see the warnings for
1401.Cm ForwardX11
1402in
Damien Millerf1ce5052003-06-11 22:04:39 +10001403.Xr ssh_config 5 ) .
Damien Miller101c4a72002-09-19 11:51:21 +10001404A system administrator may have a stance in which they want to
1405protect clients that may expose themselves to attack by unwittingly
1406requesting X11 forwarding, which can warrant a
1407.Dq no
1408setting.
1409.Pp
1410Note that disabling X11 forwarding does not prevent users from
1411forwarding X11 traffic, as users can always install their own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001412X11 forwarding is automatically disabled if
1413.Cm UseLogin
1414is enabled.
1415.It Cm X11UseLocalhost
1416Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001417.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001418should bind the X11 forwarding server to the loopback address or to
Damien Miller495dca32003-04-01 21:42:14 +10001419the wildcard address.
1420By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +11001421sshd binds the forwarding server to the loopback address and sets the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001422hostname part of the
1423.Ev DISPLAY
1424environment variable to
1425.Dq localhost .
Ben Lindstrom15b61202002-08-20 18:44:24 +00001426This prevents remote hosts from connecting to the proxy display.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001427However, some older X11 clients may not function with this
1428configuration.
1429.Cm X11UseLocalhost
1430may be set to
1431.Dq no
1432to specify that the forwarding server should be bound to the wildcard
1433address.
1434The argument must be
1435.Dq yes
1436or
1437.Dq no .
1438The default is
1439.Dq yes .
1440.It Cm XAuthLocation
Damien Miller05913ba2002-09-04 16:51:03 +10001441Specifies the full pathname of the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001442.Xr xauth 1
1443program.
1444The default is
1445.Pa /usr/X11R6/bin/xauth .
1446.El
Damien Millere3beba22006-03-15 11:59:25 +11001447.Sh TIME FORMATS
Damien Millerf4f22b52006-03-15 11:57:25 +11001448.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001449command-line arguments and configuration file options that specify time
1450may be expressed using a sequence of the form:
1451.Sm off
Ben Lindstrom1f8cf4f2002-08-20 18:43:27 +00001452.Ar time Op Ar qualifier ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001453.Sm on
1454where
1455.Ar time
1456is a positive integer value and
1457.Ar qualifier
1458is one of the following:
1459.Pp
1460.Bl -tag -width Ds -compact -offset indent
Damien Miller393821a2006-07-24 14:04:53 +10001461.It Aq Cm none
Ben Lindstrom9f049032002-06-21 00:59:05 +00001462seconds
1463.It Cm s | Cm S
1464seconds
1465.It Cm m | Cm M
1466minutes
1467.It Cm h | Cm H
1468hours
1469.It Cm d | Cm D
1470days
1471.It Cm w | Cm W
1472weeks
1473.El
1474.Pp
1475Each member of the sequence is added together to calculate
1476the total time value.
1477.Pp
1478Time format examples:
1479.Pp
1480.Bl -tag -width Ds -compact -offset indent
1481.It 600
1482600 seconds (10 minutes)
1483.It 10m
148410 minutes
1485.It 1h30m
14861 hour 30 minutes (90 minutes)
1487.El
1488.Sh FILES
1489.Bl -tag -width Ds
1490.It Pa /etc/ssh/sshd_config
1491Contains configuration data for
Damien Millerf4f22b52006-03-15 11:57:25 +11001492.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001493This file should be writable by root only, but it is recommended
1494(though not necessary) that it be world-readable.
1495.El
Damien Millerf1ce5052003-06-11 22:04:39 +10001496.Sh SEE ALSO
1497.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001498.Sh AUTHORS
1499OpenSSH is a derivative of the original and free
1500ssh 1.2.12 release by Tatu Ylonen.
1501Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1502Theo de Raadt and Dug Song
1503removed many bugs, re-added newer features and
1504created OpenSSH.
1505Markus Friedl contributed the support for SSH
1506protocol versions 1.5 and 2.0.
1507Niels Provos and Markus Friedl contributed support
1508for privilege separation.