blob: 78a8d00beb7a2d3359dd73641342c3415079ccf8 [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.\"
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +000036.\" $OpenBSD: sshd_config.5,v 1.180 2014/11/22 19:21:03 jmc Exp $
deraadt@openbsd.orga1418a02014-11-22 18:15:41 +000037.Dd $Mdocdate: November 22 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.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000235.It Cm AuthorizedKeysFile
236Specifies the file that contains the public keys that can be used
237for user authentication.
Damien Miller6018a362010-07-02 13:35:19 +1000238The format is described in the
Damien Millerfecfd112013-07-18 16:11:50 +1000239AUTHORIZED_KEYS FILE FORMAT
Damien Miller6018a362010-07-02 13:35:19 +1000240section of
241.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000242.Cm AuthorizedKeysFile
243may contain tokens of the form %T which are substituted during connection
Damien Miller5b0d63f2006-03-15 11:56:56 +1100244setup.
Damien Millerfbf486b2003-05-23 18:44:23 +1000245The following tokens are defined: %% is replaced by a literal '%',
Damien Miller5b0d63f2006-03-15 11:56:56 +1100246%h is replaced by the home directory of the user being authenticated, and
Ben Lindstrom9f049032002-06-21 00:59:05 +0000247%u is replaced by the username of that user.
248After expansion,
249.Cm AuthorizedKeysFile
250is taken to be an absolute path or one relative to the user's home
251directory.
Damien Millerb9132fc2011-05-29 21:41:40 +1000252Multiple files may be listed, separated by whitespace.
253The default is
254.Dq .ssh/authorized_keys .ssh/authorized_keys2 .
Damien Miller30da3442010-05-10 11:58:03 +1000255.It Cm AuthorizedPrincipalsFile
256Specifies a file that lists principal names that are accepted for
257certificate authentication.
258When using certificates signed by a key listed in
259.Cm TrustedUserCAKeys ,
260this file lists names, one of which must appear in the certificate for it
261to be accepted for authentication.
Damien Millerd59dab82010-07-02 13:37:17 +1000262Names are listed one per line preceded by key options (as described
Damien Millerfecfd112013-07-18 16:11:50 +1000263in AUTHORIZED_KEYS FILE FORMAT in
Damien Millerd59dab82010-07-02 13:37:17 +1000264.Xr sshd 8 ) .
Damien Miller6018a362010-07-02 13:35:19 +1000265Empty lines and comments starting with
Damien Miller30da3442010-05-10 11:58:03 +1000266.Ql #
267are ignored.
268.Pp
269.Cm AuthorizedPrincipalsFile
270may contain tokens of the form %T which are substituted during connection
271setup.
272The following tokens are defined: %% is replaced by a literal '%',
273%h is replaced by the home directory of the user being authenticated, and
274%u is replaced by the username of that user.
275After expansion,
276.Cm AuthorizedPrincipalsFile
277is taken to be an absolute path or one relative to the user's home
278directory.
279.Pp
Damien Miller8fef9eb2012-04-22 11:25:10 +1000280The default is
281.Dq none ,
282i.e. not to use a principals file \(en in this case, the username
Damien Miller30da3442010-05-10 11:58:03 +1000283of the user must appear in a certificate's principals list for it to be
284accepted.
285Note that
286.Cm AuthorizedPrincipalsFile
287is only used when authentication proceeds using a CA listed in
288.Cm TrustedUserCAKeys
289and is not consulted for certification authorities trusted via
290.Pa ~/.ssh/authorized_keys ,
291though the
292.Cm principals=
293key option offers a similar facility (see
294.Xr sshd 8
295for details).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000296.It Cm Banner
Ben Lindstrom9f049032002-06-21 00:59:05 +0000297The contents of the specified file are sent to the remote user before
298authentication is allowed.
Damien Miller4890e532007-09-17 11:57:38 +1000299If the argument is
300.Dq none
301then no banner is displayed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000302This option is only available for protocol version 2.
303By default, no banner is displayed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000304.It Cm ChallengeResponseAuthentication
Damien Miller9c7bf8d2009-08-28 10:27:08 +1000305Specifies whether challenge-response authentication is allowed (e.g. via
Damien Millere8c9f262014-10-03 09:24:56 +1000306PAM or through authentication styles supported in
Damien Miller9c7bf8d2009-08-28 10:27:08 +1000307.Xr login.conf 5 )
Ben Lindstrom9f049032002-06-21 00:59:05 +0000308The default is
309.Dq yes .
Damien Millerd8cb1f12008-02-10 22:40:12 +1100310.It Cm ChrootDirectory
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100311Specifies the pathname of a directory to
Damien Millerd8cb1f12008-02-10 22:40:12 +1100312.Xr chroot 2
313to after authentication.
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100314All components of the pathname must be root-owned directories that are
Damien Millerd8cb1f12008-02-10 22:40:12 +1100315not writable by any other user or group.
Darren Tucker51dbe502009-06-21 17:56:51 +1000316After the chroot,
317.Xr sshd 8
318changes the working directory to the user's home directory.
Damien Millerd8cb1f12008-02-10 22:40:12 +1100319.Pp
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100320The pathname may contain the following tokens that are expanded at runtime once
Damien Millerd8cb1f12008-02-10 22:40:12 +1100321the connecting user has been authenticated: %% is replaced by a literal '%',
322%h is replaced by the home directory of the user being authenticated, and
323%u is replaced by the username of that user.
324.Pp
325The
326.Cm ChrootDirectory
327must contain the necessary files and directories to support the
Darren Tuckeraf501cf2009-06-21 17:53:04 +1000328user's session.
Damien Millerd8cb1f12008-02-10 22:40:12 +1100329For an interactive session this requires at least a shell, typically
330.Xr sh 1 ,
331and basic
332.Pa /dev
333nodes such as
334.Xr null 4 ,
335.Xr zero 4 ,
336.Xr stdin 4 ,
337.Xr stdout 4 ,
338.Xr stderr 4 ,
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000339and
Damien Millerd8cb1f12008-02-10 22:40:12 +1100340.Xr tty 4
341devices.
342For file transfer sessions using
Darren Tuckerf92077f2009-06-21 17:56:25 +1000343.Dq sftp ,
Damien Millerd8cb1f12008-02-10 22:40:12 +1100344no additional configuration of the environment is necessary if the
Darren Tuckerf92077f2009-06-21 17:56:25 +1000345in-process sftp server is used,
Damien Miller426117b2014-07-30 12:33:20 +1000346though sessions which use logging may require
Darren Tucker00fcd712009-06-21 17:56:00 +1000347.Pa /dev/log
Damien Miller426117b2014-07-30 12:33:20 +1000348inside the chroot directory on some operating systems (see
Darren Tucker00fcd712009-06-21 17:56:00 +1000349.Xr sftp-server 8
350for details).
Damien Millerd8cb1f12008-02-10 22:40:12 +1100351.Pp
352The default is not to
353.Xr chroot 2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000354.It Cm Ciphers
355Specifies the ciphers allowed for protocol version 2.
356Multiple ciphers must be comma-separated.
Damien Miller0fde8ac2013-11-21 14:12:23 +1100357The supported ciphers are:
358.Pp
Damien Millerc1621c82014-04-20 13:22:46 +1000359.Bl -item -compact -offset indent
360.It
3613des-cbc
362.It
363aes128-cbc
364.It
365aes192-cbc
366.It
367aes256-cbc
368.It
369aes128-ctr
370.It
371aes192-ctr
372.It
373aes256-ctr
374.It
375aes128-gcm@openssh.com
376.It
377aes256-gcm@openssh.com
378.It
379arcfour
380.It
381arcfour128
382.It
383arcfour256
384.It
385blowfish-cbc
386.It
387cast128-cbc
388.It
389chacha20-poly1305@openssh.com
390.El
Damien Miller0fde8ac2013-11-21 14:12:23 +1100391.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +1100392The default is:
Damien Millerc1621c82014-04-20 13:22:46 +1000393.Bd -literal -offset indent
394aes128-ctr,aes192-ctr,aes256-ctr,
Damien Miller1d75abf2013-01-09 16:12:19 +1100395aes128-gcm@openssh.com,aes256-gcm@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +1000396chacha20-poly1305@openssh.com
Ben Lindstrom9f049032002-06-21 00:59:05 +0000397.Ed
Damien Miller0fde8ac2013-11-21 14:12:23 +1100398.Pp
399The list of available ciphers may also be obtained using the
400.Fl Q
401option of
402.Xr ssh 1 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000403.It Cm ClientAliveCountMax
Damien Millerb7977702006-01-03 18:47:31 +1100404Sets the number of client alive messages (see below) which may be
Ben Lindstrom9f049032002-06-21 00:59:05 +0000405sent without
Damien Miller5b0d63f2006-03-15 11:56:56 +1100406.Xr sshd 8
Damien Millerfbf486b2003-05-23 18:44:23 +1000407receiving any messages back from the client.
408If this threshold is reached while client alive messages are being sent,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100409sshd will disconnect the client, terminating the session.
Damien Millerfbf486b2003-05-23 18:44:23 +1000410It is important to note that the use of client alive messages is very
411different from
Damien Miller12c150e2003-12-17 16:31:10 +1100412.Cm TCPKeepAlive
Damien Millerfbf486b2003-05-23 18:44:23 +1000413(below).
414The client alive messages are sent through the encrypted channel
415and therefore will not be spoofable.
416The TCP keepalive option enabled by
Damien Miller12c150e2003-12-17 16:31:10 +1100417.Cm TCPKeepAlive
Damien Millerfbf486b2003-05-23 18:44:23 +1000418is spoofable.
419The client alive mechanism is valuable when the client or
Ben Lindstrom9f049032002-06-21 00:59:05 +0000420server depend on knowing when a connection has become inactive.
421.Pp
Damien Millerfbf486b2003-05-23 18:44:23 +1000422The default value is 3.
423If
Ben Lindstrom9f049032002-06-21 00:59:05 +0000424.Cm ClientAliveInterval
Damien Millerb7977702006-01-03 18:47:31 +1100425(see below) is set to 15, and
Ben Lindstrom9f049032002-06-21 00:59:05 +0000426.Cm ClientAliveCountMax
Damien Miller5b0d63f2006-03-15 11:56:56 +1100427is left at the default, unresponsive SSH clients
Ben Lindstrom9f049032002-06-21 00:59:05 +0000428will be disconnected after approximately 45 seconds.
Damien Millercc3e8ba2006-03-15 12:06:55 +1100429This option applies to protocol version 2 only.
Damien Miller1594ad52005-05-26 12:12:19 +1000430.It Cm ClientAliveInterval
431Sets a timeout interval in seconds after which if no data has been received
432from the client,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100433.Xr sshd 8
Damien Miller1594ad52005-05-26 12:12:19 +1000434will send a message through the encrypted
435channel to request a response from the client.
436The default
437is 0, indicating that these messages will not be sent to the client.
438This option applies to protocol version 2 only.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000439.It Cm Compression
Damien Miller9786e6e2005-07-26 21:54:56 +1000440Specifies whether compression is allowed, or delayed until
441the user has authenticated successfully.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000442The argument must be
Damien Miller9786e6e2005-07-26 21:54:56 +1000443.Dq yes ,
444.Dq delayed ,
Ben Lindstrom9f049032002-06-21 00:59:05 +0000445or
446.Dq no .
447The default is
Damien Miller9786e6e2005-07-26 21:54:56 +1000448.Dq delayed .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000449.It Cm DenyGroups
450This keyword can be followed by a list of group name patterns, separated
451by spaces.
452Login is disallowed for users whose primary group or supplementary
453group list matches one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000454Only group names are valid; a numerical group ID is not recognized.
455By default, login is allowed for all groups.
Damien Millerac73e512006-03-15 11:58:49 +1100456The allow/deny directives are processed in the following order:
457.Cm DenyUsers ,
458.Cm AllowUsers ,
459.Cm DenyGroups ,
460and finally
461.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100462.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000463See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100464.Xr ssh_config 5
465for more information on patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000466.It Cm DenyUsers
467This keyword can be followed by a list of user name patterns, separated
468by spaces.
469Login is disallowed for user names that match one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000470Only user names are valid; a numerical user ID is not recognized.
471By default, login is allowed for all users.
472If the pattern takes the form USER@HOST then USER and HOST
473are separately checked, restricting logins to particular
474users from particular hosts.
Damien Millerac73e512006-03-15 11:58:49 +1100475The allow/deny directives are processed in the following order:
476.Cm DenyUsers ,
477.Cm AllowUsers ,
478.Cm DenyGroups ,
479and finally
480.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100481.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000482See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100483.Xr ssh_config 5
484for more information on patterns.
Damien Millere2754432006-07-24 14:06:47 +1000485.It Cm ForceCommand
486Forces the execution of the command specified by
487.Cm ForceCommand ,
Damien Millera1b48cc2008-03-27 11:02:02 +1100488ignoring any command supplied by the client and
489.Pa ~/.ssh/rc
490if present.
Damien Millere2754432006-07-24 14:06:47 +1000491The command is invoked by using the user's login shell with the -c option.
492This applies to shell, command, or subsystem execution.
493It is most useful inside a
494.Cm Match
495block.
496The command originally supplied by the client is available in the
497.Ev SSH_ORIGINAL_COMMAND
498environment variable.
Damien Millercdb6e652008-02-10 22:47:24 +1100499Specifying a command of
500.Dq internal-sftp
501will force the use of an in-process sftp server that requires no support
502files when used with
503.Cm ChrootDirectory .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000504.It Cm GatewayPorts
505Specifies whether remote hosts are allowed to connect to ports
506forwarded for the client.
507By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100508.Xr sshd 8
Damien Miller495dca32003-04-01 21:42:14 +1000509binds remote port forwardings to the loopback address.
510This prevents other remote hosts from connecting to forwarded ports.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000511.Cm GatewayPorts
Damien Miller5b0d63f2006-03-15 11:56:56 +1100512can be used to specify that sshd
Damien Millerf91ee4c2005-03-01 21:24:33 +1100513should allow remote port forwardings to bind to non-loopback addresses, thus
514allowing other hosts to connect.
515The argument may be
516.Dq no
517to force remote port forwardings to be available to the local host only,
Ben Lindstrom9f049032002-06-21 00:59:05 +0000518.Dq yes
Damien Millerf91ee4c2005-03-01 21:24:33 +1100519to force remote port forwardings to bind to the wildcard address, or
520.Dq clientspecified
521to allow the client to select the address to which the forwarding is bound.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000522The default is
523.Dq no .
Darren Tucker0efd1552003-08-26 11:49:55 +1000524.It Cm GSSAPIAuthentication
Damien Miller9b7b03b2003-09-02 22:57:05 +1000525Specifies whether user authentication based on GSSAPI is allowed.
Damien Millera8e06ce2003-11-21 23:48:55 +1100526The default is
Darren Tucker0efd1552003-08-26 11:49:55 +1000527.Dq no .
528Note that this option applies to protocol version 2 only.
529.It Cm GSSAPICleanupCredentials
530Specifies whether to automatically destroy the user's credentials cache
531on logout.
532The default is
533.Dq yes .
534Note that this option applies to protocol version 2 only.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000535.It Cm HostbasedAuthentication
536Specifies whether rhosts or /etc/hosts.equiv authentication together
537with successful public key client host authentication is allowed
Damien Miller1faa7132006-03-15 11:55:31 +1100538(host-based authentication).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000539This option is similar to
540.Cm RhostsRSAAuthentication
541and applies to protocol version 2 only.
542The default is
543.Dq no .
Damien Millerb594f382006-08-30 11:06:34 +1000544.It Cm HostbasedUsesNameFromPacketOnly
545Specifies whether or not the server will attempt to perform a reverse
546name lookup when matching the name in the
547.Pa ~/.shosts ,
548.Pa ~/.rhosts ,
549and
550.Pa /etc/hosts.equiv
551files during
552.Cm HostbasedAuthentication .
553A setting of
554.Dq yes
555means that
556.Xr sshd 8
557uses the name supplied by the client rather than
558attempting to resolve the name from the TCP connection itself.
559The default is
560.Dq no .
Damien Miller0a80ca12010-02-27 07:55:05 +1100561.It Cm HostCertificate
562Specifies a file containing a public host certificate.
563The certificate's public key must match a private host key already specified
564by
565.Cm HostKey .
566The default behaviour of
567.Xr sshd 8
568is not to load any certificates.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000569.It Cm HostKey
570Specifies a file containing a private host key
571used by SSH.
572The default is
573.Pa /etc/ssh/ssh_host_key
574for protocol version 1, and
Damien Millereb8b60e2010-08-31 22:41:14 +1000575.Pa /etc/ssh/ssh_host_dsa_key ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100576.Pa /etc/ssh/ssh_host_ecdsa_key ,
577.Pa /etc/ssh/ssh_host_ed25519_key
Ben Lindstrom9f049032002-06-21 00:59:05 +0000578and
Damien Millereb8b60e2010-08-31 22:41:14 +1000579.Pa /etc/ssh/ssh_host_rsa_key
Ben Lindstrom9f049032002-06-21 00:59:05 +0000580for protocol version 2.
581Note that
Damien Miller5b0d63f2006-03-15 11:56:56 +1100582.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000583will refuse to use a file if it is group/world-accessible.
584It is possible to have multiple host key files.
585.Dq rsa1
586keys are used for version 1 and
Damien Millereb8b60e2010-08-31 22:41:14 +1000587.Dq dsa ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100588.Dq ecdsa ,
589.Dq ed25519
Ben Lindstrom9f049032002-06-21 00:59:05 +0000590or
591.Dq rsa
592are used for version 2 of the SSH protocol.
Damien Miller85b45e02013-07-20 13:21:52 +1000593It is also possible to specify public host key files instead.
594In this case operations on the private key will be delegated
595to an
596.Xr ssh-agent 1 .
597.It Cm HostKeyAgent
598Identifies the UNIX-domain socket used to communicate
599with an agent that has access to the private host keys.
600If
601.Dq SSH_AUTH_SOCK
602is specified, the location of the socket will be read from the
603.Ev SSH_AUTH_SOCK
604environment variable.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000605.It Cm IgnoreRhosts
606Specifies that
607.Pa .rhosts
608and
609.Pa .shosts
610files will not be used in
Ben Lindstrom9f049032002-06-21 00:59:05 +0000611.Cm RhostsRSAAuthentication
612or
613.Cm HostbasedAuthentication .
614.Pp
615.Pa /etc/hosts.equiv
616and
617.Pa /etc/shosts.equiv
618are still used.
619The default is
620.Dq yes .
621.It Cm IgnoreUserKnownHosts
622Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +1100623.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000624should ignore the user's
Damien Miller167ea5d2005-05-26 12:04:02 +1000625.Pa ~/.ssh/known_hosts
Ben Lindstrom9f049032002-06-21 00:59:05 +0000626during
627.Cm RhostsRSAAuthentication
628or
629.Cm HostbasedAuthentication .
630The default is
631.Dq no .
Damien Miller0dac6fb2010-11-20 15:19:38 +1100632.It Cm IPQoS
633Specifies the IPv4 type-of-service or DSCP class for the connection.
634Accepted values are
635.Dq af11 ,
636.Dq af12 ,
637.Dq af13 ,
Damien Millerf6e758c2011-09-22 21:37:13 +1000638.Dq af21 ,
Damien Miller0dac6fb2010-11-20 15:19:38 +1100639.Dq af22 ,
640.Dq af23 ,
641.Dq af31 ,
642.Dq af32 ,
643.Dq af33 ,
644.Dq af41 ,
645.Dq af42 ,
646.Dq af43 ,
647.Dq cs0 ,
648.Dq cs1 ,
649.Dq cs2 ,
650.Dq cs3 ,
651.Dq cs4 ,
652.Dq cs5 ,
653.Dq cs6 ,
654.Dq cs7 ,
655.Dq ef ,
656.Dq lowdelay ,
657.Dq throughput ,
658.Dq reliability ,
659or a numeric value.
Damien Miller928362d2010-12-26 14:26:45 +1100660This option may take one or two arguments, separated by whitespace.
Damien Miller0dac6fb2010-11-20 15:19:38 +1100661If one argument is specified, it is used as the packet class unconditionally.
662If two values are specified, the first is automatically selected for
663interactive sessions and the second for non-interactive sessions.
664The default is
665.Dq lowdelay
666for interactive sessions and
667.Dq throughput
668for non-interactive sessions.
Damien Millere1e480a2014-02-04 11:13:17 +1100669.It Cm KbdInteractiveAuthentication
670Specifies whether to allow keyboard-interactive authentication.
671The argument to this keyword must be
672.Dq yes
673or
674.Dq no .
675The default is to use whatever value
676.Cm ChallengeResponseAuthentication
677is set to
678(by default
679.Dq yes ) .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000680.It Cm KerberosAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000681Specifies whether the password provided by the user for
Ben Lindstrom9f049032002-06-21 00:59:05 +0000682.Cm PasswordAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000683will be validated through the Kerberos KDC.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000684To use this option, the server needs a
685Kerberos servtab which allows the verification of the KDC's identity.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100686The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000687.Dq no .
Damien Miller8448e662004-03-08 23:13:15 +1100688.It Cm KerberosGetAFSToken
Darren Tuckere2dd2d52005-10-03 18:19:06 +1000689If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
Damien Miller8448e662004-03-08 23:13:15 +1100690an AFS token before accessing the user's home directory.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100691The default is
Damien Miller8448e662004-03-08 23:13:15 +1100692.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000693.It Cm KerberosOrLocalPasswd
Damien Miller5b0d63f2006-03-15 11:56:56 +1100694If password authentication through Kerberos fails then
Ben Lindstrom9f049032002-06-21 00:59:05 +0000695the password will be validated via any additional local mechanism
696such as
697.Pa /etc/passwd .
Damien Miller5b0d63f2006-03-15 11:56:56 +1100698The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000699.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000700.It Cm KerberosTicketCleanup
701Specifies whether to automatically destroy the user's ticket cache
702file on logout.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100703The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000704.Dq yes .
Damien Millerd5f62bf2010-09-24 22:11:14 +1000705.It Cm KexAlgorithms
706Specifies the available KEX (Key Exchange) algorithms.
707Multiple algorithms must be comma-separated.
Damien Millerc1621c82014-04-20 13:22:46 +1000708The supported algorithms are:
709.Pp
710.Bl -item -compact -offset indent
711.It
712curve25519-sha256@libssh.org
713.It
714diffie-hellman-group1-sha1
715.It
716diffie-hellman-group14-sha1
717.It
718diffie-hellman-group-exchange-sha1
719.It
720diffie-hellman-group-exchange-sha256
721.It
722ecdh-sha2-nistp256
723.It
724ecdh-sha2-nistp384
725.It
726ecdh-sha2-nistp521
727.El
728.Pp
729The default is:
Damien Miller6575c3a2013-12-18 17:47:02 +1100730.Bd -literal -offset indent
731curve25519-sha256@libssh.org,
732ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
733diffie-hellman-group-exchange-sha256,
Damien Millerc1621c82014-04-20 13:22:46 +1000734diffie-hellman-group14-sha1
Damien Miller6575c3a2013-12-18 17:47:02 +1100735.Ed
Ben Lindstrom9f049032002-06-21 00:59:05 +0000736.It Cm KeyRegenerationInterval
737In protocol version 1, the ephemeral server key is automatically regenerated
738after this many seconds (if it has been used).
739The purpose of regeneration is to prevent
740decrypting captured sessions by later breaking into the machine and
741stealing the keys.
742The key is never stored anywhere.
743If the value is 0, the key is never regenerated.
744The default is 3600 (seconds).
745.It Cm ListenAddress
746Specifies the local addresses
Damien Miller5b0d63f2006-03-15 11:56:56 +1100747.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000748should listen on.
749The following forms may be used:
750.Pp
751.Bl -item -offset indent -compact
752.It
753.Cm ListenAddress
754.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000755.Ar host | Ar IPv4_addr | Ar IPv6_addr
Ben Lindstrom9f049032002-06-21 00:59:05 +0000756.Sm on
757.It
758.Cm ListenAddress
759.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000760.Ar host | Ar IPv4_addr : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000761.Sm on
762.It
763.Cm ListenAddress
764.Sm off
765.Oo
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000766.Ar host | Ar IPv6_addr Oc : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000767.Sm on
768.El
769.Pp
770If
771.Ar port
772is not specified,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100773sshd will listen on the address and all prior
Ben Lindstrom9f049032002-06-21 00:59:05 +0000774.Cm Port
Damien Millerfbf486b2003-05-23 18:44:23 +1000775options specified.
776The default is to listen on all local addresses.
Damien Miller495dca32003-04-01 21:42:14 +1000777Multiple
Ben Lindstrom9f049032002-06-21 00:59:05 +0000778.Cm ListenAddress
Damien Millerfbf486b2003-05-23 18:44:23 +1000779options are permitted.
780Additionally, any
Ben Lindstrom9f049032002-06-21 00:59:05 +0000781.Cm Port
Damien Miller5b0d63f2006-03-15 11:56:56 +1100782options must precede this option for non-port qualified addresses.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000783.It Cm LoginGraceTime
784The server disconnects after this time if the user has not
785successfully logged in.
786If the value is 0, there is no time limit.
Damien Millerc1348632002-09-05 14:35:14 +1000787The default is 120 seconds.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000788.It Cm LogLevel
789Gives the verbosity level that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +1100790.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000791The possible values are:
Damien Miller5b0d63f2006-03-15 11:56:56 +1100792QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
Damien Miller495dca32003-04-01 21:42:14 +1000793The default is INFO.
794DEBUG and DEBUG1 are equivalent.
795DEBUG2 and DEBUG3 each specify higher levels of debugging output.
796Logging with a DEBUG level violates the privacy of users and is not recommended.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000797.It Cm MACs
798Specifies the available MAC (message authentication code) algorithms.
799The MAC algorithm is used in protocol version 2
800for data integrity protection.
801Multiple algorithms must be comma-separated.
Damien Milleraf43a7a2012-12-12 10:46:31 +1100802The algorithms that contain
803.Dq -etm
804calculate the MAC after encryption (encrypt-then-mac).
805These are considered safer and their use recommended.
Damien Millerc1621c82014-04-20 13:22:46 +1000806The supported MACs are:
807.Pp
808.Bl -item -compact -offset indent
809.It
810hmac-md5
811.It
812hmac-md5-96
813.It
814hmac-ripemd160
815.It
816hmac-sha1
817.It
818hmac-sha1-96
819.It
820hmac-sha2-256
821.It
822hmac-sha2-512
823.It
824umac-64@openssh.com
825.It
826umac-128@openssh.com
827.It
828hmac-md5-etm@openssh.com
829.It
830hmac-md5-96-etm@openssh.com
831.It
832hmac-ripemd160-etm@openssh.com
833.It
834hmac-sha1-etm@openssh.com
835.It
836hmac-sha1-96-etm@openssh.com
837.It
838hmac-sha2-256-etm@openssh.com
839.It
840hmac-sha2-512-etm@openssh.com
841.It
842umac-64-etm@openssh.com
843.It
844umac-128-etm@openssh.com
845.El
846.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +1100847The default is:
Damien Miller22b7b492007-06-11 14:07:12 +1000848.Bd -literal -offset indent
Damien Milleraf43a7a2012-12-12 10:46:31 +1100849umac-64-etm@openssh.com,umac-128-etm@openssh.com,
850hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +1000851umac-64@openssh.com,umac-128@openssh.com,
852hmac-sha2-256,hmac-sha2-512
Damien Miller22b7b492007-06-11 14:07:12 +1000853.Ed
Darren Tucker45150472006-07-12 22:34:17 +1000854.It Cm Match
Damien Millerd04f3572006-07-24 13:46:50 +1000855Introduces a conditional block.
Damien Miller8c234032006-07-24 14:05:08 +1000856If all of the criteria on the
Darren Tucker45150472006-07-12 22:34:17 +1000857.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +1000858line are satisfied, the keywords on the following lines override those
859set in the global section of the config file, until either another
Darren Tucker45150472006-07-12 22:34:17 +1000860.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +1000861line or the end of the file.
Damien Millerfc5d6752014-02-28 10:01:28 +1100862If a keyword appears in multiple
863.Cm Match
sobrado@openbsd.org180bcb42014-08-30 16:32:25 +0000864blocks that are satisfied, only the first instance of the keyword is
Damien Millerfc5d6752014-02-28 10:01:28 +1100865applied.
Darren Tucker7a3935d2008-06-10 22:59:10 +1000866.Pp
Damien Millerd04f3572006-07-24 13:46:50 +1000867The arguments to
Darren Tucker45150472006-07-12 22:34:17 +1000868.Cm Match
Damien Millercf31f382013-10-24 21:02:56 +1100869are one or more criteria-pattern pairs or the single token
870.Cm All
871which matches all criteria.
Darren Tucker45150472006-07-12 22:34:17 +1000872The available criteria are
873.Cm User ,
Damien Miller565ca3f2006-08-19 00:23:15 +1000874.Cm Group ,
Darren Tucker45150472006-07-12 22:34:17 +1000875.Cm Host ,
Darren Tuckerfbcf8272012-05-19 19:37:01 +1000876.Cm LocalAddress ,
877.Cm LocalPort ,
Darren Tucker45150472006-07-12 22:34:17 +1000878and
879.Cm Address .
Darren Tucker7a3935d2008-06-10 22:59:10 +1000880The match patterns may consist of single entries or comma-separated
881lists and may use the wildcard and negation operators described in the
Damien Millerfecfd112013-07-18 16:11:50 +1000882PATTERNS section of
Darren Tuckerb06cc4a2008-06-10 22:59:53 +1000883.Xr ssh_config 5 .
Darren Tucker7a3935d2008-06-10 22:59:10 +1000884.Pp
885The patterns in an
886.Cm Address
887criteria may additionally contain addresses to match in CIDR
Darren Tucker6a2a4002008-06-10 23:03:04 +1000888address/masklen format, e.g.\&
Darren Tucker7a3935d2008-06-10 22:59:10 +1000889.Dq 192.0.2.0/24
890or
891.Dq 3ffe:ffff::/32 .
892Note that the mask length provided must be consistent with the address -
893it is an error to specify a mask length that is too long for the address
Darren Tucker6a2a4002008-06-10 23:03:04 +1000894or one with bits set in this host portion of the address.
895For example,
Darren Tucker7a3935d2008-06-10 22:59:10 +1000896.Dq 192.0.2.0/33
897and
Darren Tucker6a2a4002008-06-10 23:03:04 +1000898.Dq 192.0.2.0/8
Darren Tucker7a3935d2008-06-10 22:59:10 +1000899respectively.
900.Pp
Darren Tucker45150472006-07-12 22:34:17 +1000901Only a subset of keywords may be used on the lines following a
902.Cm Match
903keyword.
904Available keywords are
Damien Millerf8268502012-06-20 21:54:15 +1000905.Cm AcceptEnv ,
Damien Miller17819012009-01-28 16:20:17 +1100906.Cm AllowAgentForwarding ,
Damien Millerf8268502012-06-20 21:54:15 +1000907.Cm AllowGroups ,
Damien Miller9b439df2006-07-24 14:04:00 +1000908.Cm AllowTcpForwarding ,
Damien Millerc24da772012-06-20 21:53:58 +1000909.Cm AllowUsers ,
Damien Millera6e3f012012-11-04 23:21:40 +1100910.Cm AuthenticationMethods ,
Damien Miller09d3e122012-10-31 08:58:58 +1100911.Cm AuthorizedKeysCommand ,
912.Cm AuthorizedKeysCommandUser ,
Damien Millerf33580e2012-11-04 22:22:52 +1100913.Cm AuthorizedKeysFile ,
Damien Millerab6de352010-06-26 09:38:45 +1000914.Cm AuthorizedPrincipalsFile ,
Darren Tucker1629c072007-02-19 22:25:37 +1100915.Cm Banner ,
Damien Miller797e3d12008-05-19 14:27:42 +1000916.Cm ChrootDirectory ,
Damien Millerc24da772012-06-20 21:53:58 +1000917.Cm DenyGroups ,
918.Cm DenyUsers ,
Damien Millere2754432006-07-24 14:06:47 +1000919.Cm ForceCommand ,
Damien Millerc24da772012-06-20 21:53:58 +1000920.Cm GatewayPorts ,
Damien Millerf8268502012-06-20 21:54:15 +1000921.Cm GSSAPIAuthentication ,
Damien Miller25434de2008-05-19 14:29:08 +1000922.Cm HostbasedAuthentication ,
Damien Millerab6de352010-06-26 09:38:45 +1000923.Cm HostbasedUsesNameFromPacketOnly ,
Darren Tucker1d75f222007-03-01 21:31:28 +1100924.Cm KbdInteractiveAuthentication ,
Damien Miller5737e362007-03-06 21:21:18 +1100925.Cm KerberosAuthentication ,
Damien Miller307c1d12008-06-16 07:56:20 +1000926.Cm MaxAuthTries ,
Damien Millerc62a5af2008-06-16 07:55:46 +1000927.Cm MaxSessions ,
Darren Tucker1629c072007-02-19 22:25:37 +1100928.Cm PasswordAuthentication ,
Damien Miller51bde602008-11-03 19:23:10 +1100929.Cm PermitEmptyPasswords ,
Damien Millerd1de9952006-07-24 14:05:48 +1000930.Cm PermitOpen ,
Darren Tucker15f94272008-01-01 20:36:56 +1100931.Cm PermitRootLogin ,
Damien Miller5ff30c62013-10-30 22:21:50 +1100932.Cm PermitTTY ,
Damien Millerab6de352010-06-26 09:38:45 +1000933.Cm PermitTunnel ,
Damien Miller72e6b5c2014-07-04 09:00:04 +1000934.Cm PermitUserRC ,
Darren Tucker1477ea12009-10-07 08:36:05 +1100935.Cm PubkeyAuthentication ,
Darren Tucker5f96f3b2013-05-16 20:29:28 +1000936.Cm RekeyLimit ,
Damien Millerc24da772012-06-20 21:53:58 +1000937.Cm RhostsRSAAuthentication ,
Damien Millerf8268502012-06-20 21:54:15 +1000938.Cm RSAAuthentication ,
Damien Millerd1de9952006-07-24 14:05:48 +1000939.Cm X11DisplayOffset ,
Damien Miller19913842009-02-23 10:53:58 +1100940.Cm X11Forwarding
Darren Tucker45150472006-07-12 22:34:17 +1000941and
Damien Miller0296ae82009-02-23 11:00:24 +1100942.Cm X11UseLocalHost .
Darren Tucker89413db2004-05-24 10:36:23 +1000943.It Cm MaxAuthTries
944Specifies the maximum number of authentication attempts permitted per
Damien Miller26213e52004-06-30 22:39:34 +1000945connection.
946Once the number of failures reaches half this value,
947additional failures are logged.
948The default is 6.
Damien Miller7207f642008-05-19 15:34:50 +1000949.It Cm MaxSessions
950Specifies the maximum number of open sessions permitted per network connection.
951The default is 10.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000952.It Cm MaxStartups
953Specifies the maximum number of concurrent unauthenticated connections to the
Damien Miller5b0d63f2006-03-15 11:56:56 +1100954SSH daemon.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000955Additional connections will be dropped until authentication succeeds or the
956.Cm LoginGraceTime
957expires for a connection.
Damien Miller1f583df2013-02-12 11:02:08 +1100958The default is 10:30:100.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000959.Pp
960Alternatively, random early drop can be enabled by specifying
961the three colon separated values
962.Dq start:rate:full
Damien Miller208f1ed2006-03-15 11:56:03 +1100963(e.g. "10:30:60").
Damien Millerf4f22b52006-03-15 11:57:25 +1100964.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000965will refuse connection attempts with a probability of
966.Dq rate/100
967(30%)
968if there are currently
969.Dq start
970(10)
971unauthenticated connections.
972The probability increases linearly and all connection attempts
973are refused if the number of unauthenticated connections reaches
974.Dq full
975(60).
976.It Cm PasswordAuthentication
977Specifies whether password authentication is allowed.
978The default is
979.Dq yes .
980.It Cm PermitEmptyPasswords
981When password authentication is allowed, it specifies whether the
982server allows login to accounts with empty password strings.
983The default is
984.Dq no .
Damien Miller9b439df2006-07-24 14:04:00 +1000985.It Cm PermitOpen
986Specifies the destinations to which TCP port forwarding is permitted.
987The forwarding specification must be one of the following forms:
988.Pp
989.Bl -item -offset indent -compact
990.It
991.Cm PermitOpen
992.Sm off
993.Ar host : port
994.Sm on
995.It
996.Cm PermitOpen
997.Sm off
998.Ar IPv4_addr : port
999.Sm on
1000.It
1001.Cm PermitOpen
1002.Sm off
1003.Ar \&[ IPv6_addr \&] : port
1004.Sm on
1005.El
1006.Pp
Damien Millera765cf42006-07-24 14:08:13 +10001007Multiple forwards may be specified by separating them with whitespace.
Damien Miller9b439df2006-07-24 14:04:00 +10001008An argument of
1009.Dq any
1010can be used to remove all restrictions and permit any forwarding requests.
Darren Tuckerba9ea322012-05-19 19:37:33 +10001011An argument of
1012.Dq none
1013can be used to prohibit all forwarding requests.
Damien Miller65bc2c42006-07-24 14:04:16 +10001014By default all port forwarding requests are permitted.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001015.It Cm PermitRootLogin
Darren Tuckerb3509012005-01-20 11:01:46 +11001016Specifies whether root can log in using
Ben Lindstrom9f049032002-06-21 00:59:05 +00001017.Xr ssh 1 .
1018The argument must be
1019.Dq yes ,
1020.Dq without-password ,
Damien Miller5b0d63f2006-03-15 11:56:56 +11001021.Dq forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001022or
1023.Dq no .
1024The default is
1025.Dq yes .
1026.Pp
1027If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001028.Dq without-password ,
Darren Tucker9dca0992005-02-01 19:16:45 +11001029password authentication is disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001030.Pp
1031If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001032.Dq forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001033root login with public key authentication will be allowed,
1034but only if the
1035.Ar command
1036option has been specified
1037(which may be useful for taking remote backups even if root login is
Damien Millerfbf486b2003-05-23 18:44:23 +10001038normally not allowed).
1039All other authentication methods are disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001040.Pp
1041If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001042.Dq no ,
Darren Tuckerb3509012005-01-20 11:01:46 +11001043root is not allowed to log in.
Damien Millerd27b9472005-12-13 19:29:02 +11001044.It Cm PermitTunnel
1045Specifies whether
1046.Xr tun 4
1047device forwarding is allowed.
Damien Miller7b58e802005-12-13 19:33:19 +11001048The argument must be
1049.Dq yes ,
Damien Miller991dba42006-07-10 20:16:27 +10001050.Dq point-to-point
1051(layer 3),
1052.Dq ethernet
1053(layer 2), or
Damien Miller7b58e802005-12-13 19:33:19 +11001054.Dq no .
Damien Miller991dba42006-07-10 20:16:27 +10001055Specifying
1056.Dq yes
1057permits both
1058.Dq point-to-point
1059and
1060.Dq ethernet .
Damien Millerd27b9472005-12-13 19:29:02 +11001061The default is
1062.Dq no .
djm@openbsd.org48dffd52014-09-09 09:45:36 +00001063.Pp
1064Independent of this setting, the permissions of the selected
1065.Xr tun 4
1066device must allow access to the user.
Damien Miller5ff30c62013-10-30 22:21:50 +11001067.It Cm PermitTTY
1068Specifies whether
Damien Miller63857c92013-10-30 22:31:06 +11001069.Xr pty 4
Damien Miller5ff30c62013-10-30 22:21:50 +11001070allocation is permitted.
1071The default is
1072.Dq yes .
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001073.It Cm PermitUserEnvironment
1074Specifies whether
1075.Pa ~/.ssh/environment
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001076and
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001077.Cm environment=
1078options in
1079.Pa ~/.ssh/authorized_keys
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001080are processed by
Damien Miller5b0d63f2006-03-15 11:56:56 +11001081.Xr sshd 8 .
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001082The default is
1083.Dq no .
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001084Enabling environment processing may enable users to bypass access
1085restrictions in some configurations using mechanisms such as
1086.Ev LD_PRELOAD .
Damien Miller72e6b5c2014-07-04 09:00:04 +10001087.It Cm PermitUserRC
1088Specifies whether any
1089.Pa ~/.ssh/rc
1090file is executed.
1091The default is
1092.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001093.It Cm PidFile
Ben Lindstrom959de992002-06-23 00:35:25 +00001094Specifies the file that contains the process ID of the
Damien Millerf4f22b52006-03-15 11:57:25 +11001095SSH daemon.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001096The default is
1097.Pa /var/run/sshd.pid .
1098.It Cm Port
1099Specifies the port number that
Damien Miller5b0d63f2006-03-15 11:56:56 +11001100.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001101listens on.
1102The default is 22.
1103Multiple options of this type are permitted.
1104See also
1105.Cm ListenAddress .
1106.It Cm PrintLastLog
1107Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001108.Xr sshd 8
Darren Tucker7cc5c232004-11-05 20:06:59 +11001109should print the date and time of the last user login when a user logs
1110in interactively.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001111The default is
1112.Dq yes .
1113.It Cm PrintMotd
1114Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001115.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001116should print
1117.Pa /etc/motd
1118when a user logs in interactively.
1119(On some systems it is also printed by the shell,
1120.Pa /etc/profile ,
1121or equivalent.)
1122The default is
1123.Dq yes .
1124.It Cm Protocol
1125Specifies the protocol versions
Damien Miller5b0d63f2006-03-15 11:56:56 +11001126.Xr sshd 8
Ben Lindstrom9c445542002-07-11 03:59:18 +00001127supports.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001128The possible values are
Damien Miller5b0d63f2006-03-15 11:56:56 +11001129.Sq 1
Ben Lindstrom9f049032002-06-21 00:59:05 +00001130and
Damien Miller5b0d63f2006-03-15 11:56:56 +11001131.Sq 2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001132Multiple versions must be comma-separated.
1133The default is
Darren Tucker7a4a7652009-10-11 21:51:40 +11001134.Sq 2 .
Ben Lindstrom9c445542002-07-11 03:59:18 +00001135Note that the order of the protocol list does not indicate preference,
1136because the client selects among multiple protocol versions offered
1137by the server.
1138Specifying
1139.Dq 2,1
1140is identical to
1141.Dq 1,2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001142.It Cm PubkeyAuthentication
1143Specifies whether public key authentication is allowed.
1144The default is
1145.Dq yes .
1146Note that this option applies to protocol version 2 only.
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001147.It Cm RekeyLimit
1148Specifies the maximum amount of data that may be transmitted before the
1149session key is renegotiated, optionally followed a maximum amount of
1150time that may pass before the session key is renegotiated.
1151The first argument is specified in bytes and may have a suffix of
1152.Sq K ,
1153.Sq M ,
1154or
1155.Sq G
1156to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1157The default is between
1158.Sq 1G
1159and
1160.Sq 4G ,
1161depending on the cipher.
1162The optional second value is specified in seconds and may use any of the
1163units documented in the
1164.Sx TIME FORMATS
Darren Tucker64d22942013-05-16 20:31:29 +10001165section.
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001166The default value for
1167.Cm RekeyLimit
1168is
1169.Dq default none ,
1170which means that rekeying is performed after the cipher's default amount
1171of data has been sent or received and no time based rekeying is done.
1172This option applies to protocol version 2 only.
Damien Miller1aed65e2010-03-04 21:53:35 +11001173.It Cm RevokedKeys
Damien Millerf3747bf2013-01-18 11:44:04 +11001174Specifies revoked public keys.
Damien Miller1aed65e2010-03-04 21:53:35 +11001175Keys listed in this file will be refused for public key authentication.
1176Note that if this file is not readable, then public key authentication will
1177be refused for all users.
Damien Millerf3747bf2013-01-18 11:44:04 +11001178Keys may be specified as a text file, listing one public key per line, or as
1179an OpenSSH Key Revocation List (KRL) as generated by
Damien Miller72abeb72013-01-20 22:33:44 +11001180.Xr ssh-keygen 1 .
Damien Millerfecfd112013-07-18 16:11:50 +10001181For more information on KRLs, see the KEY REVOCATION LISTS section in
Damien Millerf3747bf2013-01-18 11:44:04 +11001182.Xr ssh-keygen 1 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001183.It Cm RhostsRSAAuthentication
1184Specifies whether rhosts or /etc/hosts.equiv authentication together
1185with successful RSA host authentication is allowed.
1186The default is
1187.Dq no .
1188This option applies to protocol version 1 only.
1189.It Cm RSAAuthentication
1190Specifies whether pure RSA authentication is allowed.
1191The default is
1192.Dq yes .
1193This option applies to protocol version 1 only.
1194.It Cm ServerKeyBits
1195Defines the number of bits in the ephemeral protocol version 1 server key.
Darren Tucker7499b0c2008-07-02 22:35:43 +10001196The minimum value is 512, and the default is 1024.
Damien Miller7acefbb2014-07-18 14:11:24 +10001197.It Cm StreamLocalBindMask
1198Sets the octal file creation mode mask
1199.Pq umask
1200used when creating a Unix-domain socket file for local or remote
1201port forwarding.
1202This option is only used for port forwarding to a Unix-domain socket file.
1203.Pp
1204The default value is 0177, which creates a Unix-domain socket file that is
1205readable and writable only by the owner.
1206Note that not all operating systems honor the file mode on Unix-domain
1207socket files.
1208.It Cm StreamLocalBindUnlink
1209Specifies whether to remove an existing Unix-domain socket file for local
1210or remote port forwarding before creating a new one.
1211If the socket file already exists and
1212.Cm StreamLocalBindUnlink
1213is not enabled,
1214.Nm sshd
1215will be unable to forward the port to the Unix-domain socket file.
1216This option is only used for port forwarding to a Unix-domain socket file.
1217.Pp
1218The argument must be
1219.Dq yes
1220or
1221.Dq no .
1222The default is
1223.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001224.It Cm StrictModes
1225Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001226.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001227should check file modes and ownership of the
1228user's files and home directory before accepting login.
1229This is normally desirable because novices sometimes accidentally leave their
1230directory or files world-writable.
1231The default is
1232.Dq yes .
Darren Tuckerf788a912010-01-08 17:06:47 +11001233Note that this does not apply to
1234.Cm ChrootDirectory ,
1235whose permissions and ownership are checked unconditionally.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001236.It Cm Subsystem
Damien Miller208f1ed2006-03-15 11:56:03 +11001237Configures an external subsystem (e.g. file transfer daemon).
Damien Miller917f9b62006-07-10 20:36:47 +10001238Arguments should be a subsystem name and a command (with optional arguments)
1239to execute upon subsystem request.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001240.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001241The command
1242.Xr sftp-server 8
1243implements the
1244.Dq sftp
1245file transfer subsystem.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001246.Pp
1247Alternately the name
1248.Dq internal-sftp
1249implements an in-process
1250.Dq sftp
1251server.
1252This may simplify configurations using
1253.Cm ChrootDirectory
1254to force a different filesystem root on clients.
1255.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001256By default no subsystems are defined.
1257Note that this option applies to protocol version 2 only.
1258.It Cm SyslogFacility
1259Gives the facility code that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +11001260.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001261The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1262LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1263The default is AUTH.
Damien Miller12c150e2003-12-17 16:31:10 +11001264.It Cm TCPKeepAlive
1265Specifies whether the system should send TCP keepalive messages to the
1266other side.
1267If they are sent, death of the connection or crash of one
1268of the machines will be properly noticed.
1269However, this means that
1270connections will die if the route is down temporarily, and some people
1271find it annoying.
1272On the other hand, if TCP keepalives are not sent,
1273sessions may hang indefinitely on the server, leaving
1274.Dq ghost
1275users and consuming server resources.
1276.Pp
1277The default is
1278.Dq yes
1279(to send TCP keepalive messages), and the server will notice
1280if the network goes down or the client host crashes.
1281This avoids infinitely hanging sessions.
1282.Pp
1283To disable TCP keepalive messages, the value should be set to
1284.Dq no .
Damien Miller1aed65e2010-03-04 21:53:35 +11001285.It Cm TrustedUserCAKeys
1286Specifies a file containing public keys of certificate authorities that are
Damien Millerc6db99e2010-03-05 10:41:45 +11001287trusted to sign user certificates for authentication.
Damien Miller72b33822010-03-05 07:39:01 +11001288Keys are listed one per line; empty lines and comments starting with
Damien Miller1aed65e2010-03-04 21:53:35 +11001289.Ql #
1290are allowed.
1291If a certificate is presented for authentication and has its signing CA key
1292listed in this file, then it may be used for authentication for any user
1293listed in the certificate's principals list.
1294Note that certificates that lack a list of principals will not be permitted
1295for authentication using
1296.Cm TrustedUserCAKeys .
Damien Millerfecfd112013-07-18 16:11:50 +10001297For more details on certificates, see the CERTIFICATES section in
Damien Miller1aed65e2010-03-04 21:53:35 +11001298.Xr ssh-keygen 1 .
Damien Miller3a961dc2003-06-03 10:25:48 +10001299.It Cm UseDNS
1300Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001301.Xr sshd 8
Darren Tucker83d5a982005-03-31 21:33:50 +10001302should look up the remote host name and check that
Damien Miller3a961dc2003-06-03 10:25:48 +10001303the resolved host name for the remote IP address maps back to the
1304very same IP address.
1305The default is
1306.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001307.It Cm UseLogin
1308Specifies whether
1309.Xr login 1
1310is used for interactive login sessions.
1311The default is
1312.Dq no .
1313Note that
1314.Xr login 1
1315is never used for remote command execution.
1316Note also, that if this is enabled,
1317.Cm X11Forwarding
1318will be disabled because
1319.Xr login 1
1320does not know how to handle
1321.Xr xauth 1
Damien Miller495dca32003-04-01 21:42:14 +10001322cookies.
1323If
Ben Lindstrom9f049032002-06-21 00:59:05 +00001324.Cm UsePrivilegeSeparation
1325is specified, it will be disabled after authentication.
Damien Miller2e193e22003-05-14 15:13:03 +10001326.It Cm UsePAM
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001327Enables the Pluggable Authentication Module interface.
1328If set to
1329.Dq yes
1330this will enable PAM authentication using
1331.Cm ChallengeResponseAuthentication
Darren Tuckera4904f72006-02-23 21:35:30 +11001332and
1333.Cm PasswordAuthentication
1334in addition to PAM account and session module processing for all
1335authentication types.
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001336.Pp
1337Because PAM challenge-response authentication usually serves an equivalent
1338role to password authentication, you should disable either
1339.Cm PasswordAuthentication
1340or
1341.Cm ChallengeResponseAuthentication.
1342.Pp
1343If
1344.Cm UsePAM
1345is enabled, you will not be able to run
1346.Xr sshd 8
1347as a non-root user.
1348The default is
Darren Tucker6c0c0702003-10-09 14:13:53 +10001349.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001350.It Cm UsePrivilegeSeparation
1351Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001352.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001353separates privileges by creating an unprivileged child process
Damien Miller495dca32003-04-01 21:42:14 +10001354to deal with incoming network traffic.
1355After successful authentication, another process will be created that has
1356the privilege of the authenticated user.
1357The goal of privilege separation is to prevent privilege
Ben Lindstrom9f049032002-06-21 00:59:05 +00001358escalation by containing any corruption within the unprivileged processes.
1359The default is
1360.Dq yes .
Damien Miller69ff1df2011-06-23 08:30:03 +10001361If
1362.Cm UsePrivilegeSeparation
1363is set to
1364.Dq sandbox
1365then the pre-authentication unprivileged process is subject to additional
1366restrictions.
Damien Miller23528812012-04-22 11:24:43 +10001367.It Cm VersionAddendum
1368Optionally specifies additional text to append to the SSH protocol banner
1369sent by the server upon connection.
1370The default is
1371.Dq none .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001372.It Cm X11DisplayOffset
1373Specifies the first display number available for
Damien Miller5b0d63f2006-03-15 11:56:56 +11001374.Xr sshd 8 Ns 's
Ben Lindstrom9f049032002-06-21 00:59:05 +00001375X11 forwarding.
Damien Miller5b0d63f2006-03-15 11:56:56 +11001376This prevents sshd from interfering with real X11 servers.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001377The default is 10.
1378.It Cm X11Forwarding
1379Specifies whether X11 forwarding is permitted.
Damien Miller101c4a72002-09-19 11:51:21 +10001380The argument must be
1381.Dq yes
1382or
1383.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001384The default is
1385.Dq no .
Damien Miller101c4a72002-09-19 11:51:21 +10001386.Pp
1387When X11 forwarding is enabled, there may be additional exposure to
1388the server and to client displays if the
Damien Miller5b0d63f2006-03-15 11:56:56 +11001389.Xr sshd 8
Damien Miller101c4a72002-09-19 11:51:21 +10001390proxy display is configured to listen on the wildcard address (see
1391.Cm X11UseLocalhost
Damien Miller5b0d63f2006-03-15 11:56:56 +11001392below), though this is not the default.
Damien Miller101c4a72002-09-19 11:51:21 +10001393Additionally, the authentication spoofing and authentication data
1394verification and substitution occur on the client side.
1395The security risk of using X11 forwarding is that the client's X11
Damien Miller5b0d63f2006-03-15 11:56:56 +11001396display server may be exposed to attack when the SSH client requests
Damien Miller101c4a72002-09-19 11:51:21 +10001397forwarding (see the warnings for
1398.Cm ForwardX11
1399in
Damien Millerf1ce5052003-06-11 22:04:39 +10001400.Xr ssh_config 5 ) .
Damien Miller101c4a72002-09-19 11:51:21 +10001401A system administrator may have a stance in which they want to
1402protect clients that may expose themselves to attack by unwittingly
1403requesting X11 forwarding, which can warrant a
1404.Dq no
1405setting.
1406.Pp
1407Note that disabling X11 forwarding does not prevent users from
1408forwarding X11 traffic, as users can always install their own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001409X11 forwarding is automatically disabled if
1410.Cm UseLogin
1411is enabled.
1412.It Cm X11UseLocalhost
1413Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001414.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001415should bind the X11 forwarding server to the loopback address or to
Damien Miller495dca32003-04-01 21:42:14 +10001416the wildcard address.
1417By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +11001418sshd binds the forwarding server to the loopback address and sets the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001419hostname part of the
1420.Ev DISPLAY
1421environment variable to
1422.Dq localhost .
Ben Lindstrom15b61202002-08-20 18:44:24 +00001423This prevents remote hosts from connecting to the proxy display.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001424However, some older X11 clients may not function with this
1425configuration.
1426.Cm X11UseLocalhost
1427may be set to
1428.Dq no
1429to specify that the forwarding server should be bound to the wildcard
1430address.
1431The argument must be
1432.Dq yes
1433or
1434.Dq no .
1435The default is
1436.Dq yes .
1437.It Cm XAuthLocation
Damien Miller05913ba2002-09-04 16:51:03 +10001438Specifies the full pathname of the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001439.Xr xauth 1
1440program.
1441The default is
1442.Pa /usr/X11R6/bin/xauth .
1443.El
Damien Millere3beba22006-03-15 11:59:25 +11001444.Sh TIME FORMATS
Damien Millerf4f22b52006-03-15 11:57:25 +11001445.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001446command-line arguments and configuration file options that specify time
1447may be expressed using a sequence of the form:
1448.Sm off
Ben Lindstrom1f8cf4f2002-08-20 18:43:27 +00001449.Ar time Op Ar qualifier ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001450.Sm on
1451where
1452.Ar time
1453is a positive integer value and
1454.Ar qualifier
1455is one of the following:
1456.Pp
1457.Bl -tag -width Ds -compact -offset indent
Damien Miller393821a2006-07-24 14:04:53 +10001458.It Aq Cm none
Ben Lindstrom9f049032002-06-21 00:59:05 +00001459seconds
1460.It Cm s | Cm S
1461seconds
1462.It Cm m | Cm M
1463minutes
1464.It Cm h | Cm H
1465hours
1466.It Cm d | Cm D
1467days
1468.It Cm w | Cm W
1469weeks
1470.El
1471.Pp
1472Each member of the sequence is added together to calculate
1473the total time value.
1474.Pp
1475Time format examples:
1476.Pp
1477.Bl -tag -width Ds -compact -offset indent
1478.It 600
1479600 seconds (10 minutes)
1480.It 10m
148110 minutes
1482.It 1h30m
14831 hour 30 minutes (90 minutes)
1484.El
1485.Sh FILES
1486.Bl -tag -width Ds
1487.It Pa /etc/ssh/sshd_config
1488Contains configuration data for
Damien Millerf4f22b52006-03-15 11:57:25 +11001489.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001490This file should be writable by root only, but it is recommended
1491(though not necessary) that it be world-readable.
1492.El
Damien Millerf1ce5052003-06-11 22:04:39 +10001493.Sh SEE ALSO
1494.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001495.Sh AUTHORS
1496OpenSSH is a derivative of the original and free
1497ssh 1.2.12 release by Tatu Ylonen.
1498Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1499Theo de Raadt and Dug Song
1500removed many bugs, re-added newer features and
1501created OpenSSH.
1502Markus Friedl contributed the support for SSH
1503protocol versions 1.5 and 2.0.
1504Niels Provos and Markus Friedl contributed support
1505for privilege separation.