blob: ac6ccc793fbe3652b345be538fc119b40342495e [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.org66705942017-03-14 07:19:07 +000036.\" $OpenBSD: sshd_config.5,v 1.243 2017/03/14 07:19:07 djm Exp $
37.Dd $Mdocdate: March 14 2017 $
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.
jmc@openbsd.orga685ae82016-02-17 07:38:19 +000073The
dtucker@openbsd.org85b96ef2015-04-28 10:17:58 +000074.Ev TERM
jmc@openbsd.orgc1d5bcf2015-04-28 13:47:38 +000075environment variable is always sent whenever the client
djm@openbsd.org732d61f2015-06-05 03:44:14 +000076requests a pseudo-terminal as it is required by the protocol.
Darren Tucker46bc0752004-05-02 22:11:30 +100077Variables are specified by name, which may contain the wildcard characters
Damien Miller208f1ed2006-03-15 11:56:03 +110078.Ql *
Darren Tucker46bc0752004-05-02 22:11:30 +100079and
80.Ql \&? .
Darren Tucker1e0c9bf2004-05-02 22:12:48 +100081Multiple environment variables may be separated by whitespace or spread
Darren Tucker46bc0752004-05-02 22:11:30 +100082across multiple
83.Cm AcceptEnv
84directives.
Darren Tucker1e0c9bf2004-05-02 22:12:48 +100085Be warned that some environment variables could be used to bypass restricted
Darren Tucker46bc0752004-05-02 22:11:30 +100086user environments.
87For this reason, care should be taken in the use of this directive.
88The default is not to accept any environment variables.
Darren Tucker0f383232005-01-20 10:57:56 +110089.It Cm AddressFamily
90Specifies which address family should be used by
Damien Millerf4f22b52006-03-15 11:57:25 +110091.Xr sshd 8 .
Darren Tucker0f383232005-01-20 10:57:56 +110092Valid arguments are
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +000093.Cm any
94(the default),
95.Cm inet
Damien Miller5b0d63f2006-03-15 11:56:56 +110096(use IPv4 only), or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +000097.Cm inet6
Darren Tucker0f383232005-01-20 10:57:56 +110098(use IPv6 only).
Damien Millere9890192008-05-19 14:59:02 +100099.It Cm AllowAgentForwarding
100Specifies whether
101.Xr ssh-agent 1
102forwarding is permitted.
103The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000104.Cm yes .
Damien Millere9890192008-05-19 14:59:02 +1000105Note that disabling agent forwarding does not improve security
106unless users are also denied shell access, as they can always install
107their own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000108.It Cm AllowGroups
109This keyword can be followed by a list of group name patterns, separated
110by spaces.
111If specified, login is allowed only for users whose primary
112group or supplementary group list matches one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000113Only group names are valid; a numerical group ID is not recognized.
114By default, login is allowed for all groups.
Damien Millerac73e512006-03-15 11:58:49 +1100115The allow/deny directives are processed in the following order:
116.Cm DenyUsers ,
117.Cm AllowUsers ,
118.Cm DenyGroups ,
119and finally
120.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100121.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000122See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100123.Xr ssh_config 5
124for more information on patterns.
Damien Miller7acefbb2014-07-18 14:11:24 +1000125.It Cm AllowStreamLocalForwarding
126Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
127The available options are
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000128.Cm yes
129(the default)
Damien Miller7acefbb2014-07-18 14:11:24 +1000130or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000131.Cm all
Damien Miller7acefbb2014-07-18 14:11:24 +1000132to allow StreamLocal forwarding,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000133.Cm no
Damien Miller7acefbb2014-07-18 14:11:24 +1000134to prevent all StreamLocal forwarding,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000135.Cm local
Damien Miller7acefbb2014-07-18 14:11:24 +1000136to allow local (from the perspective of
137.Xr ssh 1 )
138forwarding only or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000139.Cm remote
Damien Miller7acefbb2014-07-18 14:11:24 +1000140to allow remote forwarding only.
Damien Miller7acefbb2014-07-18 14:11:24 +1000141Note that disabling StreamLocal forwarding does not improve security unless
142users are also denied shell access, as they can always install their
143own forwarders.
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000144.It Cm AllowTcpForwarding
145Specifies whether TCP forwarding is permitted.
146The available options are
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000147.Cm yes
148(the default)
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000149or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000150.Cm all
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000151to allow TCP forwarding,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000152.Cm no
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000153to prevent all TCP forwarding,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000154.Cm local
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000155to allow local (from the perspective of
156.Xr ssh 1 )
157forwarding only or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000158.Cm remote
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000159to allow remote forwarding only.
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000160Note that disabling TCP 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.
jmc@openbsd.orgee1e0a12016-04-27 13:53:48 +0000173HOST criteria may additionally contain addresses to match in CIDR
174address/masklen format.
Damien Millerac73e512006-03-15 11:58:49 +1100175The allow/deny directives are processed in the following order:
176.Cm DenyUsers ,
177.Cm AllowUsers ,
178.Cm DenyGroups ,
179and finally
180.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100181.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000182See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100183.Xr ssh_config 5
184for more information on patterns.
Damien Millera6e3f012012-11-04 23:21:40 +1100185.It Cm AuthenticationMethods
186Specifies the authentication methods that must be successfully completed
187for a user to be granted access.
188This option must be followed by one or more comma-separated lists of
djm@openbsd.orgb64faeb2016-06-17 05:03:40 +0000189authentication method names, or by the single string
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000190.Cm any
djm@openbsd.orgb64faeb2016-06-17 05:03:40 +0000191to indicate the default behaviour of accepting any single authentication
jmc@openbsd.orgad23a752016-06-17 06:33:30 +0000192method.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000193If the default is overridden, then successful authentication requires
djm@openbsd.orgb64faeb2016-06-17 05:03:40 +0000194completion of every method in at least one of these lists.
Damien Millera6e3f012012-11-04 23:21:40 +1100195.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000196For example,
197.Qq publickey,password publickey,keyboard-interactive
Damien Millera6e3f012012-11-04 23:21:40 +1100198would require the user to complete public key authentication, followed by
199either password or keyboard interactive authentication.
200Only methods that are next in one or more lists are offered at each stage,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000201so for this example it would not be possible to attempt password or
Damien Millera6e3f012012-11-04 23:21:40 +1100202keyboard-interactive authentication before public key.
203.Pp
Damien Miller91a55f22013-04-23 15:18:10 +1000204For keyboard interactive authentication it is also possible to
205restrict authentication to a specific device by appending a
206colon followed by the device identifier
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000207.Cm bsdauth ,
208.Cm pam ,
Damien Miller91a55f22013-04-23 15:18:10 +1000209or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000210.Cm skey ,
Damien Miller91a55f22013-04-23 15:18:10 +1000211depending on the server configuration.
212For example,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000213.Qq keyboard-interactive:bsdauth
Damien Miller91a55f22013-04-23 15:18:10 +1000214would restrict keyboard interactive authentication to the
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000215.Cm bsdauth
Damien Miller91a55f22013-04-23 15:18:10 +1000216device.
217.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000218If the publickey method is listed more than once,
djm@openbsd.orgf69b69b2014-12-22 07:51:30 +0000219.Xr sshd 8
220verifies that keys that have been used successfully are not reused for
221subsequent authentications.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000222For example,
223.Qq publickey,publickey
224requires successful authentication using two different public keys.
djm@openbsd.orgf69b69b2014-12-22 07:51:30 +0000225.Pp
Damien Millera6e3f012012-11-04 23:21:40 +1100226Note that each authentication method listed should also be explicitly enabled
227in the configuration.
Damien Miller09d3e122012-10-31 08:58:58 +1100228.It Cm AuthorizedKeysCommand
Damien Millerf33580e2012-11-04 22:22:52 +1100229Specifies a program to be used to look up the user's public keys.
djm@openbsd.org24232a32015-05-21 06:38:35 +0000230The program must be owned by root, not writable by group or others and
231specified by an absolute path.
djm@openbsd.org24232a32015-05-21 06:38:35 +0000232Arguments to
233.Cm AuthorizedKeysCommand
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000234accept the tokens described in the
235.Sx TOKENS
236section.
237If no arguments are specified then the username of the target user is used.
djm@openbsd.org24232a32015-05-21 06:38:35 +0000238.Pp
239The program should produce on standard output zero or
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000240more lines of authorized_keys output (see
241.Sx AUTHORIZED_KEYS
242in
Damien Millerf33580e2012-11-04 22:22:52 +1100243.Xr sshd 8 ) .
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000244If a key supplied by
245.Cm AuthorizedKeysCommand
246does not successfully authenticate
Damien Miller09d3e122012-10-31 08:58:58 +1100247and authorize the user then public key authentication continues using the usual
248.Cm AuthorizedKeysFile
249files.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000250By default, no
251.Cm AuthorizedKeysCommand
252is run.
Damien Miller09d3e122012-10-31 08:58:58 +1100253.It Cm AuthorizedKeysCommandUser
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000254Specifies the user under whose account the
255.Cm AuthorizedKeysCommand
256is run.
Damien Miller09d3e122012-10-31 08:58:58 +1100257It is recommended to use a dedicated user that has no other role on the host
258than running authorized keys commands.
djm@openbsd.orgf1c4d8e2014-12-22 08:04:23 +0000259If
djm@openbsd.orgd663bea2014-12-11 05:25:06 +0000260.Cm AuthorizedKeysCommand
djm@openbsd.orgf1c4d8e2014-12-22 08:04:23 +0000261is specified but
262.Cm AuthorizedKeysCommandUser
263is not, then
264.Xr sshd 8
265will refuse to start.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000266.It Cm AuthorizedKeysFile
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000267Specifies the file that contains the public keys used for user authentication.
Damien Miller6018a362010-07-02 13:35:19 +1000268The format is described in the
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000269.Sx AUTHORIZED_KEYS FILE FORMAT
Damien Miller6018a362010-07-02 13:35:19 +1000270section of
271.Xr sshd 8 .
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000272Arguments to
Ben Lindstrom9f049032002-06-21 00:59:05 +0000273.Cm AuthorizedKeysFile
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000274accept the tokens described in the
275.Sx TOKENS
276section.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000277After expansion,
278.Cm AuthorizedKeysFile
279is taken to be an absolute path or one relative to the user's home
280directory.
Damien Millerb9132fc2011-05-29 21:41:40 +1000281Multiple files may be listed, separated by whitespace.
djm@openbsd.org2bca8a42015-09-11 03:13:36 +0000282Alternately this option may be set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000283.Cm none
djm@openbsd.org2bca8a42015-09-11 03:13:36 +0000284to skip checking for user keys in files.
Damien Millerb9132fc2011-05-29 21:41:40 +1000285The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000286.Qq .ssh/authorized_keys .ssh/authorized_keys2 .
djm@openbsd.orgbcc50d82015-05-21 06:43:30 +0000287.It Cm AuthorizedPrincipalsCommand
288Specifies a program to be used to generate the list of allowed
289certificate principals as per
290.Cm AuthorizedPrincipalsFile .
291The program must be owned by root, not writable by group or others and
292specified by an absolute path.
djm@openbsd.orgbcc50d82015-05-21 06:43:30 +0000293Arguments to
294.Cm AuthorizedPrincipalsCommand
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000295accept the tokens described in the
296.Sx TOKENS
297section.
298If no arguments are specified then the username of the target user is used.
djm@openbsd.orgbcc50d82015-05-21 06:43:30 +0000299.Pp
300The program should produce on standard output zero or
301more lines of
302.Cm AuthorizedPrincipalsFile
303output.
304If either
305.Cm AuthorizedPrincipalsCommand
306or
307.Cm AuthorizedPrincipalsFile
308is specified, then certificates offered by the client for authentication
309must contain a principal that is listed.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000310By default, no
311.Cm AuthorizedPrincipalsCommand
312is run.
djm@openbsd.orgbcc50d82015-05-21 06:43:30 +0000313.It Cm AuthorizedPrincipalsCommandUser
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000314Specifies the user under whose account the
315.Cm AuthorizedPrincipalsCommand
316is run.
djm@openbsd.orgbcc50d82015-05-21 06:43:30 +0000317It is recommended to use a dedicated user that has no other role on the host
318than running authorized principals commands.
319If
320.Cm AuthorizedPrincipalsCommand
321is specified but
322.Cm AuthorizedPrincipalsCommandUser
323is not, then
324.Xr sshd 8
325will refuse to start.
Damien Miller30da3442010-05-10 11:58:03 +1000326.It Cm AuthorizedPrincipalsFile
327Specifies a file that lists principal names that are accepted for
328certificate authentication.
329When using certificates signed by a key listed in
330.Cm TrustedUserCAKeys ,
331this file lists names, one of which must appear in the certificate for it
332to be accepted for authentication.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000333Names are listed one per line preceded by key options (as described in
334.Sx AUTHORIZED_KEYS FILE FORMAT
335in
Damien Millerd59dab82010-07-02 13:37:17 +1000336.Xr sshd 8 ) .
Damien Miller6018a362010-07-02 13:35:19 +1000337Empty lines and comments starting with
Damien Miller30da3442010-05-10 11:58:03 +1000338.Ql #
339are ignored.
340.Pp
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000341Arguments to
Damien Miller30da3442010-05-10 11:58:03 +1000342.Cm AuthorizedPrincipalsFile
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000343accept the tokens described in the
344.Sx TOKENS
345section.
Damien Miller30da3442010-05-10 11:58:03 +1000346After expansion,
347.Cm AuthorizedPrincipalsFile
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000348is taken to be an absolute path or one relative to the user's home directory.
Damien Miller8fef9eb2012-04-22 11:25:10 +1000349The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000350.Cm none ,
Damien Miller8fef9eb2012-04-22 11:25:10 +1000351i.e. not to use a principals file \(en in this case, the username
Damien Miller30da3442010-05-10 11:58:03 +1000352of the user must appear in a certificate's principals list for it to be
353accepted.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000354.Pp
Damien Miller30da3442010-05-10 11:58:03 +1000355Note that
356.Cm AuthorizedPrincipalsFile
357is only used when authentication proceeds using a CA listed in
358.Cm TrustedUserCAKeys
359and is not consulted for certification authorities trusted via
360.Pa ~/.ssh/authorized_keys ,
361though the
362.Cm principals=
363key option offers a similar facility (see
364.Xr sshd 8
365for details).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000366.It Cm Banner
Ben Lindstrom9f049032002-06-21 00:59:05 +0000367The contents of the specified file are sent to the remote user before
368authentication is allowed.
Damien Miller4890e532007-09-17 11:57:38 +1000369If the argument is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000370.Cm none
Damien Miller4890e532007-09-17 11:57:38 +1000371then no banner is displayed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000372By default, no banner is displayed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000373.It Cm ChallengeResponseAuthentication
Damien Miller9c7bf8d2009-08-28 10:27:08 +1000374Specifies whether challenge-response authentication is allowed (e.g. via
Damien Millere8c9f262014-10-03 09:24:56 +1000375PAM or through authentication styles supported in
Damien Miller9c7bf8d2009-08-28 10:27:08 +1000376.Xr login.conf 5 )
Ben Lindstrom9f049032002-06-21 00:59:05 +0000377The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000378.Cm yes .
Damien Millerd8cb1f12008-02-10 22:40:12 +1100379.It Cm ChrootDirectory
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100380Specifies the pathname of a directory to
Damien Millerd8cb1f12008-02-10 22:40:12 +1100381.Xr chroot 2
382to after authentication.
deraadt@openbsd.orgdcff5812015-01-22 20:24:41 +0000383At session startup
384.Xr sshd 8
385checks that all components of the pathname are root-owned directories
386which are not writable by any other user or group.
Darren Tucker51dbe502009-06-21 17:56:51 +1000387After the chroot,
388.Xr sshd 8
389changes the working directory to the user's home directory.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000390Arguments to
391.Cm ChrootDirectory
392accept the tokens described in the
393.Sx TOKENS
394section.
Damien Millerd8cb1f12008-02-10 22:40:12 +1100395.Pp
396The
397.Cm ChrootDirectory
398must contain the necessary files and directories to support the
Darren Tuckeraf501cf2009-06-21 17:53:04 +1000399user's session.
Damien Millerd8cb1f12008-02-10 22:40:12 +1100400For an interactive session this requires at least a shell, typically
401.Xr sh 1 ,
402and basic
403.Pa /dev
404nodes such as
405.Xr null 4 ,
406.Xr zero 4 ,
407.Xr stdin 4 ,
408.Xr stdout 4 ,
409.Xr stderr 4 ,
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000410and
Damien Millerd8cb1f12008-02-10 22:40:12 +1100411.Xr tty 4
412devices.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000413For file transfer sessions using SFTP
414no additional configuration of the environment is necessary if the in-process
415sftp-server is used,
Damien Miller426117b2014-07-30 12:33:20 +1000416though sessions which use logging may require
Darren Tucker00fcd712009-06-21 17:56:00 +1000417.Pa /dev/log
Damien Miller426117b2014-07-30 12:33:20 +1000418inside the chroot directory on some operating systems (see
Darren Tucker00fcd712009-06-21 17:56:00 +1000419.Xr sftp-server 8
420for details).
Damien Millerd8cb1f12008-02-10 22:40:12 +1100421.Pp
jmc@openbsd.orga5a3e332015-01-22 21:00:42 +0000422For safety, it is very important that the directory hierarchy be
deraadt@openbsd.orgdcff5812015-01-22 20:24:41 +0000423prevented from modification by other processes on the system (especially
424those outside the jail).
425Misconfiguration can lead to unsafe environments which
426.Xr sshd 8
427cannot detect.
428.Pp
djm@openbsd.org9fd04682015-11-13 04:38:06 +0000429The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000430.Cm none ,
djm@openbsd.org9fd04682015-11-13 04:38:06 +0000431indicating not to
Damien Millerd8cb1f12008-02-10 22:40:12 +1100432.Xr chroot 2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000433.It Cm Ciphers
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000434Specifies the ciphers allowed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000435Multiple ciphers must be comma-separated.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000436If the specified value begins with a
437.Sq +
438character, then the specified ciphers will be appended to the default set
439instead of replacing them.
djm@openbsd.org68bc8cf2017-02-03 23:01:19 +0000440If the specified value begins with a
441.Sq -
442character, then the specified ciphers (including wildcards) will be removed
443from the default set instead of replacing them.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000444.Pp
Damien Miller0fde8ac2013-11-21 14:12:23 +1100445The supported ciphers are:
446.Pp
Damien Millerc1621c82014-04-20 13:22:46 +1000447.Bl -item -compact -offset indent
448.It
4493des-cbc
450.It
451aes128-cbc
452.It
453aes192-cbc
454.It
455aes256-cbc
456.It
457aes128-ctr
458.It
459aes192-ctr
460.It
461aes256-ctr
462.It
463aes128-gcm@openssh.com
464.It
465aes256-gcm@openssh.com
466.It
467arcfour
468.It
469arcfour128
470.It
471arcfour256
472.It
473blowfish-cbc
474.It
475cast128-cbc
476.It
477chacha20-poly1305@openssh.com
478.El
Damien Miller0fde8ac2013-11-21 14:12:23 +1100479.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +1100480The default is:
Damien Millerc1621c82014-04-20 13:22:46 +1000481.Bd -literal -offset indent
jmc@openbsd.org1f8d3d62015-08-14 15:32:41 +0000482chacha20-poly1305@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +1000483aes128-ctr,aes192-ctr,aes256-ctr,
jmc@openbsd.org1f8d3d62015-08-14 15:32:41 +0000484aes128-gcm@openssh.com,aes256-gcm@openssh.com
Ben Lindstrom9f049032002-06-21 00:59:05 +0000485.Ed
Damien Miller0fde8ac2013-11-21 14:12:23 +1100486.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000487The list of available ciphers may also be obtained using
488.Qq ssh -Q cipher .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000489.It Cm ClientAliveCountMax
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000490Sets the number of client alive messages which may be sent without
Damien Miller5b0d63f2006-03-15 11:56:56 +1100491.Xr sshd 8
Damien Millerfbf486b2003-05-23 18:44:23 +1000492receiving any messages back from the client.
493If this threshold is reached while client alive messages are being sent,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100494sshd will disconnect the client, terminating the session.
Damien Millerfbf486b2003-05-23 18:44:23 +1000495It is important to note that the use of client alive messages is very
496different from
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000497.Cm TCPKeepAlive .
Damien Millerfbf486b2003-05-23 18:44:23 +1000498The client alive messages are sent through the encrypted channel
499and therefore will not be spoofable.
500The TCP keepalive option enabled by
Damien Miller12c150e2003-12-17 16:31:10 +1100501.Cm TCPKeepAlive
Damien Millerfbf486b2003-05-23 18:44:23 +1000502is spoofable.
503The client alive mechanism is valuable when the client or
Ben Lindstrom9f049032002-06-21 00:59:05 +0000504server depend on knowing when a connection has become inactive.
505.Pp
Damien Millerfbf486b2003-05-23 18:44:23 +1000506The default value is 3.
507If
Ben Lindstrom9f049032002-06-21 00:59:05 +0000508.Cm ClientAliveInterval
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000509is set to 15, and
Ben Lindstrom9f049032002-06-21 00:59:05 +0000510.Cm ClientAliveCountMax
Damien Miller5b0d63f2006-03-15 11:56:56 +1100511is left at the default, unresponsive SSH clients
Ben Lindstrom9f049032002-06-21 00:59:05 +0000512will be disconnected after approximately 45 seconds.
Damien Miller1594ad52005-05-26 12:12:19 +1000513.It Cm ClientAliveInterval
514Sets a timeout interval in seconds after which if no data has been received
515from the client,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100516.Xr sshd 8
Damien Miller1594ad52005-05-26 12:12:19 +1000517will send a message through the encrypted
518channel to request a response from the client.
519The default
520is 0, indicating that these messages will not be sent to the client.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000521.It Cm Compression
djm@openbsd.org4577ade2016-09-28 20:32:42 +0000522Specifies whether compression is enabled after
Damien Miller9786e6e2005-07-26 21:54:56 +1000523the user has authenticated successfully.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000524The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000525.Cm yes ,
526.Cm delayed
djm@openbsd.org4577ade2016-09-28 20:32:42 +0000527(a legacy synonym for
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000528.Cm yes )
Ben Lindstrom9f049032002-06-21 00:59:05 +0000529or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000530.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000531The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000532.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000533.It Cm DenyGroups
534This keyword can be followed by a list of group name patterns, separated
535by spaces.
536Login is disallowed for users whose primary group or supplementary
537group list matches one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000538Only group names are valid; a numerical group ID is not recognized.
539By default, login is allowed for all groups.
Damien Millerac73e512006-03-15 11:58:49 +1100540The allow/deny directives are processed in the following order:
541.Cm DenyUsers ,
542.Cm AllowUsers ,
543.Cm DenyGroups ,
544and finally
545.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100546.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000547See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100548.Xr ssh_config 5
549for more information on patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000550.It Cm DenyUsers
551This keyword can be followed by a list of user name patterns, separated
552by spaces.
553Login is disallowed for user names that match one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000554Only user names are valid; a numerical user ID is not recognized.
555By default, login is allowed for all users.
556If the pattern takes the form USER@HOST then USER and HOST
557are separately checked, restricting logins to particular
558users from particular hosts.
jmc@openbsd.orgee1e0a12016-04-27 13:53:48 +0000559HOST criteria may additionally contain addresses to match in CIDR
560address/masklen format.
Damien Millerac73e512006-03-15 11:58:49 +1100561The allow/deny directives are processed in the following order:
562.Cm DenyUsers ,
563.Cm AllowUsers ,
564.Cm DenyGroups ,
565and finally
566.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100567.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000568See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100569.Xr ssh_config 5
570for more information on patterns.
djm@openbsd.org7844f352016-11-30 03:00:05 +0000571.It Cm DisableForwarding
572Disables all forwarding features, including X11,
573.Xr ssh-agent 1 ,
574TCP and StreamLocal.
575This option overrides all other forwarding-related options and may
576simplify restricted configurations.
djm@openbsd.org56d1c832014-12-21 22:27:55 +0000577.It Cm FingerprintHash
578Specifies the hash algorithm used when logging key fingerprints.
579Valid options are:
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000580.Cm md5
djm@openbsd.org56d1c832014-12-21 22:27:55 +0000581and
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000582.Cm sha256 .
djm@openbsd.org56d1c832014-12-21 22:27:55 +0000583The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000584.Cm sha256 .
Damien Millere2754432006-07-24 14:06:47 +1000585.It Cm ForceCommand
586Forces the execution of the command specified by
587.Cm ForceCommand ,
Damien Millera1b48cc2008-03-27 11:02:02 +1100588ignoring any command supplied by the client and
589.Pa ~/.ssh/rc
590if present.
Damien Millere2754432006-07-24 14:06:47 +1000591The command is invoked by using the user's login shell with the -c option.
592This applies to shell, command, or subsystem execution.
593It is most useful inside a
594.Cm Match
595block.
596The command originally supplied by the client is available in the
597.Ev SSH_ORIGINAL_COMMAND
598environment variable.
Damien Millercdb6e652008-02-10 22:47:24 +1100599Specifying a command of
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000600.Cm internal-sftp
601will force the use of an in-process SFTP server that requires no support
Damien Millercdb6e652008-02-10 22:47:24 +1100602files when used with
603.Cm ChrootDirectory .
djm@openbsd.org9fd04682015-11-13 04:38:06 +0000604The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000605.Cm none .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000606.It Cm GatewayPorts
607Specifies whether remote hosts are allowed to connect to ports
608forwarded for the client.
609By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100610.Xr sshd 8
Damien Miller495dca32003-04-01 21:42:14 +1000611binds remote port forwardings to the loopback address.
612This prevents other remote hosts from connecting to forwarded ports.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000613.Cm GatewayPorts
Damien Miller5b0d63f2006-03-15 11:56:56 +1100614can be used to specify that sshd
Damien Millerf91ee4c2005-03-01 21:24:33 +1100615should allow remote port forwardings to bind to non-loopback addresses, thus
616allowing other hosts to connect.
617The argument may be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000618.Cm no
Damien Millerf91ee4c2005-03-01 21:24:33 +1100619to force remote port forwardings to be available to the local host only,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000620.Cm yes
Damien Millerf91ee4c2005-03-01 21:24:33 +1100621to force remote port forwardings to bind to the wildcard address, or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000622.Cm clientspecified
Damien Millerf91ee4c2005-03-01 21:24:33 +1100623to allow the client to select the address to which the forwarding is bound.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000624The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000625.Cm no .
Darren Tucker0efd1552003-08-26 11:49:55 +1000626.It Cm GSSAPIAuthentication
Damien Miller9b7b03b2003-09-02 22:57:05 +1000627Specifies whether user authentication based on GSSAPI is allowed.
Damien Millera8e06ce2003-11-21 23:48:55 +1100628The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000629.Cm no .
Darren Tucker0efd1552003-08-26 11:49:55 +1000630.It Cm GSSAPICleanupCredentials
631Specifies whether to automatically destroy the user's credentials cache
632on logout.
633The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000634.Cm yes .
djm@openbsd.orgd7c31da2015-05-22 03:50:02 +0000635.It Cm GSSAPIStrictAcceptorCheck
636Determines whether to be strict about the identity of the GSSAPI acceptor
637a client authenticates against.
638If set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000639.Cm yes
640then the client must authenticate against the host
djm@openbsd.orgd7c31da2015-05-22 03:50:02 +0000641service on the current hostname.
642If set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000643.Cm no
djm@openbsd.orgd7c31da2015-05-22 03:50:02 +0000644then the client may authenticate against any service key stored in the
645machine's default store.
646This facility is provided to assist with operation on multi homed machines.
647The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000648.Cm yes .
djm@openbsd.org1f729f02015-01-13 07:39:19 +0000649.It Cm HostbasedAcceptedKeyTypes
650Specifies the key types that will be accepted for hostbased authentication
651as a comma-separated pattern list.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000652Alternately if the specified value begins with a
653.Sq +
654character, then the specified key types will be appended to the default set
655instead of replacing them.
djm@openbsd.org68bc8cf2017-02-03 23:01:19 +0000656If the specified value begins with a
657.Sq -
658character, then the specified key types (including wildcards) will be removed
659from the default set instead of replacing them.
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000660The default for this option is:
661.Bd -literal -offset 3n
662ecdsa-sha2-nistp256-cert-v01@openssh.com,
663ecdsa-sha2-nistp384-cert-v01@openssh.com,
664ecdsa-sha2-nistp521-cert-v01@openssh.com,
665ssh-ed25519-cert-v01@openssh.com,
666ssh-rsa-cert-v01@openssh.com,
667ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
djm@openbsd.org3a13cb52016-02-17 08:57:34 +0000668ssh-ed25519,ssh-rsa
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000669.Ed
670.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000671The list of available key types may also be obtained using
672.Qq ssh -Q key .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000673.It Cm HostbasedAuthentication
674Specifies whether rhosts or /etc/hosts.equiv authentication together
675with successful public key client host authentication is allowed
Damien Miller1faa7132006-03-15 11:55:31 +1100676(host-based authentication).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000677The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000678.Cm no .
Damien Millerb594f382006-08-30 11:06:34 +1000679.It Cm HostbasedUsesNameFromPacketOnly
680Specifies whether or not the server will attempt to perform a reverse
681name lookup when matching the name in the
682.Pa ~/.shosts ,
683.Pa ~/.rhosts ,
684and
685.Pa /etc/hosts.equiv
686files during
687.Cm HostbasedAuthentication .
688A setting of
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000689.Cm yes
Damien Millerb594f382006-08-30 11:06:34 +1000690means that
691.Xr sshd 8
692uses the name supplied by the client rather than
693attempting to resolve the name from the TCP connection itself.
694The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000695.Cm no .
Damien Miller0a80ca12010-02-27 07:55:05 +1100696.It Cm HostCertificate
697Specifies a file containing a public host certificate.
698The certificate's public key must match a private host key already specified
699by
700.Cm HostKey .
701The default behaviour of
702.Xr sshd 8
703is not to load any certificates.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000704.It Cm HostKey
705Specifies a file containing a private host key
706used by SSH.
naddy@openbsd.orgffe65492016-08-15 12:32:04 +0000707The defaults are
Damien Millereb8b60e2010-08-31 22:41:14 +1000708.Pa /etc/ssh/ssh_host_dsa_key ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100709.Pa /etc/ssh/ssh_host_ecdsa_key ,
710.Pa /etc/ssh/ssh_host_ed25519_key
Ben Lindstrom9f049032002-06-21 00:59:05 +0000711and
naddy@openbsd.orgffe65492016-08-15 12:32:04 +0000712.Pa /etc/ssh/ssh_host_rsa_key .
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000713.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +0000714Note that
Damien Miller5b0d63f2006-03-15 11:56:56 +1100715.Xr sshd 8
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000716will refuse to use a file if it is group/world-accessible
717and that the
718.Cm HostKeyAlgorithms
719option restricts which of the keys are actually used by
720.Xr sshd 8 .
721.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +0000722It is possible to have multiple host key files.
Damien Miller85b45e02013-07-20 13:21:52 +1000723It is also possible to specify public host key files instead.
724In this case operations on the private key will be delegated
725to an
726.Xr ssh-agent 1 .
727.It Cm HostKeyAgent
728Identifies the UNIX-domain socket used to communicate
729with an agent that has access to the private host keys.
markus@openbsd.org1a75d142016-05-04 14:29:58 +0000730If the string
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000731.Qq SSH_AUTH_SOCK
Damien Miller85b45e02013-07-20 13:21:52 +1000732is specified, the location of the socket will be read from the
733.Ev SSH_AUTH_SOCK
734environment variable.
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000735.It Cm HostKeyAlgorithms
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000736Specifies the host key algorithms
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000737that the server offers.
738The default for this option is:
739.Bd -literal -offset 3n
740ecdsa-sha2-nistp256-cert-v01@openssh.com,
741ecdsa-sha2-nistp384-cert-v01@openssh.com,
742ecdsa-sha2-nistp521-cert-v01@openssh.com,
743ssh-ed25519-cert-v01@openssh.com,
744ssh-rsa-cert-v01@openssh.com,
745ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
djm@openbsd.org3a13cb52016-02-17 08:57:34 +0000746ssh-ed25519,ssh-rsa
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000747.Ed
748.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000749The list of available key types may also be obtained using
750.Qq ssh -Q key .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000751.It Cm IgnoreRhosts
752Specifies that
753.Pa .rhosts
754and
755.Pa .shosts
756files will not be used in
Ben Lindstrom9f049032002-06-21 00:59:05 +0000757.Cm HostbasedAuthentication .
758.Pp
759.Pa /etc/hosts.equiv
760and
761.Pa /etc/shosts.equiv
762are still used.
763The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000764.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000765.It Cm IgnoreUserKnownHosts
766Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +1100767.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000768should ignore the user's
Damien Miller167ea5d2005-05-26 12:04:02 +1000769.Pa ~/.ssh/known_hosts
Ben Lindstrom9f049032002-06-21 00:59:05 +0000770during
Ben Lindstrom9f049032002-06-21 00:59:05 +0000771.Cm HostbasedAuthentication .
772The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000773.Cm no .
Damien Miller0dac6fb2010-11-20 15:19:38 +1100774.It Cm IPQoS
775Specifies the IPv4 type-of-service or DSCP class for the connection.
776Accepted values are
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000777.Cm af11 ,
778.Cm af12 ,
779.Cm af13 ,
780.Cm af21 ,
781.Cm af22 ,
782.Cm af23 ,
783.Cm af31 ,
784.Cm af32 ,
785.Cm af33 ,
786.Cm af41 ,
787.Cm af42 ,
788.Cm af43 ,
789.Cm cs0 ,
790.Cm cs1 ,
791.Cm cs2 ,
792.Cm cs3 ,
793.Cm cs4 ,
794.Cm cs5 ,
795.Cm cs6 ,
796.Cm cs7 ,
797.Cm ef ,
798.Cm lowdelay ,
799.Cm throughput ,
800.Cm reliability ,
Damien Miller0dac6fb2010-11-20 15:19:38 +1100801or a numeric value.
Damien Miller928362d2010-12-26 14:26:45 +1100802This option may take one or two arguments, separated by whitespace.
Damien Miller0dac6fb2010-11-20 15:19:38 +1100803If one argument is specified, it is used as the packet class unconditionally.
804If two values are specified, the first is automatically selected for
805interactive sessions and the second for non-interactive sessions.
806The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000807.Cm lowdelay
Damien Miller0dac6fb2010-11-20 15:19:38 +1100808for interactive sessions and
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000809.Cm throughput
Damien Miller0dac6fb2010-11-20 15:19:38 +1100810for non-interactive sessions.
Damien Millere1e480a2014-02-04 11:13:17 +1100811.It Cm KbdInteractiveAuthentication
812Specifies whether to allow keyboard-interactive authentication.
813The argument to this keyword must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000814.Cm yes
Damien Millere1e480a2014-02-04 11:13:17 +1100815or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000816.Cm no .
Damien Millere1e480a2014-02-04 11:13:17 +1100817The default is to use whatever value
818.Cm ChallengeResponseAuthentication
819is set to
820(by default
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000821.Cm yes ) .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000822.It Cm KerberosAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000823Specifies whether the password provided by the user for
Ben Lindstrom9f049032002-06-21 00:59:05 +0000824.Cm PasswordAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000825will be validated through the Kerberos KDC.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000826To use this option, the server needs a
827Kerberos servtab which allows the verification of the KDC's identity.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100828The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000829.Cm no .
Damien Miller8448e662004-03-08 23:13:15 +1100830.It Cm KerberosGetAFSToken
Darren Tuckere2dd2d52005-10-03 18:19:06 +1000831If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
Damien Miller8448e662004-03-08 23:13:15 +1100832an AFS token before accessing the user's home directory.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100833The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000834.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000835.It Cm KerberosOrLocalPasswd
Damien Miller5b0d63f2006-03-15 11:56:56 +1100836If password authentication through Kerberos fails then
Ben Lindstrom9f049032002-06-21 00:59:05 +0000837the password will be validated via any additional local mechanism
838such as
839.Pa /etc/passwd .
Damien Miller5b0d63f2006-03-15 11:56:56 +1100840The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000841.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000842.It Cm KerberosTicketCleanup
843Specifies whether to automatically destroy the user's ticket cache
844file on logout.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100845The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000846.Cm yes .
Damien Millerd5f62bf2010-09-24 22:11:14 +1000847.It Cm KexAlgorithms
848Specifies the available KEX (Key Exchange) algorithms.
849Multiple algorithms must be comma-separated.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000850Alternately if the specified value begins with a
851.Sq +
852character, then the specified methods will be appended to the default set
853instead of replacing them.
djm@openbsd.org68bc8cf2017-02-03 23:01:19 +0000854If the specified value begins with a
855.Sq -
856character, then the specified methods (including wildcards) will be removed
857from the default set instead of replacing them.
Damien Millerc1621c82014-04-20 13:22:46 +1000858The supported algorithms are:
859.Pp
860.Bl -item -compact -offset indent
861.It
djm@openbsd.org16277fc2016-09-22 17:55:13 +0000862curve25519-sha256
863.It
Damien Millerc1621c82014-04-20 13:22:46 +1000864curve25519-sha256@libssh.org
865.It
866diffie-hellman-group1-sha1
867.It
868diffie-hellman-group14-sha1
869.It
870diffie-hellman-group-exchange-sha1
871.It
872diffie-hellman-group-exchange-sha256
873.It
874ecdh-sha2-nistp256
875.It
876ecdh-sha2-nistp384
877.It
878ecdh-sha2-nistp521
879.El
880.Pp
881The default is:
Damien Miller6575c3a2013-12-18 17:47:02 +1100882.Bd -literal -offset indent
djm@openbsd.org16277fc2016-09-22 17:55:13 +0000883curve25519-sha256,curve25519-sha256@libssh.org,
Damien Miller6575c3a2013-12-18 17:47:02 +1100884ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
885diffie-hellman-group-exchange-sha256,
Damien Millerc1621c82014-04-20 13:22:46 +1000886diffie-hellman-group14-sha1
Damien Miller6575c3a2013-12-18 17:47:02 +1100887.Ed
djm@openbsd.org8f6784f2014-12-22 09:05:17 +0000888.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000889The list of available key exchange algorithms may also be obtained using
890.Qq ssh -Q kex .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000891.It Cm ListenAddress
892Specifies the local addresses
Damien Miller5b0d63f2006-03-15 11:56:56 +1100893.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000894should listen on.
895The following forms may be used:
896.Pp
897.Bl -item -offset indent -compact
898.It
899.Cm ListenAddress
900.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000901.Ar host | Ar IPv4_addr | Ar IPv6_addr
Ben Lindstrom9f049032002-06-21 00:59:05 +0000902.Sm on
903.It
904.Cm ListenAddress
905.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000906.Ar host | Ar IPv4_addr : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000907.Sm on
908.It
909.Cm ListenAddress
910.Sm off
911.Oo
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000912.Ar host | Ar IPv6_addr Oc : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000913.Sm on
914.El
915.Pp
916If
917.Ar port
918is not specified,
dtucker@openbsd.org531a57a2015-04-29 03:48:56 +0000919sshd will listen on the address and all
Ben Lindstrom9f049032002-06-21 00:59:05 +0000920.Cm Port
Damien Millerfbf486b2003-05-23 18:44:23 +1000921options specified.
922The default is to listen on all local addresses.
Damien Miller495dca32003-04-01 21:42:14 +1000923Multiple
Ben Lindstrom9f049032002-06-21 00:59:05 +0000924.Cm ListenAddress
Damien Millerfbf486b2003-05-23 18:44:23 +1000925options are permitted.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000926.It Cm LoginGraceTime
927The server disconnects after this time if the user has not
928successfully logged in.
929If the value is 0, there is no time limit.
Damien Millerc1348632002-09-05 14:35:14 +1000930The default is 120 seconds.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000931.It Cm LogLevel
932Gives the verbosity level that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +1100933.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000934The possible values are:
Damien Miller5b0d63f2006-03-15 11:56:56 +1100935QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
Damien Miller495dca32003-04-01 21:42:14 +1000936The default is INFO.
937DEBUG and DEBUG1 are equivalent.
938DEBUG2 and DEBUG3 each specify higher levels of debugging output.
939Logging with a DEBUG level violates the privacy of users and is not recommended.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000940.It Cm MACs
941Specifies the available MAC (message authentication code) algorithms.
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000942The MAC algorithm is used for data integrity protection.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000943Multiple algorithms must be comma-separated.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000944If the specified value begins with a
945.Sq +
946character, then the specified algorithms will be appended to the default set
947instead of replacing them.
djm@openbsd.org68bc8cf2017-02-03 23:01:19 +0000948If the specified value begins with a
949.Sq -
950character, then the specified algorithms (including wildcards) will be removed
951from the default set instead of replacing them.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000952.Pp
Damien Milleraf43a7a2012-12-12 10:46:31 +1100953The algorithms that contain
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000954.Qq -etm
Damien Milleraf43a7a2012-12-12 10:46:31 +1100955calculate the MAC after encryption (encrypt-then-mac).
956These are considered safer and their use recommended.
Damien Millerc1621c82014-04-20 13:22:46 +1000957The supported MACs are:
958.Pp
959.Bl -item -compact -offset indent
960.It
961hmac-md5
962.It
963hmac-md5-96
964.It
965hmac-ripemd160
966.It
967hmac-sha1
968.It
969hmac-sha1-96
970.It
971hmac-sha2-256
972.It
973hmac-sha2-512
974.It
975umac-64@openssh.com
976.It
977umac-128@openssh.com
978.It
979hmac-md5-etm@openssh.com
980.It
981hmac-md5-96-etm@openssh.com
982.It
983hmac-ripemd160-etm@openssh.com
984.It
985hmac-sha1-etm@openssh.com
986.It
987hmac-sha1-96-etm@openssh.com
988.It
989hmac-sha2-256-etm@openssh.com
990.It
991hmac-sha2-512-etm@openssh.com
992.It
993umac-64-etm@openssh.com
994.It
995umac-128-etm@openssh.com
996.El
997.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +1100998The default is:
Damien Miller22b7b492007-06-11 14:07:12 +1000999.Bd -literal -offset indent
Damien Milleraf43a7a2012-12-12 10:46:31 +11001000umac-64-etm@openssh.com,umac-128-etm@openssh.com,
1001hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
djm@openbsd.orge4c918a2016-02-11 02:56:32 +00001002hmac-sha1-etm@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +10001003umac-64@openssh.com,umac-128@openssh.com,
djm@openbsd.orge4c918a2016-02-11 02:56:32 +00001004hmac-sha2-256,hmac-sha2-512,hmac-sha1
Damien Miller22b7b492007-06-11 14:07:12 +10001005.Ed
djm@openbsd.org8f6784f2014-12-22 09:05:17 +00001006.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001007The list of available MAC algorithms may also be obtained using
1008.Qq ssh -Q mac .
Darren Tucker45150472006-07-12 22:34:17 +10001009.It Cm Match
Damien Millerd04f3572006-07-24 13:46:50 +10001010Introduces a conditional block.
Damien Miller8c234032006-07-24 14:05:08 +10001011If all of the criteria on the
Darren Tucker45150472006-07-12 22:34:17 +10001012.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +10001013line are satisfied, the keywords on the following lines override those
1014set in the global section of the config file, until either another
Darren Tucker45150472006-07-12 22:34:17 +10001015.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +10001016line or the end of the file.
Damien Millerfc5d6752014-02-28 10:01:28 +11001017If a keyword appears in multiple
1018.Cm Match
sobrado@openbsd.org180bcb42014-08-30 16:32:25 +00001019blocks that are satisfied, only the first instance of the keyword is
Damien Millerfc5d6752014-02-28 10:01:28 +11001020applied.
Darren Tucker7a3935d2008-06-10 22:59:10 +10001021.Pp
Damien Millerd04f3572006-07-24 13:46:50 +10001022The arguments to
Darren Tucker45150472006-07-12 22:34:17 +10001023.Cm Match
Damien Millercf31f382013-10-24 21:02:56 +11001024are one or more criteria-pattern pairs or the single token
1025.Cm All
1026which matches all criteria.
Darren Tucker45150472006-07-12 22:34:17 +10001027The available criteria are
1028.Cm User ,
Damien Miller565ca3f2006-08-19 00:23:15 +10001029.Cm Group ,
Darren Tucker45150472006-07-12 22:34:17 +10001030.Cm Host ,
Darren Tuckerfbcf8272012-05-19 19:37:01 +10001031.Cm LocalAddress ,
1032.Cm LocalPort ,
Darren Tucker45150472006-07-12 22:34:17 +10001033and
1034.Cm Address .
Darren Tucker7a3935d2008-06-10 22:59:10 +10001035The match patterns may consist of single entries or comma-separated
1036lists and may use the wildcard and negation operators described in the
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001037.Sx PATTERNS
1038section of
Darren Tuckerb06cc4a2008-06-10 22:59:53 +10001039.Xr ssh_config 5 .
Darren Tucker7a3935d2008-06-10 22:59:10 +10001040.Pp
1041The patterns in an
1042.Cm Address
1043criteria may additionally contain addresses to match in CIDR
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001044address/masklen format,
1045such as 192.0.2.0/24 or 2001:db8::/32.
Darren Tucker7a3935d2008-06-10 22:59:10 +10001046Note that the mask length provided must be consistent with the address -
1047it is an error to specify a mask length that is too long for the address
Darren Tucker6a2a4002008-06-10 23:03:04 +10001048or one with bits set in this host portion of the address.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001049For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
Darren Tucker7a3935d2008-06-10 22:59:10 +10001050.Pp
Darren Tucker45150472006-07-12 22:34:17 +10001051Only a subset of keywords may be used on the lines following a
1052.Cm Match
1053keyword.
1054Available keywords are
Damien Millerf8268502012-06-20 21:54:15 +10001055.Cm AcceptEnv ,
Damien Miller17819012009-01-28 16:20:17 +11001056.Cm AllowAgentForwarding ,
Damien Millerf8268502012-06-20 21:54:15 +10001057.Cm AllowGroups ,
djm@openbsd.org18a208d2015-02-20 22:40:32 +00001058.Cm AllowStreamLocalForwarding ,
Damien Miller9b439df2006-07-24 14:04:00 +10001059.Cm AllowTcpForwarding ,
Damien Millerc24da772012-06-20 21:53:58 +10001060.Cm AllowUsers ,
Damien Millera6e3f012012-11-04 23:21:40 +11001061.Cm AuthenticationMethods ,
Damien Miller09d3e122012-10-31 08:58:58 +11001062.Cm AuthorizedKeysCommand ,
1063.Cm AuthorizedKeysCommandUser ,
Damien Millerf33580e2012-11-04 22:22:52 +11001064.Cm AuthorizedKeysFile ,
djm@openbsd.orgb6b91082015-11-13 02:57:46 +00001065.Cm AuthorizedPrincipalsCommand ,
1066.Cm AuthorizedPrincipalsCommandUser ,
Damien Millerab6de352010-06-26 09:38:45 +10001067.Cm AuthorizedPrincipalsFile ,
Darren Tucker1629c072007-02-19 22:25:37 +11001068.Cm Banner ,
Damien Miller797e3d12008-05-19 14:27:42 +10001069.Cm ChrootDirectory ,
markus@openbsd.orgf0ddede2016-11-23 23:14:15 +00001070.Cm ClientAliveCountMax ,
1071.Cm ClientAliveInterval ,
Damien Millerc24da772012-06-20 21:53:58 +10001072.Cm DenyGroups ,
1073.Cm DenyUsers ,
Damien Millere2754432006-07-24 14:06:47 +10001074.Cm ForceCommand ,
djm@openbsd.org18a208d2015-02-20 22:40:32 +00001075.Cm GatewayPorts ,
djm@openbsd.orgbd49da22015-02-20 23:46:01 +00001076.Cm GSSAPIAuthentication ,
djm@openbsd.org1f729f02015-01-13 07:39:19 +00001077.Cm HostbasedAcceptedKeyTypes ,
Damien Miller25434de2008-05-19 14:29:08 +10001078.Cm HostbasedAuthentication ,
Damien Millerab6de352010-06-26 09:38:45 +10001079.Cm HostbasedUsesNameFromPacketOnly ,
djm@openbsd.org18a208d2015-02-20 22:40:32 +00001080.Cm IPQoS ,
Darren Tucker1d75f222007-03-01 21:31:28 +11001081.Cm KbdInteractiveAuthentication ,
Damien Miller5737e362007-03-06 21:21:18 +11001082.Cm KerberosAuthentication ,
Damien Miller307c1d12008-06-16 07:56:20 +10001083.Cm MaxAuthTries ,
Damien Millerc62a5af2008-06-16 07:55:46 +10001084.Cm MaxSessions ,
Darren Tucker1629c072007-02-19 22:25:37 +11001085.Cm PasswordAuthentication ,
Damien Miller51bde602008-11-03 19:23:10 +11001086.Cm PermitEmptyPasswords ,
Damien Millerd1de9952006-07-24 14:05:48 +10001087.Cm PermitOpen ,
Darren Tucker15f94272008-01-01 20:36:56 +11001088.Cm PermitRootLogin ,
Damien Miller5ff30c62013-10-30 22:21:50 +11001089.Cm PermitTTY ,
Damien Millerab6de352010-06-26 09:38:45 +10001090.Cm PermitTunnel ,
Damien Miller72e6b5c2014-07-04 09:00:04 +10001091.Cm PermitUserRC ,
djm@openbsd.org1f729f02015-01-13 07:39:19 +00001092.Cm PubkeyAcceptedKeyTypes ,
Darren Tucker1477ea12009-10-07 08:36:05 +11001093.Cm PubkeyAuthentication ,
djm@openbsd.org18a208d2015-02-20 22:40:32 +00001094.Cm RekeyLimit ,
1095.Cm RevokedKeys ,
djm@openbsd.org18a208d2015-02-20 22:40:32 +00001096.Cm StreamLocalBindMask ,
1097.Cm StreamLocalBindUnlink ,
1098.Cm TrustedUserCAKeys ,
Damien Millerd1de9952006-07-24 14:05:48 +10001099.Cm X11DisplayOffset ,
Damien Miller19913842009-02-23 10:53:58 +11001100.Cm X11Forwarding
Darren Tucker45150472006-07-12 22:34:17 +10001101and
Damien Miller0296ae82009-02-23 11:00:24 +11001102.Cm X11UseLocalHost .
Darren Tucker89413db2004-05-24 10:36:23 +10001103.It Cm MaxAuthTries
1104Specifies the maximum number of authentication attempts permitted per
Damien Miller26213e52004-06-30 22:39:34 +10001105connection.
1106Once the number of failures reaches half this value,
1107additional failures are logged.
1108The default is 6.
Damien Miller7207f642008-05-19 15:34:50 +10001109.It Cm MaxSessions
djm@openbsd.orgcac3b662016-02-05 02:37:56 +00001110Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
1111sessions permitted per network connection.
1112Multiple sessions may be established by clients that support connection
1113multiplexing.
1114Setting
1115.Cm MaxSessions
1116to 1 will effectively disable session multiplexing, whereas setting it to 0
1117will prevent all shell, login and subsystem sessions while still permitting
1118forwarding.
Damien Miller7207f642008-05-19 15:34:50 +10001119The default is 10.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001120.It Cm MaxStartups
1121Specifies the maximum number of concurrent unauthenticated connections to the
Damien Miller5b0d63f2006-03-15 11:56:56 +11001122SSH daemon.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001123Additional connections will be dropped until authentication succeeds or the
1124.Cm LoginGraceTime
1125expires for a connection.
Damien Miller1f583df2013-02-12 11:02:08 +11001126The default is 10:30:100.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001127.Pp
1128Alternatively, random early drop can be enabled by specifying
1129the three colon separated values
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001130start:rate:full (e.g. "10:30:60").
Damien Millerf4f22b52006-03-15 11:57:25 +11001131.Xr sshd 8
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001132will refuse connection attempts with a probability of rate/100 (30%)
1133if there are currently start (10) unauthenticated connections.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001134The probability increases linearly and all connection attempts
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001135are refused if the number of unauthenticated connections reaches full (60).
Ben Lindstrom9f049032002-06-21 00:59:05 +00001136.It Cm PasswordAuthentication
1137Specifies whether password authentication is allowed.
1138The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001139.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001140.It Cm PermitEmptyPasswords
1141When password authentication is allowed, it specifies whether the
1142server allows login to accounts with empty password strings.
1143The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001144.Cm no .
Damien Miller9b439df2006-07-24 14:04:00 +10001145.It Cm PermitOpen
1146Specifies the destinations to which TCP port forwarding is permitted.
1147The forwarding specification must be one of the following forms:
1148.Pp
1149.Bl -item -offset indent -compact
1150.It
1151.Cm PermitOpen
1152.Sm off
1153.Ar host : port
1154.Sm on
1155.It
1156.Cm PermitOpen
1157.Sm off
1158.Ar IPv4_addr : port
1159.Sm on
1160.It
1161.Cm PermitOpen
1162.Sm off
1163.Ar \&[ IPv6_addr \&] : port
1164.Sm on
1165.El
1166.Pp
Damien Millera765cf42006-07-24 14:08:13 +10001167Multiple forwards may be specified by separating them with whitespace.
Damien Miller9b439df2006-07-24 14:04:00 +10001168An argument of
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001169.Cm any
Damien Miller9b439df2006-07-24 14:04:00 +10001170can be used to remove all restrictions and permit any forwarding requests.
Darren Tuckerba9ea322012-05-19 19:37:33 +10001171An argument of
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001172.Cm none
Darren Tuckerba9ea322012-05-19 19:37:33 +10001173can be used to prohibit all forwarding requests.
jmc@openbsd.org32d921c2016-07-19 12:59:16 +00001174The wildcard
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001175.Sq *
jmc@openbsd.org32d921c2016-07-19 12:59:16 +00001176can be used for host or port to allow all hosts or ports, respectively.
Damien Miller65bc2c42006-07-24 14:04:16 +10001177By default all port forwarding requests are permitted.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001178.It Cm PermitRootLogin
Darren Tuckerb3509012005-01-20 11:01:46 +11001179Specifies whether root can log in using
Ben Lindstrom9f049032002-06-21 00:59:05 +00001180.Xr ssh 1 .
1181The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001182.Cm yes ,
1183.Cm prohibit-password ,
1184.Cm without-password ,
1185.Cm forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001186or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001187.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001188The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001189.Cm prohibit-password .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001190.Pp
1191If this option is set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001192.Cm prohibit-password
deraadt@openbsd.org1dc8d932015-08-06 14:53:21 +00001193or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001194.Cm without-password ,
deraadt@openbsd.org1dc8d932015-08-06 14:53:21 +00001195password and keyboard-interactive authentication are disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001196.Pp
1197If this option is set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001198.Cm forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001199root login with public key authentication will be allowed,
1200but only if the
1201.Ar command
1202option has been specified
1203(which may be useful for taking remote backups even if root login is
Damien Millerfbf486b2003-05-23 18:44:23 +10001204normally not allowed).
1205All other authentication methods are disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001206.Pp
1207If this option is set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001208.Cm no ,
Darren Tuckerb3509012005-01-20 11:01:46 +11001209root is not allowed to log in.
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +00001210.It Cm PermitTTY
1211Specifies whether
1212.Xr pty 4
1213allocation is permitted.
1214The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001215.Cm yes .
Damien Millerd27b9472005-12-13 19:29:02 +11001216.It Cm PermitTunnel
1217Specifies whether
1218.Xr tun 4
1219device forwarding is allowed.
Damien Miller7b58e802005-12-13 19:33:19 +11001220The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001221.Cm yes ,
1222.Cm point-to-point
Damien Miller991dba42006-07-10 20:16:27 +10001223(layer 3),
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001224.Cm ethernet
Damien Miller991dba42006-07-10 20:16:27 +10001225(layer 2), or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001226.Cm no .
Damien Miller991dba42006-07-10 20:16:27 +10001227Specifying
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001228.Cm yes
Damien Miller991dba42006-07-10 20:16:27 +10001229permits both
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001230.Cm point-to-point
Damien Miller991dba42006-07-10 20:16:27 +10001231and
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001232.Cm ethernet .
Damien Millerd27b9472005-12-13 19:29:02 +11001233The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001234.Cm no .
djm@openbsd.org48dffd52014-09-09 09:45:36 +00001235.Pp
1236Independent of this setting, the permissions of the selected
1237.Xr tun 4
1238device must allow access to the user.
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001239.It Cm PermitUserEnvironment
1240Specifies whether
1241.Pa ~/.ssh/environment
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001242and
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001243.Cm environment=
1244options in
1245.Pa ~/.ssh/authorized_keys
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001246are processed by
Damien Miller5b0d63f2006-03-15 11:56:56 +11001247.Xr sshd 8 .
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001248The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001249.Cm no .
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001250Enabling environment processing may enable users to bypass access
1251restrictions in some configurations using mechanisms such as
1252.Ev LD_PRELOAD .
Damien Miller72e6b5c2014-07-04 09:00:04 +10001253.It Cm PermitUserRC
1254Specifies whether any
1255.Pa ~/.ssh/rc
1256file is executed.
1257The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001258.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001259.It Cm PidFile
Ben Lindstrom959de992002-06-23 00:35:25 +00001260Specifies the file that contains the process ID of the
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001261SSH daemon, or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001262.Cm none
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001263to not write one.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001264The default is
1265.Pa /var/run/sshd.pid .
1266.It Cm Port
1267Specifies the port number that
Damien Miller5b0d63f2006-03-15 11:56:56 +11001268.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001269listens on.
1270The default is 22.
1271Multiple options of this type are permitted.
1272See also
1273.Cm ListenAddress .
1274.It Cm PrintLastLog
1275Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001276.Xr sshd 8
Darren Tucker7cc5c232004-11-05 20:06:59 +11001277should print the date and time of the last user login when a user logs
1278in interactively.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001279The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001280.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001281.It Cm PrintMotd
1282Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001283.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001284should print
1285.Pa /etc/motd
1286when a user logs in interactively.
1287(On some systems it is also printed by the shell,
1288.Pa /etc/profile ,
1289or equivalent.)
1290The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001291.Cm yes .
djm@openbsd.org1f729f02015-01-13 07:39:19 +00001292.It Cm PubkeyAcceptedKeyTypes
1293Specifies the key types that will be accepted for public key authentication
1294as a comma-separated pattern list.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +00001295Alternately if the specified value begins with a
1296.Sq +
1297character, then the specified key types will be appended to the default set
1298instead of replacing them.
djm@openbsd.org68bc8cf2017-02-03 23:01:19 +00001299If the specified value begins with a
1300.Sq -
1301character, then the specified key types (including wildcards) will be removed
1302from the default set instead of replacing them.
markus@openbsd.org3a1638d2015-07-10 06:21:53 +00001303The default for this option is:
1304.Bd -literal -offset 3n
1305ecdsa-sha2-nistp256-cert-v01@openssh.com,
1306ecdsa-sha2-nistp384-cert-v01@openssh.com,
1307ecdsa-sha2-nistp521-cert-v01@openssh.com,
1308ssh-ed25519-cert-v01@openssh.com,
1309ssh-rsa-cert-v01@openssh.com,
1310ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
djm@openbsd.org3a13cb52016-02-17 08:57:34 +00001311ssh-ed25519,ssh-rsa
markus@openbsd.org3a1638d2015-07-10 06:21:53 +00001312.Ed
1313.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001314The list of available key types may also be obtained using
1315.Qq ssh -Q key .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001316.It Cm PubkeyAuthentication
1317Specifies whether public key authentication is allowed.
1318The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001319.Cm yes .
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001320.It Cm RekeyLimit
1321Specifies the maximum amount of data that may be transmitted before the
1322session key is renegotiated, optionally followed a maximum amount of
1323time that may pass before the session key is renegotiated.
1324The first argument is specified in bytes and may have a suffix of
1325.Sq K ,
1326.Sq M ,
1327or
1328.Sq G
1329to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1330The default is between
1331.Sq 1G
1332and
1333.Sq 4G ,
1334depending on the cipher.
1335The optional second value is specified in seconds and may use any of the
1336units documented in the
1337.Sx TIME FORMATS
Darren Tucker64d22942013-05-16 20:31:29 +10001338section.
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001339The default value for
1340.Cm RekeyLimit
1341is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001342.Cm default none ,
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001343which means that rekeying is performed after the cipher's default amount
1344of data has been sent or received and no time based rekeying is done.
Damien Miller1aed65e2010-03-04 21:53:35 +11001345.It Cm RevokedKeys
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001346Specifies revoked public keys file, or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001347.Cm none
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001348to not use one.
Damien Miller1aed65e2010-03-04 21:53:35 +11001349Keys listed in this file will be refused for public key authentication.
1350Note that if this file is not readable, then public key authentication will
1351be refused for all users.
Damien Millerf3747bf2013-01-18 11:44:04 +11001352Keys may be specified as a text file, listing one public key per line, or as
1353an OpenSSH Key Revocation List (KRL) as generated by
Damien Miller72abeb72013-01-20 22:33:44 +11001354.Xr ssh-keygen 1 .
Damien Millerfecfd112013-07-18 16:11:50 +10001355For more information on KRLs, see the KEY REVOCATION LISTS section in
Damien Millerf3747bf2013-01-18 11:44:04 +11001356.Xr ssh-keygen 1 .
Damien Miller7acefbb2014-07-18 14:11:24 +10001357.It Cm StreamLocalBindMask
1358Sets the octal file creation mode mask
1359.Pq umask
1360used when creating a Unix-domain socket file for local or remote
1361port forwarding.
1362This option is only used for port forwarding to a Unix-domain socket file.
1363.Pp
1364The default value is 0177, which creates a Unix-domain socket file that is
1365readable and writable only by the owner.
1366Note that not all operating systems honor the file mode on Unix-domain
1367socket files.
1368.It Cm StreamLocalBindUnlink
1369Specifies whether to remove an existing Unix-domain socket file for local
1370or remote port forwarding before creating a new one.
1371If the socket file already exists and
1372.Cm StreamLocalBindUnlink
1373is not enabled,
1374.Nm sshd
1375will be unable to forward the port to the Unix-domain socket file.
1376This option is only used for port forwarding to a Unix-domain socket file.
1377.Pp
1378The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001379.Cm yes
Damien Miller7acefbb2014-07-18 14:11:24 +10001380or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001381.Cm no .
Damien Miller7acefbb2014-07-18 14:11:24 +10001382The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001383.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001384.It Cm StrictModes
1385Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001386.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001387should check file modes and ownership of the
1388user's files and home directory before accepting login.
1389This is normally desirable because novices sometimes accidentally leave their
1390directory or files world-writable.
1391The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001392.Cm yes .
Darren Tuckerf788a912010-01-08 17:06:47 +11001393Note that this does not apply to
1394.Cm ChrootDirectory ,
1395whose permissions and ownership are checked unconditionally.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001396.It Cm Subsystem
Damien Miller208f1ed2006-03-15 11:56:03 +11001397Configures an external subsystem (e.g. file transfer daemon).
Damien Miller917f9b62006-07-10 20:36:47 +10001398Arguments should be a subsystem name and a command (with optional arguments)
1399to execute upon subsystem request.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001400.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001401The command
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001402.Cm sftp-server
1403implements the SFTP file transfer subsystem.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001404.Pp
1405Alternately the name
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001406.Cm internal-sftp
1407implements an in-process SFTP server.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001408This may simplify configurations using
1409.Cm ChrootDirectory
1410to force a different filesystem root on clients.
1411.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001412By default no subsystems are defined.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001413.It Cm SyslogFacility
1414Gives the facility code that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +11001415.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001416The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1417LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1418The default is AUTH.
Damien Miller12c150e2003-12-17 16:31:10 +11001419.It Cm TCPKeepAlive
1420Specifies whether the system should send TCP keepalive messages to the
1421other side.
1422If they are sent, death of the connection or crash of one
1423of the machines will be properly noticed.
1424However, this means that
1425connections will die if the route is down temporarily, and some people
1426find it annoying.
1427On the other hand, if TCP keepalives are not sent,
1428sessions may hang indefinitely on the server, leaving
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001429.Qq ghost
Damien Miller12c150e2003-12-17 16:31:10 +11001430users and consuming server resources.
1431.Pp
1432The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001433.Cm yes
Damien Miller12c150e2003-12-17 16:31:10 +11001434(to send TCP keepalive messages), and the server will notice
1435if the network goes down or the client host crashes.
1436This avoids infinitely hanging sessions.
1437.Pp
1438To disable TCP keepalive messages, the value should be set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001439.Cm no .
Damien Miller1aed65e2010-03-04 21:53:35 +11001440.It Cm TrustedUserCAKeys
1441Specifies a file containing public keys of certificate authorities that are
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001442trusted to sign user certificates for authentication, or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001443.Cm none
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001444to not use one.
Damien Miller72b33822010-03-05 07:39:01 +11001445Keys are listed one per line; empty lines and comments starting with
Damien Miller1aed65e2010-03-04 21:53:35 +11001446.Ql #
1447are allowed.
1448If a certificate is presented for authentication and has its signing CA key
1449listed in this file, then it may be used for authentication for any user
1450listed in the certificate's principals list.
1451Note that certificates that lack a list of principals will not be permitted
1452for authentication using
1453.Cm TrustedUserCAKeys .
Damien Millerfecfd112013-07-18 16:11:50 +10001454For more details on certificates, see the CERTIFICATES section in
Damien Miller1aed65e2010-03-04 21:53:35 +11001455.Xr ssh-keygen 1 .
Damien Miller3a961dc2003-06-03 10:25:48 +10001456.It Cm UseDNS
1457Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001458.Xr sshd 8
djm@openbsd.orgc63c9a62015-07-20 00:30:01 +00001459should look up the remote host name, and to check that
Damien Miller3a961dc2003-06-03 10:25:48 +10001460the resolved host name for the remote IP address maps back to the
1461very same IP address.
djm@openbsd.orgc63c9a62015-07-20 00:30:01 +00001462.Pp
1463If this option is set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001464.Cm no
djm@openbsd.orgc63c9a62015-07-20 00:30:01 +00001465(the default) then only addresses and not host names may be used in
djm@openbsd.org0235a5f2016-03-17 17:19:43 +00001466.Pa ~/.ssh/authorized_keys
djm@openbsd.orgc63c9a62015-07-20 00:30:01 +00001467.Cm from
1468and
jmc@openbsd.org1f8d3d62015-08-14 15:32:41 +00001469.Nm
djm@openbsd.orgc63c9a62015-07-20 00:30:01 +00001470.Cm Match
1471.Cm Host
1472directives.
Damien Miller2e193e22003-05-14 15:13:03 +10001473.It Cm UsePAM
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001474Enables the Pluggable Authentication Module interface.
1475If set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001476.Cm yes
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001477this will enable PAM authentication using
1478.Cm ChallengeResponseAuthentication
Darren Tuckera4904f72006-02-23 21:35:30 +11001479and
1480.Cm PasswordAuthentication
1481in addition to PAM account and session module processing for all
1482authentication types.
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001483.Pp
1484Because PAM challenge-response authentication usually serves an equivalent
1485role to password authentication, you should disable either
1486.Cm PasswordAuthentication
1487or
1488.Cm ChallengeResponseAuthentication.
1489.Pp
1490If
1491.Cm UsePAM
1492is enabled, you will not be able to run
1493.Xr sshd 8
1494as a non-root user.
1495The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001496.Cm no .
Damien Miller23528812012-04-22 11:24:43 +10001497.It Cm VersionAddendum
1498Optionally specifies additional text to append to the SSH protocol banner
1499sent by the server upon connection.
1500The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001501.Cm none .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001502.It Cm X11DisplayOffset
1503Specifies the first display number available for
Damien Miller5b0d63f2006-03-15 11:56:56 +11001504.Xr sshd 8 Ns 's
Ben Lindstrom9f049032002-06-21 00:59:05 +00001505X11 forwarding.
Damien Miller5b0d63f2006-03-15 11:56:56 +11001506This prevents sshd from interfering with real X11 servers.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001507The default is 10.
1508.It Cm X11Forwarding
1509Specifies whether X11 forwarding is permitted.
Damien Miller101c4a72002-09-19 11:51:21 +10001510The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001511.Cm yes
Damien Miller101c4a72002-09-19 11:51:21 +10001512or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001513.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001514The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001515.Cm no .
Damien Miller101c4a72002-09-19 11:51:21 +10001516.Pp
1517When X11 forwarding is enabled, there may be additional exposure to
1518the server and to client displays if the
Damien Miller5b0d63f2006-03-15 11:56:56 +11001519.Xr sshd 8
Damien Miller101c4a72002-09-19 11:51:21 +10001520proxy display is configured to listen on the wildcard address (see
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001521.Cm X11UseLocalhost ) ,
1522though this is not the default.
Damien Miller101c4a72002-09-19 11:51:21 +10001523Additionally, the authentication spoofing and authentication data
1524verification and substitution occur on the client side.
1525The security risk of using X11 forwarding is that the client's X11
Damien Miller5b0d63f2006-03-15 11:56:56 +11001526display server may be exposed to attack when the SSH client requests
Damien Miller101c4a72002-09-19 11:51:21 +10001527forwarding (see the warnings for
1528.Cm ForwardX11
1529in
Damien Millerf1ce5052003-06-11 22:04:39 +10001530.Xr ssh_config 5 ) .
Damien Miller101c4a72002-09-19 11:51:21 +10001531A system administrator may have a stance in which they want to
1532protect clients that may expose themselves to attack by unwittingly
1533requesting X11 forwarding, which can warrant a
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001534.Cm no
Damien Miller101c4a72002-09-19 11:51:21 +10001535setting.
1536.Pp
1537Note that disabling X11 forwarding does not prevent users from
1538forwarding X11 traffic, as users can always install their own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001539.It Cm X11UseLocalhost
1540Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001541.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001542should bind the X11 forwarding server to the loopback address or to
Damien Miller495dca32003-04-01 21:42:14 +10001543the wildcard address.
1544By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +11001545sshd binds the forwarding server to the loopback address and sets the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001546hostname part of the
1547.Ev DISPLAY
1548environment variable to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001549.Cm localhost .
Ben Lindstrom15b61202002-08-20 18:44:24 +00001550This prevents remote hosts from connecting to the proxy display.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001551However, some older X11 clients may not function with this
1552configuration.
1553.Cm X11UseLocalhost
1554may be set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001555.Cm no
Ben Lindstrom9f049032002-06-21 00:59:05 +00001556to specify that the forwarding server should be bound to the wildcard
1557address.
1558The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001559.Cm yes
Ben Lindstrom9f049032002-06-21 00:59:05 +00001560or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001561.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001562The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001563.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001564.It Cm XAuthLocation
Damien Miller05913ba2002-09-04 16:51:03 +10001565Specifies the full pathname of the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001566.Xr xauth 1
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001567program, or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001568.Cm none
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001569to not use one.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001570The default is
1571.Pa /usr/X11R6/bin/xauth .
1572.El
Damien Millere3beba22006-03-15 11:59:25 +11001573.Sh TIME FORMATS
Damien Millerf4f22b52006-03-15 11:57:25 +11001574.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001575command-line arguments and configuration file options that specify time
1576may be expressed using a sequence of the form:
1577.Sm off
Ben Lindstrom1f8cf4f2002-08-20 18:43:27 +00001578.Ar time Op Ar qualifier ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001579.Sm on
1580where
1581.Ar time
1582is a positive integer value and
1583.Ar qualifier
1584is one of the following:
1585.Pp
1586.Bl -tag -width Ds -compact -offset indent
Damien Miller393821a2006-07-24 14:04:53 +10001587.It Aq Cm none
Ben Lindstrom9f049032002-06-21 00:59:05 +00001588seconds
1589.It Cm s | Cm S
1590seconds
1591.It Cm m | Cm M
1592minutes
1593.It Cm h | Cm H
1594hours
1595.It Cm d | Cm D
1596days
1597.It Cm w | Cm W
1598weeks
1599.El
1600.Pp
1601Each member of the sequence is added together to calculate
1602the total time value.
1603.Pp
1604Time format examples:
1605.Pp
1606.Bl -tag -width Ds -compact -offset indent
1607.It 600
1608600 seconds (10 minutes)
1609.It 10m
161010 minutes
1611.It 1h30m
16121 hour 30 minutes (90 minutes)
1613.El
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +00001614.Sh TOKENS
1615Arguments to some keywords can make use of tokens,
1616which are expanded at runtime:
1617.Pp
1618.Bl -tag -width XXXX -offset indent -compact
1619.It %%
1620A literal
1621.Sq % .
1622.It %F
1623The fingerprint of the CA key.
1624.It %f
1625The fingerprint of the key or certificate.
1626.It %h
1627The home directory of the user.
1628.It %i
1629The key ID in the certificate.
1630.It %K
1631The base64-encoded CA key.
1632.It %k
1633The base64-encoded key or certificate for authentication.
1634.It %s
1635The serial number of the certificate.
1636.It \&%T
1637The type of the CA key.
1638.It %t
1639The key or certificate type.
1640.It %u
1641The username.
1642.El
1643.Pp
1644.Cm AuthorizedKeysCommand
jmc@openbsd.orga1187bd2017-01-06 16:28:12 +00001645accepts the tokens %%, %f, %h, %k, %t, and %u.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +00001646.Pp
1647.Cm AuthorizedKeysFile
1648accepts the tokens %%, %h, and %u.
1649.Pp
1650.Cm AuthorizedPrincipalsCommand
jmc@openbsd.orga1187bd2017-01-06 16:28:12 +00001651accepts the tokens %%, %F, %f, %h, %i, %K, %k, %s, %T, %t, and %u.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +00001652.Pp
1653.Cm AuthorizedPrincipalsFile
1654accepts the tokens %%, %h, and %u.
1655.Pp
1656.Cm ChrootDirectory
1657accepts the tokens %%, %h, and %u.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001658.Sh FILES
1659.Bl -tag -width Ds
1660.It Pa /etc/ssh/sshd_config
1661Contains configuration data for
Damien Millerf4f22b52006-03-15 11:57:25 +11001662.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001663This file should be writable by root only, but it is recommended
1664(though not necessary) that it be world-readable.
1665.El
Damien Millerf1ce5052003-06-11 22:04:39 +10001666.Sh SEE ALSO
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001667.Xr sftp-server 8 ,
Damien Millerf1ce5052003-06-11 22:04:39 +10001668.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001669.Sh AUTHORS
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001670.An -nosplit
Ben Lindstrom9f049032002-06-21 00:59:05 +00001671OpenSSH is a derivative of the original and free
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001672ssh 1.2.12 release by
1673.An Tatu Ylonen .
1674.An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
1675.An Theo de Raadt
1676and
1677.An Dug Song
Ben Lindstrom9f049032002-06-21 00:59:05 +00001678removed many bugs, re-added newer features and
1679created OpenSSH.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001680.An Markus Friedl
1681contributed the support for SSH protocol versions 1.5 and 2.0.
1682.An Niels Provos
1683and
1684.An Markus Friedl
1685contributed support for privilege separation.