blob: cec2a023a255f033c8f932ff53c902f33ecf253a [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.org8f6784f2014-12-22 09:05:17 +000036.\" $OpenBSD: sshd_config.5,v 1.188 2014/12/22 09:05:17 djm Exp $
djm@openbsd.orgf69b69b2014-12-22 07:51:30 +000037.Dd $Mdocdate: December 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
djm@openbsd.orgf69b69b2014-12-22 07:51:30 +0000213If the
214.Dq publickey
jmc@openbsd.org449e11b2014-12-22 08:24:17 +0000215method is listed more than once,
djm@openbsd.orgf69b69b2014-12-22 07:51:30 +0000216.Xr sshd 8
217verifies that keys that have been used successfully are not reused for
218subsequent authentications.
219For example, an
220.Cm AuthenticationMethods
221of
222.Dq publickey,publickey
223will require successful authentication using two different public keys.
224.Pp
Damien Millera6e3f012012-11-04 23:21:40 +1100225This option is only available for SSH protocol 2 and will yield a fatal
226error if enabled if protocol 1 is also enabled.
227Note that each authentication method listed should also be explicitly enabled
228in the configuration.
229The default is not to require multiple authentication; successful completion
230of a single authentication method is sufficient.
Damien Miller09d3e122012-10-31 08:58:58 +1100231.It Cm AuthorizedKeysCommand
Damien Millerf33580e2012-11-04 22:22:52 +1100232Specifies a program to be used to look up the user's public keys.
Damien Miller467b00c2013-04-23 15:23:07 +1000233The program must be owned by root and not writable by group or others.
234It will be invoked with a single argument of the username
Damien Miller09d3e122012-10-31 08:58:58 +1100235being authenticated, and should produce on standard output zero or
Damien Millerfecfd112013-07-18 16:11:50 +1000236more lines of authorized_keys output (see AUTHORIZED_KEYS in
Damien Millerf33580e2012-11-04 22:22:52 +1100237.Xr sshd 8 ) .
Damien Miller09d3e122012-10-31 08:58:58 +1100238If a key supplied by AuthorizedKeysCommand does not successfully authenticate
239and authorize the user then public key authentication continues using the usual
240.Cm AuthorizedKeysFile
241files.
242By default, no AuthorizedKeysCommand is run.
243.It Cm AuthorizedKeysCommandUser
244Specifies the user under whose account the AuthorizedKeysCommand is run.
Damien Miller09d3e122012-10-31 08:58:58 +1100245It is recommended to use a dedicated user that has no other role on the host
246than running authorized keys commands.
djm@openbsd.orgf1c4d8e2014-12-22 08:04:23 +0000247If
djm@openbsd.orgd663bea2014-12-11 05:25:06 +0000248.Cm AuthorizedKeysCommand
djm@openbsd.orgf1c4d8e2014-12-22 08:04:23 +0000249is specified but
250.Cm AuthorizedKeysCommandUser
251is not, then
252.Xr sshd 8
253will refuse to start.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000254.It Cm AuthorizedKeysFile
255Specifies the file that contains the public keys that can be used
256for user authentication.
Damien Miller6018a362010-07-02 13:35:19 +1000257The format is described in the
Damien Millerfecfd112013-07-18 16:11:50 +1000258AUTHORIZED_KEYS FILE FORMAT
Damien Miller6018a362010-07-02 13:35:19 +1000259section of
260.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000261.Cm AuthorizedKeysFile
262may contain tokens of the form %T which are substituted during connection
Damien Miller5b0d63f2006-03-15 11:56:56 +1100263setup.
Damien Millerfbf486b2003-05-23 18:44:23 +1000264The following tokens are defined: %% is replaced by a literal '%',
Damien Miller5b0d63f2006-03-15 11:56:56 +1100265%h is replaced by the home directory of the user being authenticated, and
Ben Lindstrom9f049032002-06-21 00:59:05 +0000266%u is replaced by the username of that user.
267After expansion,
268.Cm AuthorizedKeysFile
269is taken to be an absolute path or one relative to the user's home
270directory.
Damien Millerb9132fc2011-05-29 21:41:40 +1000271Multiple files may be listed, separated by whitespace.
272The default is
273.Dq .ssh/authorized_keys .ssh/authorized_keys2 .
Damien Miller30da3442010-05-10 11:58:03 +1000274.It Cm AuthorizedPrincipalsFile
275Specifies a file that lists principal names that are accepted for
276certificate authentication.
277When using certificates signed by a key listed in
278.Cm TrustedUserCAKeys ,
279this file lists names, one of which must appear in the certificate for it
280to be accepted for authentication.
Damien Millerd59dab82010-07-02 13:37:17 +1000281Names are listed one per line preceded by key options (as described
Damien Millerfecfd112013-07-18 16:11:50 +1000282in AUTHORIZED_KEYS FILE FORMAT in
Damien Millerd59dab82010-07-02 13:37:17 +1000283.Xr sshd 8 ) .
Damien Miller6018a362010-07-02 13:35:19 +1000284Empty lines and comments starting with
Damien Miller30da3442010-05-10 11:58:03 +1000285.Ql #
286are ignored.
287.Pp
288.Cm AuthorizedPrincipalsFile
289may contain tokens of the form %T which are substituted during connection
290setup.
291The following tokens are defined: %% is replaced by a literal '%',
292%h is replaced by the home directory of the user being authenticated, and
293%u is replaced by the username of that user.
294After expansion,
295.Cm AuthorizedPrincipalsFile
296is taken to be an absolute path or one relative to the user's home
297directory.
298.Pp
Damien Miller8fef9eb2012-04-22 11:25:10 +1000299The default is
300.Dq none ,
301i.e. not to use a principals file \(en in this case, the username
Damien Miller30da3442010-05-10 11:58:03 +1000302of the user must appear in a certificate's principals list for it to be
303accepted.
304Note that
305.Cm AuthorizedPrincipalsFile
306is only used when authentication proceeds using a CA listed in
307.Cm TrustedUserCAKeys
308and is not consulted for certification authorities trusted via
309.Pa ~/.ssh/authorized_keys ,
310though the
311.Cm principals=
312key option offers a similar facility (see
313.Xr sshd 8
314for details).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000315.It Cm Banner
Ben Lindstrom9f049032002-06-21 00:59:05 +0000316The contents of the specified file are sent to the remote user before
317authentication is allowed.
Damien Miller4890e532007-09-17 11:57:38 +1000318If the argument is
319.Dq none
320then no banner is displayed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000321This option is only available for protocol version 2.
322By default, no banner is displayed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000323.It Cm ChallengeResponseAuthentication
Damien Miller9c7bf8d2009-08-28 10:27:08 +1000324Specifies whether challenge-response authentication is allowed (e.g. via
Damien Millere8c9f262014-10-03 09:24:56 +1000325PAM or through authentication styles supported in
Damien Miller9c7bf8d2009-08-28 10:27:08 +1000326.Xr login.conf 5 )
Ben Lindstrom9f049032002-06-21 00:59:05 +0000327The default is
328.Dq yes .
Damien Millerd8cb1f12008-02-10 22:40:12 +1100329.It Cm ChrootDirectory
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100330Specifies the pathname of a directory to
Damien Millerd8cb1f12008-02-10 22:40:12 +1100331.Xr chroot 2
332to after authentication.
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100333All components of the pathname must be root-owned directories that are
Damien Millerd8cb1f12008-02-10 22:40:12 +1100334not writable by any other user or group.
Darren Tucker51dbe502009-06-21 17:56:51 +1000335After the chroot,
336.Xr sshd 8
337changes the working directory to the user's home directory.
Damien Millerd8cb1f12008-02-10 22:40:12 +1100338.Pp
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100339The pathname may contain the following tokens that are expanded at runtime once
Damien Millerd8cb1f12008-02-10 22:40:12 +1100340the connecting user has been authenticated: %% is replaced by a literal '%',
341%h is replaced by the home directory of the user being authenticated, and
342%u is replaced by the username of that user.
343.Pp
344The
345.Cm ChrootDirectory
346must contain the necessary files and directories to support the
Darren Tuckeraf501cf2009-06-21 17:53:04 +1000347user's session.
Damien Millerd8cb1f12008-02-10 22:40:12 +1100348For an interactive session this requires at least a shell, typically
349.Xr sh 1 ,
350and basic
351.Pa /dev
352nodes such as
353.Xr null 4 ,
354.Xr zero 4 ,
355.Xr stdin 4 ,
356.Xr stdout 4 ,
357.Xr stderr 4 ,
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000358and
Damien Millerd8cb1f12008-02-10 22:40:12 +1100359.Xr tty 4
360devices.
361For file transfer sessions using
Darren Tuckerf92077f2009-06-21 17:56:25 +1000362.Dq sftp ,
Damien Millerd8cb1f12008-02-10 22:40:12 +1100363no additional configuration of the environment is necessary if the
Darren Tuckerf92077f2009-06-21 17:56:25 +1000364in-process sftp server is used,
Damien Miller426117b2014-07-30 12:33:20 +1000365though sessions which use logging may require
Darren Tucker00fcd712009-06-21 17:56:00 +1000366.Pa /dev/log
Damien Miller426117b2014-07-30 12:33:20 +1000367inside the chroot directory on some operating systems (see
Darren Tucker00fcd712009-06-21 17:56:00 +1000368.Xr sftp-server 8
369for details).
Damien Millerd8cb1f12008-02-10 22:40:12 +1100370.Pp
371The default is not to
372.Xr chroot 2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000373.It Cm Ciphers
374Specifies the ciphers allowed for protocol version 2.
375Multiple ciphers must be comma-separated.
Damien Miller0fde8ac2013-11-21 14:12:23 +1100376The supported ciphers are:
377.Pp
Damien Millerc1621c82014-04-20 13:22:46 +1000378.Bl -item -compact -offset indent
379.It
3803des-cbc
381.It
382aes128-cbc
383.It
384aes192-cbc
385.It
386aes256-cbc
387.It
388aes128-ctr
389.It
390aes192-ctr
391.It
392aes256-ctr
393.It
394aes128-gcm@openssh.com
395.It
396aes256-gcm@openssh.com
397.It
398arcfour
399.It
400arcfour128
401.It
402arcfour256
403.It
404blowfish-cbc
405.It
406cast128-cbc
407.It
408chacha20-poly1305@openssh.com
409.El
Damien Miller0fde8ac2013-11-21 14:12:23 +1100410.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +1100411The default is:
Damien Millerc1621c82014-04-20 13:22:46 +1000412.Bd -literal -offset indent
413aes128-ctr,aes192-ctr,aes256-ctr,
Damien Miller1d75abf2013-01-09 16:12:19 +1100414aes128-gcm@openssh.com,aes256-gcm@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +1000415chacha20-poly1305@openssh.com
Ben Lindstrom9f049032002-06-21 00:59:05 +0000416.Ed
Damien Miller0fde8ac2013-11-21 14:12:23 +1100417.Pp
418The list of available ciphers may also be obtained using the
419.Fl Q
420option of
djm@openbsd.org8f6784f2014-12-22 09:05:17 +0000421.Xr ssh 1
422with an argument of
423.Dq cipher .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000424.It Cm ClientAliveCountMax
Damien Millerb7977702006-01-03 18:47:31 +1100425Sets the number of client alive messages (see below) which may be
Ben Lindstrom9f049032002-06-21 00:59:05 +0000426sent without
Damien Miller5b0d63f2006-03-15 11:56:56 +1100427.Xr sshd 8
Damien Millerfbf486b2003-05-23 18:44:23 +1000428receiving any messages back from the client.
429If this threshold is reached while client alive messages are being sent,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100430sshd will disconnect the client, terminating the session.
Damien Millerfbf486b2003-05-23 18:44:23 +1000431It is important to note that the use of client alive messages is very
432different from
Damien Miller12c150e2003-12-17 16:31:10 +1100433.Cm TCPKeepAlive
Damien Millerfbf486b2003-05-23 18:44:23 +1000434(below).
435The client alive messages are sent through the encrypted channel
436and therefore will not be spoofable.
437The TCP keepalive option enabled by
Damien Miller12c150e2003-12-17 16:31:10 +1100438.Cm TCPKeepAlive
Damien Millerfbf486b2003-05-23 18:44:23 +1000439is spoofable.
440The client alive mechanism is valuable when the client or
Ben Lindstrom9f049032002-06-21 00:59:05 +0000441server depend on knowing when a connection has become inactive.
442.Pp
Damien Millerfbf486b2003-05-23 18:44:23 +1000443The default value is 3.
444If
Ben Lindstrom9f049032002-06-21 00:59:05 +0000445.Cm ClientAliveInterval
Damien Millerb7977702006-01-03 18:47:31 +1100446(see below) is set to 15, and
Ben Lindstrom9f049032002-06-21 00:59:05 +0000447.Cm ClientAliveCountMax
Damien Miller5b0d63f2006-03-15 11:56:56 +1100448is left at the default, unresponsive SSH clients
Ben Lindstrom9f049032002-06-21 00:59:05 +0000449will be disconnected after approximately 45 seconds.
Damien Millercc3e8ba2006-03-15 12:06:55 +1100450This option applies to protocol version 2 only.
Damien Miller1594ad52005-05-26 12:12:19 +1000451.It Cm ClientAliveInterval
452Sets a timeout interval in seconds after which if no data has been received
453from the client,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100454.Xr sshd 8
Damien Miller1594ad52005-05-26 12:12:19 +1000455will send a message through the encrypted
456channel to request a response from the client.
457The default
458is 0, indicating that these messages will not be sent to the client.
459This option applies to protocol version 2 only.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000460.It Cm Compression
Damien Miller9786e6e2005-07-26 21:54:56 +1000461Specifies whether compression is allowed, or delayed until
462the user has authenticated successfully.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000463The argument must be
Damien Miller9786e6e2005-07-26 21:54:56 +1000464.Dq yes ,
465.Dq delayed ,
Ben Lindstrom9f049032002-06-21 00:59:05 +0000466or
467.Dq no .
468The default is
Damien Miller9786e6e2005-07-26 21:54:56 +1000469.Dq delayed .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000470.It Cm DenyGroups
471This keyword can be followed by a list of group name patterns, separated
472by spaces.
473Login is disallowed for users whose primary group or supplementary
474group list matches one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000475Only group names are valid; a numerical group ID is not recognized.
476By default, login is allowed for all groups.
Damien Millerac73e512006-03-15 11:58:49 +1100477The allow/deny directives are processed in the following order:
478.Cm DenyUsers ,
479.Cm AllowUsers ,
480.Cm DenyGroups ,
481and finally
482.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100483.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000484See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100485.Xr ssh_config 5
486for more information on patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000487.It Cm DenyUsers
488This keyword can be followed by a list of user name patterns, separated
489by spaces.
490Login is disallowed for user names that match one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000491Only user names are valid; a numerical user ID is not recognized.
492By default, login is allowed for all users.
493If the pattern takes the form USER@HOST then USER and HOST
494are separately checked, restricting logins to particular
495users from particular hosts.
Damien Millerac73e512006-03-15 11:58:49 +1100496The allow/deny directives are processed in the following order:
497.Cm DenyUsers ,
498.Cm AllowUsers ,
499.Cm DenyGroups ,
500and finally
501.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100502.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000503See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100504.Xr ssh_config 5
505for more information on patterns.
djm@openbsd.org56d1c832014-12-21 22:27:55 +0000506.It Cm FingerprintHash
507Specifies the hash algorithm used when logging key fingerprints.
508Valid options are:
509.Dq md5
510and
511.Dq sha256 .
512The default is
513.Dq sha256 .
Damien Millere2754432006-07-24 14:06:47 +1000514.It Cm ForceCommand
515Forces the execution of the command specified by
516.Cm ForceCommand ,
Damien Millera1b48cc2008-03-27 11:02:02 +1100517ignoring any command supplied by the client and
518.Pa ~/.ssh/rc
519if present.
Damien Millere2754432006-07-24 14:06:47 +1000520The command is invoked by using the user's login shell with the -c option.
521This applies to shell, command, or subsystem execution.
522It is most useful inside a
523.Cm Match
524block.
525The command originally supplied by the client is available in the
526.Ev SSH_ORIGINAL_COMMAND
527environment variable.
Damien Millercdb6e652008-02-10 22:47:24 +1100528Specifying a command of
529.Dq internal-sftp
530will force the use of an in-process sftp server that requires no support
531files when used with
532.Cm ChrootDirectory .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000533.It Cm GatewayPorts
534Specifies whether remote hosts are allowed to connect to ports
535forwarded for the client.
536By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100537.Xr sshd 8
Damien Miller495dca32003-04-01 21:42:14 +1000538binds remote port forwardings to the loopback address.
539This prevents other remote hosts from connecting to forwarded ports.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000540.Cm GatewayPorts
Damien Miller5b0d63f2006-03-15 11:56:56 +1100541can be used to specify that sshd
Damien Millerf91ee4c2005-03-01 21:24:33 +1100542should allow remote port forwardings to bind to non-loopback addresses, thus
543allowing other hosts to connect.
544The argument may be
545.Dq no
546to force remote port forwardings to be available to the local host only,
Ben Lindstrom9f049032002-06-21 00:59:05 +0000547.Dq yes
Damien Millerf91ee4c2005-03-01 21:24:33 +1100548to force remote port forwardings to bind to the wildcard address, or
549.Dq clientspecified
550to allow the client to select the address to which the forwarding is bound.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000551The default is
552.Dq no .
Darren Tucker0efd1552003-08-26 11:49:55 +1000553.It Cm GSSAPIAuthentication
Damien Miller9b7b03b2003-09-02 22:57:05 +1000554Specifies whether user authentication based on GSSAPI is allowed.
Damien Millera8e06ce2003-11-21 23:48:55 +1100555The default is
Darren Tucker0efd1552003-08-26 11:49:55 +1000556.Dq no .
557Note that this option applies to protocol version 2 only.
558.It Cm GSSAPICleanupCredentials
559Specifies whether to automatically destroy the user's credentials cache
560on logout.
561The default is
562.Dq yes .
563Note that this option applies to protocol version 2 only.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000564.It Cm HostbasedAuthentication
565Specifies whether rhosts or /etc/hosts.equiv authentication together
566with successful public key client host authentication is allowed
Damien Miller1faa7132006-03-15 11:55:31 +1100567(host-based authentication).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000568This option is similar to
569.Cm RhostsRSAAuthentication
570and applies to protocol version 2 only.
571The default is
572.Dq no .
Damien Millerb594f382006-08-30 11:06:34 +1000573.It Cm HostbasedUsesNameFromPacketOnly
574Specifies whether or not the server will attempt to perform a reverse
575name lookup when matching the name in the
576.Pa ~/.shosts ,
577.Pa ~/.rhosts ,
578and
579.Pa /etc/hosts.equiv
580files during
581.Cm HostbasedAuthentication .
582A setting of
583.Dq yes
584means that
585.Xr sshd 8
586uses the name supplied by the client rather than
587attempting to resolve the name from the TCP connection itself.
588The default is
589.Dq no .
Damien Miller0a80ca12010-02-27 07:55:05 +1100590.It Cm HostCertificate
591Specifies a file containing a public host certificate.
592The certificate's public key must match a private host key already specified
593by
594.Cm HostKey .
595The default behaviour of
596.Xr sshd 8
597is not to load any certificates.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000598.It Cm HostKey
599Specifies a file containing a private host key
600used by SSH.
601The default is
602.Pa /etc/ssh/ssh_host_key
603for protocol version 1, and
Damien Millereb8b60e2010-08-31 22:41:14 +1000604.Pa /etc/ssh/ssh_host_dsa_key ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100605.Pa /etc/ssh/ssh_host_ecdsa_key ,
606.Pa /etc/ssh/ssh_host_ed25519_key
Ben Lindstrom9f049032002-06-21 00:59:05 +0000607and
Damien Millereb8b60e2010-08-31 22:41:14 +1000608.Pa /etc/ssh/ssh_host_rsa_key
Ben Lindstrom9f049032002-06-21 00:59:05 +0000609for protocol version 2.
610Note that
Damien Miller5b0d63f2006-03-15 11:56:56 +1100611.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000612will refuse to use a file if it is group/world-accessible.
613It is possible to have multiple host key files.
614.Dq rsa1
615keys are used for version 1 and
Damien Millereb8b60e2010-08-31 22:41:14 +1000616.Dq dsa ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100617.Dq ecdsa ,
618.Dq ed25519
Ben Lindstrom9f049032002-06-21 00:59:05 +0000619or
620.Dq rsa
621are used for version 2 of the SSH protocol.
Damien Miller85b45e02013-07-20 13:21:52 +1000622It is also possible to specify public host key files instead.
623In this case operations on the private key will be delegated
624to an
625.Xr ssh-agent 1 .
626.It Cm HostKeyAgent
627Identifies the UNIX-domain socket used to communicate
628with an agent that has access to the private host keys.
629If
630.Dq SSH_AUTH_SOCK
631is specified, the location of the socket will be read from the
632.Ev SSH_AUTH_SOCK
633environment variable.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000634.It Cm IgnoreRhosts
635Specifies that
636.Pa .rhosts
637and
638.Pa .shosts
639files will not be used in
Ben Lindstrom9f049032002-06-21 00:59:05 +0000640.Cm RhostsRSAAuthentication
641or
642.Cm HostbasedAuthentication .
643.Pp
644.Pa /etc/hosts.equiv
645and
646.Pa /etc/shosts.equiv
647are still used.
648The default is
649.Dq yes .
650.It Cm IgnoreUserKnownHosts
651Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +1100652.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000653should ignore the user's
Damien Miller167ea5d2005-05-26 12:04:02 +1000654.Pa ~/.ssh/known_hosts
Ben Lindstrom9f049032002-06-21 00:59:05 +0000655during
656.Cm RhostsRSAAuthentication
657or
658.Cm HostbasedAuthentication .
659The default is
660.Dq no .
Damien Miller0dac6fb2010-11-20 15:19:38 +1100661.It Cm IPQoS
662Specifies the IPv4 type-of-service or DSCP class for the connection.
663Accepted values are
664.Dq af11 ,
665.Dq af12 ,
666.Dq af13 ,
Damien Millerf6e758c2011-09-22 21:37:13 +1000667.Dq af21 ,
Damien Miller0dac6fb2010-11-20 15:19:38 +1100668.Dq af22 ,
669.Dq af23 ,
670.Dq af31 ,
671.Dq af32 ,
672.Dq af33 ,
673.Dq af41 ,
674.Dq af42 ,
675.Dq af43 ,
676.Dq cs0 ,
677.Dq cs1 ,
678.Dq cs2 ,
679.Dq cs3 ,
680.Dq cs4 ,
681.Dq cs5 ,
682.Dq cs6 ,
683.Dq cs7 ,
684.Dq ef ,
685.Dq lowdelay ,
686.Dq throughput ,
687.Dq reliability ,
688or a numeric value.
Damien Miller928362d2010-12-26 14:26:45 +1100689This option may take one or two arguments, separated by whitespace.
Damien Miller0dac6fb2010-11-20 15:19:38 +1100690If one argument is specified, it is used as the packet class unconditionally.
691If two values are specified, the first is automatically selected for
692interactive sessions and the second for non-interactive sessions.
693The default is
694.Dq lowdelay
695for interactive sessions and
696.Dq throughput
697for non-interactive sessions.
Damien Millere1e480a2014-02-04 11:13:17 +1100698.It Cm KbdInteractiveAuthentication
699Specifies whether to allow keyboard-interactive authentication.
700The argument to this keyword must be
701.Dq yes
702or
703.Dq no .
704The default is to use whatever value
705.Cm ChallengeResponseAuthentication
706is set to
707(by default
708.Dq yes ) .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000709.It Cm KerberosAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000710Specifies whether the password provided by the user for
Ben Lindstrom9f049032002-06-21 00:59:05 +0000711.Cm PasswordAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000712will be validated through the Kerberos KDC.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000713To use this option, the server needs a
714Kerberos servtab which allows the verification of the KDC's identity.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100715The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000716.Dq no .
Damien Miller8448e662004-03-08 23:13:15 +1100717.It Cm KerberosGetAFSToken
Darren Tuckere2dd2d52005-10-03 18:19:06 +1000718If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
Damien Miller8448e662004-03-08 23:13:15 +1100719an AFS token before accessing the user's home directory.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100720The default is
Damien Miller8448e662004-03-08 23:13:15 +1100721.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000722.It Cm KerberosOrLocalPasswd
Damien Miller5b0d63f2006-03-15 11:56:56 +1100723If password authentication through Kerberos fails then
Ben Lindstrom9f049032002-06-21 00:59:05 +0000724the password will be validated via any additional local mechanism
725such as
726.Pa /etc/passwd .
Damien Miller5b0d63f2006-03-15 11:56:56 +1100727The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000728.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000729.It Cm KerberosTicketCleanup
730Specifies whether to automatically destroy the user's ticket cache
731file on logout.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100732The default is
Ben Lindstrom9f049032002-06-21 00:59:05 +0000733.Dq yes .
Damien Millerd5f62bf2010-09-24 22:11:14 +1000734.It Cm KexAlgorithms
735Specifies the available KEX (Key Exchange) algorithms.
736Multiple algorithms must be comma-separated.
Damien Millerc1621c82014-04-20 13:22:46 +1000737The supported algorithms are:
738.Pp
739.Bl -item -compact -offset indent
740.It
741curve25519-sha256@libssh.org
742.It
743diffie-hellman-group1-sha1
744.It
745diffie-hellman-group14-sha1
746.It
747diffie-hellman-group-exchange-sha1
748.It
749diffie-hellman-group-exchange-sha256
750.It
751ecdh-sha2-nistp256
752.It
753ecdh-sha2-nistp384
754.It
755ecdh-sha2-nistp521
756.El
757.Pp
758The default is:
Damien Miller6575c3a2013-12-18 17:47:02 +1100759.Bd -literal -offset indent
760curve25519-sha256@libssh.org,
761ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
762diffie-hellman-group-exchange-sha256,
Damien Millerc1621c82014-04-20 13:22:46 +1000763diffie-hellman-group14-sha1
Damien Miller6575c3a2013-12-18 17:47:02 +1100764.Ed
djm@openbsd.org8f6784f2014-12-22 09:05:17 +0000765.Pp
766The list of available key exchange algorithms may also be obtained using the
767.Fl Q
768option of
769.Xr ssh 1
770with an argument of
771.Dq kex .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000772.It Cm KeyRegenerationInterval
773In protocol version 1, the ephemeral server key is automatically regenerated
774after this many seconds (if it has been used).
775The purpose of regeneration is to prevent
776decrypting captured sessions by later breaking into the machine and
777stealing the keys.
778The key is never stored anywhere.
779If the value is 0, the key is never regenerated.
780The default is 3600 (seconds).
781.It Cm ListenAddress
782Specifies the local addresses
Damien Miller5b0d63f2006-03-15 11:56:56 +1100783.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000784should listen on.
785The following forms may be used:
786.Pp
787.Bl -item -offset indent -compact
788.It
789.Cm ListenAddress
790.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000791.Ar host | Ar IPv4_addr | Ar IPv6_addr
Ben Lindstrom9f049032002-06-21 00:59:05 +0000792.Sm on
793.It
794.Cm ListenAddress
795.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000796.Ar host | Ar IPv4_addr : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000797.Sm on
798.It
799.Cm ListenAddress
800.Sm off
801.Oo
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000802.Ar host | Ar IPv6_addr Oc : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000803.Sm on
804.El
805.Pp
806If
807.Ar port
808is not specified,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100809sshd will listen on the address and all prior
Ben Lindstrom9f049032002-06-21 00:59:05 +0000810.Cm Port
Damien Millerfbf486b2003-05-23 18:44:23 +1000811options specified.
812The default is to listen on all local addresses.
Damien Miller495dca32003-04-01 21:42:14 +1000813Multiple
Ben Lindstrom9f049032002-06-21 00:59:05 +0000814.Cm ListenAddress
Damien Millerfbf486b2003-05-23 18:44:23 +1000815options are permitted.
816Additionally, any
Ben Lindstrom9f049032002-06-21 00:59:05 +0000817.Cm Port
Damien Miller5b0d63f2006-03-15 11:56:56 +1100818options must precede this option for non-port qualified addresses.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000819.It Cm LoginGraceTime
820The server disconnects after this time if the user has not
821successfully logged in.
822If the value is 0, there is no time limit.
Damien Millerc1348632002-09-05 14:35:14 +1000823The default is 120 seconds.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000824.It Cm LogLevel
825Gives the verbosity level that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +1100826.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000827The possible values are:
Damien Miller5b0d63f2006-03-15 11:56:56 +1100828QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
Damien Miller495dca32003-04-01 21:42:14 +1000829The default is INFO.
830DEBUG and DEBUG1 are equivalent.
831DEBUG2 and DEBUG3 each specify higher levels of debugging output.
832Logging with a DEBUG level violates the privacy of users and is not recommended.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000833.It Cm MACs
834Specifies the available MAC (message authentication code) algorithms.
835The MAC algorithm is used in protocol version 2
836for data integrity protection.
837Multiple algorithms must be comma-separated.
Damien Milleraf43a7a2012-12-12 10:46:31 +1100838The algorithms that contain
839.Dq -etm
840calculate the MAC after encryption (encrypt-then-mac).
841These are considered safer and their use recommended.
Damien Millerc1621c82014-04-20 13:22:46 +1000842The supported MACs are:
843.Pp
844.Bl -item -compact -offset indent
845.It
846hmac-md5
847.It
848hmac-md5-96
849.It
850hmac-ripemd160
851.It
852hmac-sha1
853.It
854hmac-sha1-96
855.It
856hmac-sha2-256
857.It
858hmac-sha2-512
859.It
860umac-64@openssh.com
861.It
862umac-128@openssh.com
863.It
864hmac-md5-etm@openssh.com
865.It
866hmac-md5-96-etm@openssh.com
867.It
868hmac-ripemd160-etm@openssh.com
869.It
870hmac-sha1-etm@openssh.com
871.It
872hmac-sha1-96-etm@openssh.com
873.It
874hmac-sha2-256-etm@openssh.com
875.It
876hmac-sha2-512-etm@openssh.com
877.It
878umac-64-etm@openssh.com
879.It
880umac-128-etm@openssh.com
881.El
882.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +1100883The default is:
Damien Miller22b7b492007-06-11 14:07:12 +1000884.Bd -literal -offset indent
Damien Milleraf43a7a2012-12-12 10:46:31 +1100885umac-64-etm@openssh.com,umac-128-etm@openssh.com,
886hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +1000887umac-64@openssh.com,umac-128@openssh.com,
888hmac-sha2-256,hmac-sha2-512
Damien Miller22b7b492007-06-11 14:07:12 +1000889.Ed
djm@openbsd.org8f6784f2014-12-22 09:05:17 +0000890.Pp
891The list of available MAC algorithms may also be obtained using the
892.Fl Q
893option of
894.Xr ssh 1
895with an argument of
896.Dq mac .
Darren Tucker45150472006-07-12 22:34:17 +1000897.It Cm Match
Damien Millerd04f3572006-07-24 13:46:50 +1000898Introduces a conditional block.
Damien Miller8c234032006-07-24 14:05:08 +1000899If all of the criteria on the
Darren Tucker45150472006-07-12 22:34:17 +1000900.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +1000901line are satisfied, the keywords on the following lines override those
902set in the global section of the config file, until either another
Darren Tucker45150472006-07-12 22:34:17 +1000903.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +1000904line or the end of the file.
Damien Millerfc5d6752014-02-28 10:01:28 +1100905If a keyword appears in multiple
906.Cm Match
sobrado@openbsd.org180bcb42014-08-30 16:32:25 +0000907blocks that are satisfied, only the first instance of the keyword is
Damien Millerfc5d6752014-02-28 10:01:28 +1100908applied.
Darren Tucker7a3935d2008-06-10 22:59:10 +1000909.Pp
Damien Millerd04f3572006-07-24 13:46:50 +1000910The arguments to
Darren Tucker45150472006-07-12 22:34:17 +1000911.Cm Match
Damien Millercf31f382013-10-24 21:02:56 +1100912are one or more criteria-pattern pairs or the single token
913.Cm All
914which matches all criteria.
Darren Tucker45150472006-07-12 22:34:17 +1000915The available criteria are
916.Cm User ,
Damien Miller565ca3f2006-08-19 00:23:15 +1000917.Cm Group ,
Darren Tucker45150472006-07-12 22:34:17 +1000918.Cm Host ,
Darren Tuckerfbcf8272012-05-19 19:37:01 +1000919.Cm LocalAddress ,
920.Cm LocalPort ,
Darren Tucker45150472006-07-12 22:34:17 +1000921and
922.Cm Address .
Darren Tucker7a3935d2008-06-10 22:59:10 +1000923The match patterns may consist of single entries or comma-separated
924lists and may use the wildcard and negation operators described in the
Damien Millerfecfd112013-07-18 16:11:50 +1000925PATTERNS section of
Darren Tuckerb06cc4a2008-06-10 22:59:53 +1000926.Xr ssh_config 5 .
Darren Tucker7a3935d2008-06-10 22:59:10 +1000927.Pp
928The patterns in an
929.Cm Address
930criteria may additionally contain addresses to match in CIDR
Darren Tucker6a2a4002008-06-10 23:03:04 +1000931address/masklen format, e.g.\&
Darren Tucker7a3935d2008-06-10 22:59:10 +1000932.Dq 192.0.2.0/24
933or
934.Dq 3ffe:ffff::/32 .
935Note that the mask length provided must be consistent with the address -
936it is an error to specify a mask length that is too long for the address
Darren Tucker6a2a4002008-06-10 23:03:04 +1000937or one with bits set in this host portion of the address.
938For example,
Darren Tucker7a3935d2008-06-10 22:59:10 +1000939.Dq 192.0.2.0/33
940and
Darren Tucker6a2a4002008-06-10 23:03:04 +1000941.Dq 192.0.2.0/8
Darren Tucker7a3935d2008-06-10 22:59:10 +1000942respectively.
943.Pp
Darren Tucker45150472006-07-12 22:34:17 +1000944Only a subset of keywords may be used on the lines following a
945.Cm Match
946keyword.
947Available keywords are
Damien Millerf8268502012-06-20 21:54:15 +1000948.Cm AcceptEnv ,
Damien Miller17819012009-01-28 16:20:17 +1100949.Cm AllowAgentForwarding ,
Damien Millerf8268502012-06-20 21:54:15 +1000950.Cm AllowGroups ,
Damien Miller9b439df2006-07-24 14:04:00 +1000951.Cm AllowTcpForwarding ,
Damien Millerc24da772012-06-20 21:53:58 +1000952.Cm AllowUsers ,
Damien Millera6e3f012012-11-04 23:21:40 +1100953.Cm AuthenticationMethods ,
Damien Miller09d3e122012-10-31 08:58:58 +1100954.Cm AuthorizedKeysCommand ,
955.Cm AuthorizedKeysCommandUser ,
Damien Millerf33580e2012-11-04 22:22:52 +1100956.Cm AuthorizedKeysFile ,
Damien Millerab6de352010-06-26 09:38:45 +1000957.Cm AuthorizedPrincipalsFile ,
Darren Tucker1629c072007-02-19 22:25:37 +1100958.Cm Banner ,
Damien Miller797e3d12008-05-19 14:27:42 +1000959.Cm ChrootDirectory ,
Damien Millerc24da772012-06-20 21:53:58 +1000960.Cm DenyGroups ,
961.Cm DenyUsers ,
Damien Millere2754432006-07-24 14:06:47 +1000962.Cm ForceCommand ,
Damien Millerc24da772012-06-20 21:53:58 +1000963.Cm GatewayPorts ,
Damien Millerf8268502012-06-20 21:54:15 +1000964.Cm GSSAPIAuthentication ,
Damien Miller25434de2008-05-19 14:29:08 +1000965.Cm HostbasedAuthentication ,
Damien Millerab6de352010-06-26 09:38:45 +1000966.Cm HostbasedUsesNameFromPacketOnly ,
Darren Tucker1d75f222007-03-01 21:31:28 +1100967.Cm KbdInteractiveAuthentication ,
Damien Miller5737e362007-03-06 21:21:18 +1100968.Cm KerberosAuthentication ,
Damien Miller307c1d12008-06-16 07:56:20 +1000969.Cm MaxAuthTries ,
Damien Millerc62a5af2008-06-16 07:55:46 +1000970.Cm MaxSessions ,
Darren Tucker1629c072007-02-19 22:25:37 +1100971.Cm PasswordAuthentication ,
Damien Miller51bde602008-11-03 19:23:10 +1100972.Cm PermitEmptyPasswords ,
Damien Millerd1de9952006-07-24 14:05:48 +1000973.Cm PermitOpen ,
Darren Tucker15f94272008-01-01 20:36:56 +1100974.Cm PermitRootLogin ,
Damien Miller5ff30c62013-10-30 22:21:50 +1100975.Cm PermitTTY ,
Damien Millerab6de352010-06-26 09:38:45 +1000976.Cm PermitTunnel ,
Damien Miller72e6b5c2014-07-04 09:00:04 +1000977.Cm PermitUserRC ,
Darren Tucker1477ea12009-10-07 08:36:05 +1100978.Cm PubkeyAuthentication ,
Darren Tucker5f96f3b2013-05-16 20:29:28 +1000979.Cm RekeyLimit ,
Damien Millerc24da772012-06-20 21:53:58 +1000980.Cm RhostsRSAAuthentication ,
Damien Millerf8268502012-06-20 21:54:15 +1000981.Cm RSAAuthentication ,
Damien Millerd1de9952006-07-24 14:05:48 +1000982.Cm X11DisplayOffset ,
Damien Miller19913842009-02-23 10:53:58 +1100983.Cm X11Forwarding
Darren Tucker45150472006-07-12 22:34:17 +1000984and
Damien Miller0296ae82009-02-23 11:00:24 +1100985.Cm X11UseLocalHost .
Darren Tucker89413db2004-05-24 10:36:23 +1000986.It Cm MaxAuthTries
987Specifies the maximum number of authentication attempts permitted per
Damien Miller26213e52004-06-30 22:39:34 +1000988connection.
989Once the number of failures reaches half this value,
990additional failures are logged.
991The default is 6.
Damien Miller7207f642008-05-19 15:34:50 +1000992.It Cm MaxSessions
993Specifies the maximum number of open sessions permitted per network connection.
994The default is 10.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000995.It Cm MaxStartups
996Specifies the maximum number of concurrent unauthenticated connections to the
Damien Miller5b0d63f2006-03-15 11:56:56 +1100997SSH daemon.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000998Additional connections will be dropped until authentication succeeds or the
999.Cm LoginGraceTime
1000expires for a connection.
Damien Miller1f583df2013-02-12 11:02:08 +11001001The default is 10:30:100.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001002.Pp
1003Alternatively, random early drop can be enabled by specifying
1004the three colon separated values
1005.Dq start:rate:full
Damien Miller208f1ed2006-03-15 11:56:03 +11001006(e.g. "10:30:60").
Damien Millerf4f22b52006-03-15 11:57:25 +11001007.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001008will refuse connection attempts with a probability of
1009.Dq rate/100
1010(30%)
1011if there are currently
1012.Dq start
1013(10)
1014unauthenticated connections.
1015The probability increases linearly and all connection attempts
1016are refused if the number of unauthenticated connections reaches
1017.Dq full
1018(60).
1019.It Cm PasswordAuthentication
1020Specifies whether password authentication is allowed.
1021The default is
1022.Dq yes .
1023.It Cm PermitEmptyPasswords
1024When password authentication is allowed, it specifies whether the
1025server allows login to accounts with empty password strings.
1026The default is
1027.Dq no .
Damien Miller9b439df2006-07-24 14:04:00 +10001028.It Cm PermitOpen
1029Specifies the destinations to which TCP port forwarding is permitted.
1030The forwarding specification must be one of the following forms:
1031.Pp
1032.Bl -item -offset indent -compact
1033.It
1034.Cm PermitOpen
1035.Sm off
1036.Ar host : port
1037.Sm on
1038.It
1039.Cm PermitOpen
1040.Sm off
1041.Ar IPv4_addr : port
1042.Sm on
1043.It
1044.Cm PermitOpen
1045.Sm off
1046.Ar \&[ IPv6_addr \&] : port
1047.Sm on
1048.El
1049.Pp
Damien Millera765cf42006-07-24 14:08:13 +10001050Multiple forwards may be specified by separating them with whitespace.
Damien Miller9b439df2006-07-24 14:04:00 +10001051An argument of
1052.Dq any
1053can be used to remove all restrictions and permit any forwarding requests.
Darren Tuckerba9ea322012-05-19 19:37:33 +10001054An argument of
1055.Dq none
1056can be used to prohibit all forwarding requests.
Damien Miller65bc2c42006-07-24 14:04:16 +10001057By default all port forwarding requests are permitted.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001058.It Cm PermitRootLogin
Darren Tuckerb3509012005-01-20 11:01:46 +11001059Specifies whether root can log in using
Ben Lindstrom9f049032002-06-21 00:59:05 +00001060.Xr ssh 1 .
1061The argument must be
1062.Dq yes ,
1063.Dq without-password ,
Damien Miller5b0d63f2006-03-15 11:56:56 +11001064.Dq forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001065or
1066.Dq no .
1067The default is
1068.Dq yes .
1069.Pp
1070If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001071.Dq without-password ,
Darren Tucker9dca0992005-02-01 19:16:45 +11001072password authentication is disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001073.Pp
1074If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001075.Dq forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001076root login with public key authentication will be allowed,
1077but only if the
1078.Ar command
1079option has been specified
1080(which may be useful for taking remote backups even if root login is
Damien Millerfbf486b2003-05-23 18:44:23 +10001081normally not allowed).
1082All other authentication methods are disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001083.Pp
1084If this option is set to
Damien Miller5b0d63f2006-03-15 11:56:56 +11001085.Dq no ,
Darren Tuckerb3509012005-01-20 11:01:46 +11001086root is not allowed to log in.
Damien Millerd27b9472005-12-13 19:29:02 +11001087.It Cm PermitTunnel
1088Specifies whether
1089.Xr tun 4
1090device forwarding is allowed.
Damien Miller7b58e802005-12-13 19:33:19 +11001091The argument must be
1092.Dq yes ,
Damien Miller991dba42006-07-10 20:16:27 +10001093.Dq point-to-point
1094(layer 3),
1095.Dq ethernet
1096(layer 2), or
Damien Miller7b58e802005-12-13 19:33:19 +11001097.Dq no .
Damien Miller991dba42006-07-10 20:16:27 +10001098Specifying
1099.Dq yes
1100permits both
1101.Dq point-to-point
1102and
1103.Dq ethernet .
Damien Millerd27b9472005-12-13 19:29:02 +11001104The default is
1105.Dq no .
djm@openbsd.org48dffd52014-09-09 09:45:36 +00001106.Pp
1107Independent of this setting, the permissions of the selected
1108.Xr tun 4
1109device must allow access to the user.
Damien Miller5ff30c62013-10-30 22:21:50 +11001110.It Cm PermitTTY
1111Specifies whether
Damien Miller63857c92013-10-30 22:31:06 +11001112.Xr pty 4
Damien Miller5ff30c62013-10-30 22:21:50 +11001113allocation is permitted.
1114The default is
1115.Dq yes .
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001116.It Cm PermitUserEnvironment
1117Specifies whether
1118.Pa ~/.ssh/environment
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001119and
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001120.Cm environment=
1121options in
1122.Pa ~/.ssh/authorized_keys
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001123are processed by
Damien Miller5b0d63f2006-03-15 11:56:56 +11001124.Xr sshd 8 .
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001125The default is
1126.Dq no .
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001127Enabling environment processing may enable users to bypass access
1128restrictions in some configurations using mechanisms such as
1129.Ev LD_PRELOAD .
Damien Miller72e6b5c2014-07-04 09:00:04 +10001130.It Cm PermitUserRC
1131Specifies whether any
1132.Pa ~/.ssh/rc
1133file is executed.
1134The default is
1135.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001136.It Cm PidFile
Ben Lindstrom959de992002-06-23 00:35:25 +00001137Specifies the file that contains the process ID of the
Damien Millerf4f22b52006-03-15 11:57:25 +11001138SSH daemon.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001139The default is
1140.Pa /var/run/sshd.pid .
1141.It Cm Port
1142Specifies the port number that
Damien Miller5b0d63f2006-03-15 11:56:56 +11001143.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001144listens on.
1145The default is 22.
1146Multiple options of this type are permitted.
1147See also
1148.Cm ListenAddress .
1149.It Cm PrintLastLog
1150Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001151.Xr sshd 8
Darren Tucker7cc5c232004-11-05 20:06:59 +11001152should print the date and time of the last user login when a user logs
1153in interactively.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001154The default is
1155.Dq yes .
1156.It Cm PrintMotd
1157Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001158.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001159should print
1160.Pa /etc/motd
1161when a user logs in interactively.
1162(On some systems it is also printed by the shell,
1163.Pa /etc/profile ,
1164or equivalent.)
1165The default is
1166.Dq yes .
1167.It Cm Protocol
1168Specifies the protocol versions
Damien Miller5b0d63f2006-03-15 11:56:56 +11001169.Xr sshd 8
Ben Lindstrom9c445542002-07-11 03:59:18 +00001170supports.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001171The possible values are
Damien Miller5b0d63f2006-03-15 11:56:56 +11001172.Sq 1
Ben Lindstrom9f049032002-06-21 00:59:05 +00001173and
Damien Miller5b0d63f2006-03-15 11:56:56 +11001174.Sq 2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001175Multiple versions must be comma-separated.
1176The default is
Darren Tucker7a4a7652009-10-11 21:51:40 +11001177.Sq 2 .
Ben Lindstrom9c445542002-07-11 03:59:18 +00001178Note that the order of the protocol list does not indicate preference,
1179because the client selects among multiple protocol versions offered
1180by the server.
1181Specifying
1182.Dq 2,1
1183is identical to
1184.Dq 1,2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001185.It Cm PubkeyAuthentication
1186Specifies whether public key authentication is allowed.
1187The default is
1188.Dq yes .
1189Note that this option applies to protocol version 2 only.
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001190.It Cm RekeyLimit
1191Specifies the maximum amount of data that may be transmitted before the
1192session key is renegotiated, optionally followed a maximum amount of
1193time that may pass before the session key is renegotiated.
1194The first argument is specified in bytes and may have a suffix of
1195.Sq K ,
1196.Sq M ,
1197or
1198.Sq G
1199to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1200The default is between
1201.Sq 1G
1202and
1203.Sq 4G ,
1204depending on the cipher.
1205The optional second value is specified in seconds and may use any of the
1206units documented in the
1207.Sx TIME FORMATS
Darren Tucker64d22942013-05-16 20:31:29 +10001208section.
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001209The default value for
1210.Cm RekeyLimit
1211is
1212.Dq default none ,
1213which means that rekeying is performed after the cipher's default amount
1214of data has been sent or received and no time based rekeying is done.
1215This option applies to protocol version 2 only.
Damien Miller1aed65e2010-03-04 21:53:35 +11001216.It Cm RevokedKeys
Damien Millerf3747bf2013-01-18 11:44:04 +11001217Specifies revoked public keys.
Damien Miller1aed65e2010-03-04 21:53:35 +11001218Keys listed in this file will be refused for public key authentication.
1219Note that if this file is not readable, then public key authentication will
1220be refused for all users.
Damien Millerf3747bf2013-01-18 11:44:04 +11001221Keys may be specified as a text file, listing one public key per line, or as
1222an OpenSSH Key Revocation List (KRL) as generated by
Damien Miller72abeb72013-01-20 22:33:44 +11001223.Xr ssh-keygen 1 .
Damien Millerfecfd112013-07-18 16:11:50 +10001224For more information on KRLs, see the KEY REVOCATION LISTS section in
Damien Millerf3747bf2013-01-18 11:44:04 +11001225.Xr ssh-keygen 1 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001226.It Cm RhostsRSAAuthentication
1227Specifies whether rhosts or /etc/hosts.equiv authentication together
1228with successful RSA host authentication is allowed.
1229The default is
1230.Dq no .
1231This option applies to protocol version 1 only.
1232.It Cm RSAAuthentication
1233Specifies whether pure RSA authentication is allowed.
1234The default is
1235.Dq yes .
1236This option applies to protocol version 1 only.
1237.It Cm ServerKeyBits
1238Defines the number of bits in the ephemeral protocol version 1 server key.
Darren Tucker7499b0c2008-07-02 22:35:43 +10001239The minimum value is 512, and the default is 1024.
Damien Miller7acefbb2014-07-18 14:11:24 +10001240.It Cm StreamLocalBindMask
1241Sets the octal file creation mode mask
1242.Pq umask
1243used when creating a Unix-domain socket file for local or remote
1244port forwarding.
1245This option is only used for port forwarding to a Unix-domain socket file.
1246.Pp
1247The default value is 0177, which creates a Unix-domain socket file that is
1248readable and writable only by the owner.
1249Note that not all operating systems honor the file mode on Unix-domain
1250socket files.
1251.It Cm StreamLocalBindUnlink
1252Specifies whether to remove an existing Unix-domain socket file for local
1253or remote port forwarding before creating a new one.
1254If the socket file already exists and
1255.Cm StreamLocalBindUnlink
1256is not enabled,
1257.Nm sshd
1258will be unable to forward the port to the Unix-domain socket file.
1259This option is only used for port forwarding to a Unix-domain socket file.
1260.Pp
1261The argument must be
1262.Dq yes
1263or
1264.Dq no .
1265The default is
1266.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001267.It Cm StrictModes
1268Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001269.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001270should check file modes and ownership of the
1271user's files and home directory before accepting login.
1272This is normally desirable because novices sometimes accidentally leave their
1273directory or files world-writable.
1274The default is
1275.Dq yes .
Darren Tuckerf788a912010-01-08 17:06:47 +11001276Note that this does not apply to
1277.Cm ChrootDirectory ,
1278whose permissions and ownership are checked unconditionally.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001279.It Cm Subsystem
Damien Miller208f1ed2006-03-15 11:56:03 +11001280Configures an external subsystem (e.g. file transfer daemon).
Damien Miller917f9b62006-07-10 20:36:47 +10001281Arguments should be a subsystem name and a command (with optional arguments)
1282to execute upon subsystem request.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001283.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001284The command
1285.Xr sftp-server 8
1286implements the
1287.Dq sftp
1288file transfer subsystem.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001289.Pp
1290Alternately the name
1291.Dq internal-sftp
1292implements an in-process
1293.Dq sftp
1294server.
1295This may simplify configurations using
1296.Cm ChrootDirectory
1297to force a different filesystem root on clients.
1298.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001299By default no subsystems are defined.
1300Note that this option applies to protocol version 2 only.
1301.It Cm SyslogFacility
1302Gives the facility code that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +11001303.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001304The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1305LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1306The default is AUTH.
Damien Miller12c150e2003-12-17 16:31:10 +11001307.It Cm TCPKeepAlive
1308Specifies whether the system should send TCP keepalive messages to the
1309other side.
1310If they are sent, death of the connection or crash of one
1311of the machines will be properly noticed.
1312However, this means that
1313connections will die if the route is down temporarily, and some people
1314find it annoying.
1315On the other hand, if TCP keepalives are not sent,
1316sessions may hang indefinitely on the server, leaving
1317.Dq ghost
1318users and consuming server resources.
1319.Pp
1320The default is
1321.Dq yes
1322(to send TCP keepalive messages), and the server will notice
1323if the network goes down or the client host crashes.
1324This avoids infinitely hanging sessions.
1325.Pp
1326To disable TCP keepalive messages, the value should be set to
1327.Dq no .
Damien Miller1aed65e2010-03-04 21:53:35 +11001328.It Cm TrustedUserCAKeys
1329Specifies a file containing public keys of certificate authorities that are
Damien Millerc6db99e2010-03-05 10:41:45 +11001330trusted to sign user certificates for authentication.
Damien Miller72b33822010-03-05 07:39:01 +11001331Keys are listed one per line; empty lines and comments starting with
Damien Miller1aed65e2010-03-04 21:53:35 +11001332.Ql #
1333are allowed.
1334If a certificate is presented for authentication and has its signing CA key
1335listed in this file, then it may be used for authentication for any user
1336listed in the certificate's principals list.
1337Note that certificates that lack a list of principals will not be permitted
1338for authentication using
1339.Cm TrustedUserCAKeys .
Damien Millerfecfd112013-07-18 16:11:50 +10001340For more details on certificates, see the CERTIFICATES section in
Damien Miller1aed65e2010-03-04 21:53:35 +11001341.Xr ssh-keygen 1 .
Damien Miller3a961dc2003-06-03 10:25:48 +10001342.It Cm UseDNS
1343Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001344.Xr sshd 8
Darren Tucker83d5a982005-03-31 21:33:50 +10001345should look up the remote host name and check that
Damien Miller3a961dc2003-06-03 10:25:48 +10001346the resolved host name for the remote IP address maps back to the
1347very same IP address.
1348The default is
1349.Dq yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001350.It Cm UseLogin
1351Specifies whether
1352.Xr login 1
1353is used for interactive login sessions.
1354The default is
1355.Dq no .
1356Note that
1357.Xr login 1
1358is never used for remote command execution.
1359Note also, that if this is enabled,
1360.Cm X11Forwarding
1361will be disabled because
1362.Xr login 1
1363does not know how to handle
1364.Xr xauth 1
Damien Miller495dca32003-04-01 21:42:14 +10001365cookies.
1366If
Ben Lindstrom9f049032002-06-21 00:59:05 +00001367.Cm UsePrivilegeSeparation
1368is specified, it will be disabled after authentication.
Damien Miller2e193e22003-05-14 15:13:03 +10001369.It Cm UsePAM
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001370Enables the Pluggable Authentication Module interface.
1371If set to
1372.Dq yes
1373this will enable PAM authentication using
1374.Cm ChallengeResponseAuthentication
Darren Tuckera4904f72006-02-23 21:35:30 +11001375and
1376.Cm PasswordAuthentication
1377in addition to PAM account and session module processing for all
1378authentication types.
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001379.Pp
1380Because PAM challenge-response authentication usually serves an equivalent
1381role to password authentication, you should disable either
1382.Cm PasswordAuthentication
1383or
1384.Cm ChallengeResponseAuthentication.
1385.Pp
1386If
1387.Cm UsePAM
1388is enabled, you will not be able to run
1389.Xr sshd 8
1390as a non-root user.
1391The default is
Darren Tucker6c0c0702003-10-09 14:13:53 +10001392.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001393.It Cm UsePrivilegeSeparation
1394Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001395.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001396separates privileges by creating an unprivileged child process
Damien Miller495dca32003-04-01 21:42:14 +10001397to deal with incoming network traffic.
1398After successful authentication, another process will be created that has
1399the privilege of the authenticated user.
1400The goal of privilege separation is to prevent privilege
Ben Lindstrom9f049032002-06-21 00:59:05 +00001401escalation by containing any corruption within the unprivileged processes.
1402The default is
1403.Dq yes .
Damien Miller69ff1df2011-06-23 08:30:03 +10001404If
1405.Cm UsePrivilegeSeparation
1406is set to
1407.Dq sandbox
1408then the pre-authentication unprivileged process is subject to additional
1409restrictions.
Damien Miller23528812012-04-22 11:24:43 +10001410.It Cm VersionAddendum
1411Optionally specifies additional text to append to the SSH protocol banner
1412sent by the server upon connection.
1413The default is
1414.Dq none .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001415.It Cm X11DisplayOffset
1416Specifies the first display number available for
Damien Miller5b0d63f2006-03-15 11:56:56 +11001417.Xr sshd 8 Ns 's
Ben Lindstrom9f049032002-06-21 00:59:05 +00001418X11 forwarding.
Damien Miller5b0d63f2006-03-15 11:56:56 +11001419This prevents sshd from interfering with real X11 servers.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001420The default is 10.
1421.It Cm X11Forwarding
1422Specifies whether X11 forwarding is permitted.
Damien Miller101c4a72002-09-19 11:51:21 +10001423The argument must be
1424.Dq yes
1425or
1426.Dq no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001427The default is
1428.Dq no .
Damien Miller101c4a72002-09-19 11:51:21 +10001429.Pp
1430When X11 forwarding is enabled, there may be additional exposure to
1431the server and to client displays if the
Damien Miller5b0d63f2006-03-15 11:56:56 +11001432.Xr sshd 8
Damien Miller101c4a72002-09-19 11:51:21 +10001433proxy display is configured to listen on the wildcard address (see
1434.Cm X11UseLocalhost
Damien Miller5b0d63f2006-03-15 11:56:56 +11001435below), though this is not the default.
Damien Miller101c4a72002-09-19 11:51:21 +10001436Additionally, the authentication spoofing and authentication data
1437verification and substitution occur on the client side.
1438The security risk of using X11 forwarding is that the client's X11
Damien Miller5b0d63f2006-03-15 11:56:56 +11001439display server may be exposed to attack when the SSH client requests
Damien Miller101c4a72002-09-19 11:51:21 +10001440forwarding (see the warnings for
1441.Cm ForwardX11
1442in
Damien Millerf1ce5052003-06-11 22:04:39 +10001443.Xr ssh_config 5 ) .
Damien Miller101c4a72002-09-19 11:51:21 +10001444A system administrator may have a stance in which they want to
1445protect clients that may expose themselves to attack by unwittingly
1446requesting X11 forwarding, which can warrant a
1447.Dq no
1448setting.
1449.Pp
1450Note that disabling X11 forwarding does not prevent users from
1451forwarding X11 traffic, as users can always install their own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001452X11 forwarding is automatically disabled if
1453.Cm UseLogin
1454is enabled.
1455.It Cm X11UseLocalhost
1456Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001457.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001458should bind the X11 forwarding server to the loopback address or to
Damien Miller495dca32003-04-01 21:42:14 +10001459the wildcard address.
1460By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +11001461sshd binds the forwarding server to the loopback address and sets the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001462hostname part of the
1463.Ev DISPLAY
1464environment variable to
1465.Dq localhost .
Ben Lindstrom15b61202002-08-20 18:44:24 +00001466This prevents remote hosts from connecting to the proxy display.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001467However, some older X11 clients may not function with this
1468configuration.
1469.Cm X11UseLocalhost
1470may be set to
1471.Dq no
1472to specify that the forwarding server should be bound to the wildcard
1473address.
1474The argument must be
1475.Dq yes
1476or
1477.Dq no .
1478The default is
1479.Dq yes .
1480.It Cm XAuthLocation
Damien Miller05913ba2002-09-04 16:51:03 +10001481Specifies the full pathname of the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001482.Xr xauth 1
1483program.
1484The default is
1485.Pa /usr/X11R6/bin/xauth .
1486.El
Damien Millere3beba22006-03-15 11:59:25 +11001487.Sh TIME FORMATS
Damien Millerf4f22b52006-03-15 11:57:25 +11001488.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001489command-line arguments and configuration file options that specify time
1490may be expressed using a sequence of the form:
1491.Sm off
Ben Lindstrom1f8cf4f2002-08-20 18:43:27 +00001492.Ar time Op Ar qualifier ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001493.Sm on
1494where
1495.Ar time
1496is a positive integer value and
1497.Ar qualifier
1498is one of the following:
1499.Pp
1500.Bl -tag -width Ds -compact -offset indent
Damien Miller393821a2006-07-24 14:04:53 +10001501.It Aq Cm none
Ben Lindstrom9f049032002-06-21 00:59:05 +00001502seconds
1503.It Cm s | Cm S
1504seconds
1505.It Cm m | Cm M
1506minutes
1507.It Cm h | Cm H
1508hours
1509.It Cm d | Cm D
1510days
1511.It Cm w | Cm W
1512weeks
1513.El
1514.Pp
1515Each member of the sequence is added together to calculate
1516the total time value.
1517.Pp
1518Time format examples:
1519.Pp
1520.Bl -tag -width Ds -compact -offset indent
1521.It 600
1522600 seconds (10 minutes)
1523.It 10m
152410 minutes
1525.It 1h30m
15261 hour 30 minutes (90 minutes)
1527.El
1528.Sh FILES
1529.Bl -tag -width Ds
1530.It Pa /etc/ssh/sshd_config
1531Contains configuration data for
Damien Millerf4f22b52006-03-15 11:57:25 +11001532.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001533This file should be writable by root only, but it is recommended
1534(though not necessary) that it be world-readable.
1535.El
Damien Millerf1ce5052003-06-11 22:04:39 +10001536.Sh SEE ALSO
1537.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001538.Sh AUTHORS
1539OpenSSH is a derivative of the original and free
1540ssh 1.2.12 release by Tatu Ylonen.
1541Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1542Theo de Raadt and Dug Song
1543removed many bugs, re-added newer features and
1544created OpenSSH.
1545Markus Friedl contributed the support for SSH
1546protocol versions 1.5 and 2.0.
1547Niels Provos and Markus Friedl contributed support
1548for privilege separation.