blob: c89f378740056ac08544800f49eed88f68709eba [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.org8042bad2017-09-01 05:50:48 +000036.\" $OpenBSD: sshd_config.5,v 1.251 2017/09/01 05:50:48 djm Exp $
37.Dd $Mdocdate: September 1 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
Ben Lindstrom9f049032002-06-21 00:59:05 +000043.Sh DESCRIPTION
Damien Millerf4f22b52006-03-15 11:57:25 +110044.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +000045reads configuration data from
46.Pa /etc/ssh/sshd_config
47(or the file specified with
48.Fl f
49on the command line).
50The file contains keyword-argument pairs, one per line.
51Lines starting with
52.Ql #
53and empty lines are interpreted as comments.
Damien Miller306d1182006-03-15 12:05:59 +110054Arguments may optionally be enclosed in double quotes
55.Pq \&"
56in order to represent arguments containing spaces.
Ben Lindstrom9f049032002-06-21 00:59:05 +000057.Pp
58The possible
59keywords and their meanings are as follows (note that
60keywords are case-insensitive and arguments are case-sensitive):
61.Bl -tag -width Ds
Darren Tucker46bc0752004-05-02 22:11:30 +100062.It Cm AcceptEnv
63Specifies what environment variables sent by the client will be copied into
64the session's
65.Xr environ 7 .
66See
67.Cm SendEnv
68in
69.Xr ssh_config 5
70for how to configure the client.
jmc@openbsd.orga685ae82016-02-17 07:38:19 +000071The
dtucker@openbsd.org85b96ef2015-04-28 10:17:58 +000072.Ev TERM
jmc@openbsd.orgc1d5bcf2015-04-28 13:47:38 +000073environment variable is always sent whenever the client
djm@openbsd.org732d61f2015-06-05 03:44:14 +000074requests a pseudo-terminal as it is required by the protocol.
Darren Tucker46bc0752004-05-02 22:11:30 +100075Variables are specified by name, which may contain the wildcard characters
Damien Miller208f1ed2006-03-15 11:56:03 +110076.Ql *
Darren Tucker46bc0752004-05-02 22:11:30 +100077and
78.Ql \&? .
Darren Tucker1e0c9bf2004-05-02 22:12:48 +100079Multiple environment variables may be separated by whitespace or spread
Darren Tucker46bc0752004-05-02 22:11:30 +100080across multiple
81.Cm AcceptEnv
82directives.
Darren Tucker1e0c9bf2004-05-02 22:12:48 +100083Be warned that some environment variables could be used to bypass restricted
Darren Tucker46bc0752004-05-02 22:11:30 +100084user environments.
85For this reason, care should be taken in the use of this directive.
86The default is not to accept any environment variables.
Darren Tucker0f383232005-01-20 10:57:56 +110087.It Cm AddressFamily
88Specifies which address family should be used by
Damien Millerf4f22b52006-03-15 11:57:25 +110089.Xr sshd 8 .
Darren Tucker0f383232005-01-20 10:57:56 +110090Valid arguments are
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +000091.Cm any
92(the default),
93.Cm inet
Damien Miller5b0d63f2006-03-15 11:56:56 +110094(use IPv4 only), or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +000095.Cm inet6
Darren Tucker0f383232005-01-20 10:57:56 +110096(use IPv6 only).
Damien Millere9890192008-05-19 14:59:02 +100097.It Cm AllowAgentForwarding
98Specifies whether
99.Xr ssh-agent 1
100forwarding is permitted.
101The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000102.Cm yes .
Damien Millere9890192008-05-19 14:59:02 +1000103Note 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.
Damien Miller7acefbb2014-07-18 14:11:24 +1000123.It Cm AllowStreamLocalForwarding
124Specifies whether StreamLocal (Unix-domain socket) forwarding is permitted.
125The available options are
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000126.Cm yes
127(the default)
Damien Miller7acefbb2014-07-18 14:11:24 +1000128or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000129.Cm all
Damien Miller7acefbb2014-07-18 14:11:24 +1000130to allow StreamLocal forwarding,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000131.Cm no
Damien Miller7acefbb2014-07-18 14:11:24 +1000132to prevent all StreamLocal forwarding,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000133.Cm local
Damien Miller7acefbb2014-07-18 14:11:24 +1000134to allow local (from the perspective of
135.Xr ssh 1 )
136forwarding only or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000137.Cm remote
Damien Miller7acefbb2014-07-18 14:11:24 +1000138to allow remote forwarding only.
Damien Miller7acefbb2014-07-18 14:11:24 +1000139Note that disabling StreamLocal forwarding does not improve security unless
140users are also denied shell access, as they can always install their
141own forwarders.
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000142.It Cm AllowTcpForwarding
143Specifies whether TCP forwarding is permitted.
144The available options are
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000145.Cm yes
146(the default)
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000147or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000148.Cm all
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000149to allow TCP forwarding,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000150.Cm no
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000151to prevent all TCP forwarding,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000152.Cm local
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000153to allow local (from the perspective of
154.Xr ssh 1 )
155forwarding only or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000156.Cm remote
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000157to allow remote forwarding only.
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +0000158Note that disabling TCP forwarding does not improve security unless
159users are also denied shell access, as they can always install their
160own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000161.It Cm AllowUsers
162This keyword can be followed by a list of user name patterns, separated
163by spaces.
Damien Miller5a93add2003-01-24 11:34:52 +1100164If specified, login is allowed only for user names that
Ben Lindstrom9f049032002-06-21 00:59:05 +0000165match one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000166Only user names are valid; a numerical user ID is not recognized.
167By default, login is allowed for all users.
168If the pattern takes the form USER@HOST then USER and HOST
169are separately checked, restricting logins to particular
170users from particular hosts.
jmc@openbsd.orgee1e0a12016-04-27 13:53:48 +0000171HOST criteria may additionally contain addresses to match in CIDR
172address/masklen format.
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
djm@openbsd.orgb64faeb2016-06-17 05:03:40 +0000187authentication method names, or by the single string
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000188.Cm any
djm@openbsd.orgb64faeb2016-06-17 05:03:40 +0000189to indicate the default behaviour of accepting any single authentication
jmc@openbsd.orgad23a752016-06-17 06:33:30 +0000190method.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000191If the default is overridden, then successful authentication requires
djm@openbsd.orgb64faeb2016-06-17 05:03:40 +0000192completion of every method in at least one of these lists.
Damien Millera6e3f012012-11-04 23:21:40 +1100193.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000194For example,
195.Qq publickey,password publickey,keyboard-interactive
Damien Millera6e3f012012-11-04 23:21:40 +1100196would require the user to complete public key authentication, followed by
197either password or keyboard interactive authentication.
198Only methods that are next in one or more lists are offered at each stage,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000199so for this example it would not be possible to attempt password or
Damien Millera6e3f012012-11-04 23:21:40 +1100200keyboard-interactive authentication before public key.
201.Pp
Damien Miller91a55f22013-04-23 15:18:10 +1000202For keyboard interactive authentication it is also possible to
203restrict authentication to a specific device by appending a
204colon followed by the device identifier
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000205.Cm bsdauth ,
206.Cm pam ,
Damien Miller91a55f22013-04-23 15:18:10 +1000207or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000208.Cm skey ,
Damien Miller91a55f22013-04-23 15:18:10 +1000209depending on the server configuration.
210For example,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000211.Qq keyboard-interactive:bsdauth
Damien Miller91a55f22013-04-23 15:18:10 +1000212would restrict keyboard interactive authentication to the
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000213.Cm bsdauth
Damien Miller91a55f22013-04-23 15:18:10 +1000214device.
215.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000216If the publickey method is listed more than once,
djm@openbsd.orgf69b69b2014-12-22 07:51:30 +0000217.Xr sshd 8
218verifies that keys that have been used successfully are not reused for
219subsequent authentications.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000220For example,
221.Qq publickey,publickey
222requires successful authentication using two different public keys.
djm@openbsd.orgf69b69b2014-12-22 07:51:30 +0000223.Pp
Damien Millera6e3f012012-11-04 23:21:40 +1100224Note that each authentication method listed should also be explicitly enabled
225in the configuration.
djm@openbsd.org8042bad2017-09-01 05:50:48 +0000226.Pp
227The available authentication methods are:
228.Qq gssapi-with-mic ,
229.Qq hostbased ,
230.Qq keyboard-interactive ,
231.Qq none
232(used for access to password-less accounts when
233.Cm PermitEmptyPassword
234is enabled),
235.Qq password
236and
237.Qq publickey .
238
Damien Miller09d3e122012-10-31 08:58:58 +1100239.It Cm AuthorizedKeysCommand
Damien Millerf33580e2012-11-04 22:22:52 +1100240Specifies a program to be used to look up the user's public keys.
djm@openbsd.org24232a32015-05-21 06:38:35 +0000241The program must be owned by root, not writable by group or others and
242specified by an absolute path.
djm@openbsd.org24232a32015-05-21 06:38:35 +0000243Arguments to
244.Cm AuthorizedKeysCommand
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000245accept the tokens described in the
246.Sx TOKENS
247section.
248If no arguments are specified then the username of the target user is used.
djm@openbsd.org24232a32015-05-21 06:38:35 +0000249.Pp
250The program should produce on standard output zero or
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000251more lines of authorized_keys output (see
252.Sx AUTHORIZED_KEYS
253in
Damien Millerf33580e2012-11-04 22:22:52 +1100254.Xr sshd 8 ) .
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000255If a key supplied by
256.Cm AuthorizedKeysCommand
257does not successfully authenticate
Damien Miller09d3e122012-10-31 08:58:58 +1100258and authorize the user then public key authentication continues using the usual
259.Cm AuthorizedKeysFile
260files.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000261By default, no
262.Cm AuthorizedKeysCommand
263is run.
Damien Miller09d3e122012-10-31 08:58:58 +1100264.It Cm AuthorizedKeysCommandUser
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000265Specifies the user under whose account the
266.Cm AuthorizedKeysCommand
267is run.
Damien Miller09d3e122012-10-31 08:58:58 +1100268It is recommended to use a dedicated user that has no other role on the host
269than running authorized keys commands.
djm@openbsd.orgf1c4d8e2014-12-22 08:04:23 +0000270If
djm@openbsd.orgd663bea2014-12-11 05:25:06 +0000271.Cm AuthorizedKeysCommand
djm@openbsd.orgf1c4d8e2014-12-22 08:04:23 +0000272is specified but
273.Cm AuthorizedKeysCommandUser
274is not, then
275.Xr sshd 8
276will refuse to start.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000277.It Cm AuthorizedKeysFile
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000278Specifies the file that contains the public keys used for user authentication.
Damien Miller6018a362010-07-02 13:35:19 +1000279The format is described in the
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000280.Sx AUTHORIZED_KEYS FILE FORMAT
Damien Miller6018a362010-07-02 13:35:19 +1000281section of
282.Xr sshd 8 .
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000283Arguments to
Ben Lindstrom9f049032002-06-21 00:59:05 +0000284.Cm AuthorizedKeysFile
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000285accept the tokens described in the
286.Sx TOKENS
287section.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000288After expansion,
289.Cm AuthorizedKeysFile
290is taken to be an absolute path or one relative to the user's home
291directory.
Damien Millerb9132fc2011-05-29 21:41:40 +1000292Multiple files may be listed, separated by whitespace.
djm@openbsd.org2bca8a42015-09-11 03:13:36 +0000293Alternately this option may be set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000294.Cm none
djm@openbsd.org2bca8a42015-09-11 03:13:36 +0000295to skip checking for user keys in files.
Damien Millerb9132fc2011-05-29 21:41:40 +1000296The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000297.Qq .ssh/authorized_keys .ssh/authorized_keys2 .
djm@openbsd.orgbcc50d82015-05-21 06:43:30 +0000298.It Cm AuthorizedPrincipalsCommand
299Specifies a program to be used to generate the list of allowed
300certificate principals as per
301.Cm AuthorizedPrincipalsFile .
302The program must be owned by root, not writable by group or others and
303specified by an absolute path.
djm@openbsd.orgbcc50d82015-05-21 06:43:30 +0000304Arguments to
305.Cm AuthorizedPrincipalsCommand
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000306accept the tokens described in the
307.Sx TOKENS
308section.
309If no arguments are specified then the username of the target user is used.
djm@openbsd.orgbcc50d82015-05-21 06:43:30 +0000310.Pp
311The program should produce on standard output zero or
312more lines of
313.Cm AuthorizedPrincipalsFile
314output.
315If either
316.Cm AuthorizedPrincipalsCommand
317or
318.Cm AuthorizedPrincipalsFile
319is specified, then certificates offered by the client for authentication
320must contain a principal that is listed.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000321By default, no
322.Cm AuthorizedPrincipalsCommand
323is run.
djm@openbsd.orgbcc50d82015-05-21 06:43:30 +0000324.It Cm AuthorizedPrincipalsCommandUser
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000325Specifies the user under whose account the
326.Cm AuthorizedPrincipalsCommand
327is run.
djm@openbsd.orgbcc50d82015-05-21 06:43:30 +0000328It is recommended to use a dedicated user that has no other role on the host
329than running authorized principals commands.
330If
331.Cm AuthorizedPrincipalsCommand
332is specified but
333.Cm AuthorizedPrincipalsCommandUser
334is not, then
335.Xr sshd 8
336will refuse to start.
Damien Miller30da3442010-05-10 11:58:03 +1000337.It Cm AuthorizedPrincipalsFile
338Specifies a file that lists principal names that are accepted for
339certificate authentication.
340When using certificates signed by a key listed in
341.Cm TrustedUserCAKeys ,
342this file lists names, one of which must appear in the certificate for it
343to be accepted for authentication.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000344Names are listed one per line preceded by key options (as described in
345.Sx AUTHORIZED_KEYS FILE FORMAT
346in
Damien Millerd59dab82010-07-02 13:37:17 +1000347.Xr sshd 8 ) .
Damien Miller6018a362010-07-02 13:35:19 +1000348Empty lines and comments starting with
Damien Miller30da3442010-05-10 11:58:03 +1000349.Ql #
350are ignored.
351.Pp
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000352Arguments to
Damien Miller30da3442010-05-10 11:58:03 +1000353.Cm AuthorizedPrincipalsFile
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000354accept the tokens described in the
355.Sx TOKENS
356section.
Damien Miller30da3442010-05-10 11:58:03 +1000357After expansion,
358.Cm AuthorizedPrincipalsFile
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000359is taken to be an absolute path or one relative to the user's home directory.
Damien Miller8fef9eb2012-04-22 11:25:10 +1000360The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000361.Cm none ,
Damien Miller8fef9eb2012-04-22 11:25:10 +1000362i.e. not to use a principals file \(en in this case, the username
Damien Miller30da3442010-05-10 11:58:03 +1000363of the user must appear in a certificate's principals list for it to be
364accepted.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000365.Pp
Damien Miller30da3442010-05-10 11:58:03 +1000366Note that
367.Cm AuthorizedPrincipalsFile
368is only used when authentication proceeds using a CA listed in
369.Cm TrustedUserCAKeys
370and is not consulted for certification authorities trusted via
371.Pa ~/.ssh/authorized_keys ,
372though the
373.Cm principals=
374key option offers a similar facility (see
375.Xr sshd 8
376for details).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000377.It Cm Banner
Ben Lindstrom9f049032002-06-21 00:59:05 +0000378The contents of the specified file are sent to the remote user before
379authentication is allowed.
Damien Miller4890e532007-09-17 11:57:38 +1000380If the argument is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000381.Cm none
Damien Miller4890e532007-09-17 11:57:38 +1000382then no banner is displayed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000383By default, no banner is displayed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000384.It Cm ChallengeResponseAuthentication
Damien Miller9c7bf8d2009-08-28 10:27:08 +1000385Specifies whether challenge-response authentication is allowed (e.g. via
Damien Millere8c9f262014-10-03 09:24:56 +1000386PAM or through authentication styles supported in
Damien Miller9c7bf8d2009-08-28 10:27:08 +1000387.Xr login.conf 5 )
Ben Lindstrom9f049032002-06-21 00:59:05 +0000388The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000389.Cm yes .
Damien Millerd8cb1f12008-02-10 22:40:12 +1100390.It Cm ChrootDirectory
Darren Tuckerb8c884a2010-01-08 18:53:43 +1100391Specifies the pathname of a directory to
Damien Millerd8cb1f12008-02-10 22:40:12 +1100392.Xr chroot 2
393to after authentication.
deraadt@openbsd.orgdcff5812015-01-22 20:24:41 +0000394At session startup
395.Xr sshd 8
396checks that all components of the pathname are root-owned directories
397which are not writable by any other user or group.
Darren Tucker51dbe502009-06-21 17:56:51 +1000398After the chroot,
399.Xr sshd 8
400changes the working directory to the user's home directory.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +0000401Arguments to
402.Cm ChrootDirectory
403accept the tokens described in the
404.Sx TOKENS
405section.
Damien Millerd8cb1f12008-02-10 22:40:12 +1100406.Pp
407The
408.Cm ChrootDirectory
409must contain the necessary files and directories to support the
Darren Tuckeraf501cf2009-06-21 17:53:04 +1000410user's session.
Damien Millerd8cb1f12008-02-10 22:40:12 +1100411For an interactive session this requires at least a shell, typically
412.Xr sh 1 ,
413and basic
414.Pa /dev
415nodes such as
416.Xr null 4 ,
417.Xr zero 4 ,
418.Xr stdin 4 ,
419.Xr stdout 4 ,
420.Xr stderr 4 ,
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000421and
Damien Millerd8cb1f12008-02-10 22:40:12 +1100422.Xr tty 4
423devices.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000424For file transfer sessions using SFTP
425no additional configuration of the environment is necessary if the in-process
426sftp-server is used,
Damien Miller426117b2014-07-30 12:33:20 +1000427though sessions which use logging may require
Darren Tucker00fcd712009-06-21 17:56:00 +1000428.Pa /dev/log
Damien Miller426117b2014-07-30 12:33:20 +1000429inside the chroot directory on some operating systems (see
Darren Tucker00fcd712009-06-21 17:56:00 +1000430.Xr sftp-server 8
431for details).
Damien Millerd8cb1f12008-02-10 22:40:12 +1100432.Pp
jmc@openbsd.orga5a3e332015-01-22 21:00:42 +0000433For safety, it is very important that the directory hierarchy be
deraadt@openbsd.orgdcff5812015-01-22 20:24:41 +0000434prevented from modification by other processes on the system (especially
435those outside the jail).
436Misconfiguration can lead to unsafe environments which
437.Xr sshd 8
438cannot detect.
439.Pp
djm@openbsd.org9fd04682015-11-13 04:38:06 +0000440The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000441.Cm none ,
djm@openbsd.org9fd04682015-11-13 04:38:06 +0000442indicating not to
Damien Millerd8cb1f12008-02-10 22:40:12 +1100443.Xr chroot 2 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000444.It Cm Ciphers
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000445Specifies the ciphers allowed.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000446Multiple ciphers must be comma-separated.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000447If the specified value begins with a
448.Sq +
449character, then the specified ciphers will be appended to the default set
450instead of replacing them.
djm@openbsd.org68bc8cf2017-02-03 23:01:19 +0000451If the specified value begins with a
452.Sq -
453character, then the specified ciphers (including wildcards) will be removed
454from the default set instead of replacing them.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000455.Pp
Damien Miller0fde8ac2013-11-21 14:12:23 +1100456The supported ciphers are:
457.Pp
Damien Millerc1621c82014-04-20 13:22:46 +1000458.Bl -item -compact -offset indent
459.It
4603des-cbc
461.It
462aes128-cbc
463.It
464aes192-cbc
465.It
466aes256-cbc
467.It
468aes128-ctr
469.It
470aes192-ctr
471.It
472aes256-ctr
473.It
474aes128-gcm@openssh.com
475.It
476aes256-gcm@openssh.com
477.It
Damien Millerc1621c82014-04-20 13:22:46 +1000478chacha20-poly1305@openssh.com
479.El
Damien Miller0fde8ac2013-11-21 14:12:23 +1100480.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +1100481The default is:
Damien Millerc1621c82014-04-20 13:22:46 +1000482.Bd -literal -offset indent
jmc@openbsd.org1f8d3d62015-08-14 15:32:41 +0000483chacha20-poly1305@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +1000484aes128-ctr,aes192-ctr,aes256-ctr,
jmc@openbsd.org1f8d3d62015-08-14 15:32:41 +0000485aes128-gcm@openssh.com,aes256-gcm@openssh.com
Ben Lindstrom9f049032002-06-21 00:59:05 +0000486.Ed
Damien Miller0fde8ac2013-11-21 14:12:23 +1100487.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000488The list of available ciphers may also be obtained using
489.Qq ssh -Q cipher .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000490.It Cm ClientAliveCountMax
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000491Sets the number of client alive messages which may be sent without
Damien Miller5b0d63f2006-03-15 11:56:56 +1100492.Xr sshd 8
Damien Millerfbf486b2003-05-23 18:44:23 +1000493receiving any messages back from the client.
494If this threshold is reached while client alive messages are being sent,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100495sshd will disconnect the client, terminating the session.
Damien Millerfbf486b2003-05-23 18:44:23 +1000496It is important to note that the use of client alive messages is very
497different from
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000498.Cm TCPKeepAlive .
Damien Millerfbf486b2003-05-23 18:44:23 +1000499The client alive messages are sent through the encrypted channel
500and therefore will not be spoofable.
501The TCP keepalive option enabled by
Damien Miller12c150e2003-12-17 16:31:10 +1100502.Cm TCPKeepAlive
Damien Millerfbf486b2003-05-23 18:44:23 +1000503is spoofable.
504The client alive mechanism is valuable when the client or
Ben Lindstrom9f049032002-06-21 00:59:05 +0000505server depend on knowing when a connection has become inactive.
506.Pp
Damien Millerfbf486b2003-05-23 18:44:23 +1000507The default value is 3.
508If
Ben Lindstrom9f049032002-06-21 00:59:05 +0000509.Cm ClientAliveInterval
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000510is set to 15, and
Ben Lindstrom9f049032002-06-21 00:59:05 +0000511.Cm ClientAliveCountMax
Damien Miller5b0d63f2006-03-15 11:56:56 +1100512is left at the default, unresponsive SSH clients
Ben Lindstrom9f049032002-06-21 00:59:05 +0000513will be disconnected after approximately 45 seconds.
Damien Miller1594ad52005-05-26 12:12:19 +1000514.It Cm ClientAliveInterval
515Sets a timeout interval in seconds after which if no data has been received
516from the client,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100517.Xr sshd 8
Damien Miller1594ad52005-05-26 12:12:19 +1000518will send a message through the encrypted
519channel to request a response from the client.
520The default
521is 0, indicating that these messages will not be sent to the client.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000522.It Cm Compression
djm@openbsd.org4577ade2016-09-28 20:32:42 +0000523Specifies whether compression is enabled after
Damien Miller9786e6e2005-07-26 21:54:56 +1000524the user has authenticated successfully.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000525The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000526.Cm yes ,
527.Cm delayed
djm@openbsd.org4577ade2016-09-28 20:32:42 +0000528(a legacy synonym for
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000529.Cm yes )
Ben Lindstrom9f049032002-06-21 00:59:05 +0000530or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000531.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000532The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000533.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000534.It Cm DenyGroups
535This keyword can be followed by a list of group name patterns, separated
536by spaces.
537Login is disallowed for users whose primary group or supplementary
538group list matches one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000539Only group names are valid; a numerical group ID is not recognized.
540By default, login is allowed for all groups.
Damien Millerac73e512006-03-15 11:58:49 +1100541The allow/deny directives are processed in the following order:
542.Cm DenyUsers ,
543.Cm AllowUsers ,
544.Cm DenyGroups ,
545and finally
546.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100547.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000548See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100549.Xr ssh_config 5
550for more information on patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000551.It Cm DenyUsers
552This keyword can be followed by a list of user name patterns, separated
553by spaces.
554Login is disallowed for user names that match one of the patterns.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000555Only user names are valid; a numerical user ID is not recognized.
556By default, login is allowed for all users.
557If the pattern takes the form USER@HOST then USER and HOST
558are separately checked, restricting logins to particular
559users from particular hosts.
jmc@openbsd.orgee1e0a12016-04-27 13:53:48 +0000560HOST criteria may additionally contain addresses to match in CIDR
561address/masklen format.
Damien Millerac73e512006-03-15 11:58:49 +1100562The allow/deny directives are processed in the following order:
563.Cm DenyUsers ,
564.Cm AllowUsers ,
565.Cm DenyGroups ,
566and finally
567.Cm AllowGroups .
Damien Miller0c2079d2006-03-15 11:54:21 +1100568.Pp
Damien Millerfecfd112013-07-18 16:11:50 +1000569See PATTERNS in
Damien Miller0c2079d2006-03-15 11:54:21 +1100570.Xr ssh_config 5
571for more information on patterns.
djm@openbsd.org7844f352016-11-30 03:00:05 +0000572.It Cm DisableForwarding
573Disables all forwarding features, including X11,
574.Xr ssh-agent 1 ,
575TCP and StreamLocal.
576This option overrides all other forwarding-related options and may
577simplify restricted configurations.
djm@openbsd.org8f574952017-06-24 06:34:38 +0000578.It Cm ExposeAuthInfo
579Enables writing a file containing a list of authentication methods and
580public credentials (e.g. keys) used to authenticate the user.
jmc@openbsd.org40962192017-06-24 06:57:04 +0000581The location of the file is exposed to the user session through the
djm@openbsd.orgf17ee612017-06-24 07:08:57 +0000582.Ev SSH_USER_AUTH
jmc@openbsd.org40962192017-06-24 06:57:04 +0000583environment variable.
djm@openbsd.org56d1c832014-12-21 22:27:55 +0000584.It Cm FingerprintHash
585Specifies the hash algorithm used when logging key fingerprints.
586Valid options are:
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000587.Cm md5
djm@openbsd.org56d1c832014-12-21 22:27:55 +0000588and
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000589.Cm sha256 .
djm@openbsd.org56d1c832014-12-21 22:27:55 +0000590The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000591.Cm sha256 .
Damien Millere2754432006-07-24 14:06:47 +1000592.It Cm ForceCommand
593Forces the execution of the command specified by
594.Cm ForceCommand ,
Damien Millera1b48cc2008-03-27 11:02:02 +1100595ignoring any command supplied by the client and
596.Pa ~/.ssh/rc
597if present.
Damien Millere2754432006-07-24 14:06:47 +1000598The command is invoked by using the user's login shell with the -c option.
599This applies to shell, command, or subsystem execution.
600It is most useful inside a
601.Cm Match
602block.
603The command originally supplied by the client is available in the
604.Ev SSH_ORIGINAL_COMMAND
605environment variable.
Damien Millercdb6e652008-02-10 22:47:24 +1100606Specifying a command of
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000607.Cm internal-sftp
608will force the use of an in-process SFTP server that requires no support
Damien Millercdb6e652008-02-10 22:47:24 +1100609files when used with
610.Cm ChrootDirectory .
djm@openbsd.org9fd04682015-11-13 04:38:06 +0000611The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000612.Cm none .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000613.It Cm GatewayPorts
614Specifies whether remote hosts are allowed to connect to ports
615forwarded for the client.
616By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +1100617.Xr sshd 8
Damien Miller495dca32003-04-01 21:42:14 +1000618binds remote port forwardings to the loopback address.
619This prevents other remote hosts from connecting to forwarded ports.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000620.Cm GatewayPorts
Damien Miller5b0d63f2006-03-15 11:56:56 +1100621can be used to specify that sshd
Damien Millerf91ee4c2005-03-01 21:24:33 +1100622should allow remote port forwardings to bind to non-loopback addresses, thus
623allowing other hosts to connect.
624The argument may be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000625.Cm no
Damien Millerf91ee4c2005-03-01 21:24:33 +1100626to force remote port forwardings to be available to the local host only,
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000627.Cm yes
Damien Millerf91ee4c2005-03-01 21:24:33 +1100628to force remote port forwardings to bind to the wildcard address, or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000629.Cm clientspecified
Damien Millerf91ee4c2005-03-01 21:24:33 +1100630to allow the client to select the address to which the forwarding is bound.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000631The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000632.Cm no .
Darren Tucker0efd1552003-08-26 11:49:55 +1000633.It Cm GSSAPIAuthentication
Damien Miller9b7b03b2003-09-02 22:57:05 +1000634Specifies whether user authentication based on GSSAPI is allowed.
Damien Millera8e06ce2003-11-21 23:48:55 +1100635The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000636.Cm no .
Darren Tucker0efd1552003-08-26 11:49:55 +1000637.It Cm GSSAPICleanupCredentials
638Specifies whether to automatically destroy the user's credentials cache
639on logout.
640The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000641.Cm yes .
djm@openbsd.orgd7c31da2015-05-22 03:50:02 +0000642.It Cm GSSAPIStrictAcceptorCheck
643Determines whether to be strict about the identity of the GSSAPI acceptor
644a client authenticates against.
645If set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000646.Cm yes
647then the client must authenticate against the host
djm@openbsd.orgd7c31da2015-05-22 03:50:02 +0000648service on the current hostname.
649If set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000650.Cm no
djm@openbsd.orgd7c31da2015-05-22 03:50:02 +0000651then the client may authenticate against any service key stored in the
652machine's default store.
653This facility is provided to assist with operation on multi homed machines.
654The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000655.Cm yes .
djm@openbsd.org1f729f02015-01-13 07:39:19 +0000656.It Cm HostbasedAcceptedKeyTypes
657Specifies the key types that will be accepted for hostbased authentication
658as a comma-separated pattern list.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000659Alternately if the specified value begins with a
660.Sq +
661character, then the specified key types will be appended to the default set
662instead of replacing them.
djm@openbsd.org68bc8cf2017-02-03 23:01:19 +0000663If the specified value begins with a
664.Sq -
665character, then the specified key types (including wildcards) will be removed
666from the default set instead of replacing them.
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000667The default for this option is:
668.Bd -literal -offset 3n
669ecdsa-sha2-nistp256-cert-v01@openssh.com,
670ecdsa-sha2-nistp384-cert-v01@openssh.com,
671ecdsa-sha2-nistp521-cert-v01@openssh.com,
672ssh-ed25519-cert-v01@openssh.com,
673ssh-rsa-cert-v01@openssh.com,
674ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
djm@openbsd.org3a13cb52016-02-17 08:57:34 +0000675ssh-ed25519,ssh-rsa
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000676.Ed
677.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000678The list of available key types may also be obtained using
679.Qq ssh -Q key .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000680.It Cm HostbasedAuthentication
681Specifies whether rhosts or /etc/hosts.equiv authentication together
682with successful public key client host authentication is allowed
Damien Miller1faa7132006-03-15 11:55:31 +1100683(host-based authentication).
Ben Lindstrom9f049032002-06-21 00:59:05 +0000684The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000685.Cm no .
Damien Millerb594f382006-08-30 11:06:34 +1000686.It Cm HostbasedUsesNameFromPacketOnly
687Specifies whether or not the server will attempt to perform a reverse
688name lookup when matching the name in the
689.Pa ~/.shosts ,
690.Pa ~/.rhosts ,
691and
692.Pa /etc/hosts.equiv
693files during
694.Cm HostbasedAuthentication .
695A setting of
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000696.Cm yes
Damien Millerb594f382006-08-30 11:06:34 +1000697means that
698.Xr sshd 8
699uses the name supplied by the client rather than
700attempting to resolve the name from the TCP connection itself.
701The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000702.Cm no .
Damien Miller0a80ca12010-02-27 07:55:05 +1100703.It Cm HostCertificate
704Specifies a file containing a public host certificate.
705The certificate's public key must match a private host key already specified
706by
707.Cm HostKey .
708The default behaviour of
709.Xr sshd 8
710is not to load any certificates.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000711.It Cm HostKey
712Specifies a file containing a private host key
713used by SSH.
naddy@openbsd.orgffe65492016-08-15 12:32:04 +0000714The defaults are
Damien Millereb8b60e2010-08-31 22:41:14 +1000715.Pa /etc/ssh/ssh_host_dsa_key ,
Damien Miller8ba0ead2013-12-18 17:46:27 +1100716.Pa /etc/ssh/ssh_host_ecdsa_key ,
717.Pa /etc/ssh/ssh_host_ed25519_key
Ben Lindstrom9f049032002-06-21 00:59:05 +0000718and
naddy@openbsd.orgffe65492016-08-15 12:32:04 +0000719.Pa /etc/ssh/ssh_host_rsa_key .
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000720.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +0000721Note that
Damien Miller5b0d63f2006-03-15 11:56:56 +1100722.Xr sshd 8
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000723will refuse to use a file if it is group/world-accessible
724and that the
725.Cm HostKeyAlgorithms
726option restricts which of the keys are actually used by
727.Xr sshd 8 .
728.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +0000729It is possible to have multiple host key files.
Damien Miller85b45e02013-07-20 13:21:52 +1000730It is also possible to specify public host key files instead.
731In this case operations on the private key will be delegated
732to an
733.Xr ssh-agent 1 .
734.It Cm HostKeyAgent
735Identifies the UNIX-domain socket used to communicate
736with an agent that has access to the private host keys.
markus@openbsd.org1a75d142016-05-04 14:29:58 +0000737If the string
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000738.Qq SSH_AUTH_SOCK
Damien Miller85b45e02013-07-20 13:21:52 +1000739is specified, the location of the socket will be read from the
740.Ev SSH_AUTH_SOCK
741environment variable.
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000742.It Cm HostKeyAlgorithms
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000743Specifies the host key algorithms
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000744that the server offers.
745The default for this option is:
746.Bd -literal -offset 3n
747ecdsa-sha2-nistp256-cert-v01@openssh.com,
748ecdsa-sha2-nistp384-cert-v01@openssh.com,
749ecdsa-sha2-nistp521-cert-v01@openssh.com,
750ssh-ed25519-cert-v01@openssh.com,
751ssh-rsa-cert-v01@openssh.com,
752ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
djm@openbsd.org3a13cb52016-02-17 08:57:34 +0000753ssh-ed25519,ssh-rsa
markus@openbsd.org3a1638d2015-07-10 06:21:53 +0000754.Ed
755.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000756The list of available key types may also be obtained using
757.Qq ssh -Q key .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000758.It Cm IgnoreRhosts
759Specifies that
760.Pa .rhosts
761and
762.Pa .shosts
763files will not be used in
Ben Lindstrom9f049032002-06-21 00:59:05 +0000764.Cm HostbasedAuthentication .
765.Pp
766.Pa /etc/hosts.equiv
767and
768.Pa /etc/shosts.equiv
769are still used.
770The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000771.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000772.It Cm IgnoreUserKnownHosts
773Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +1100774.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000775should ignore the user's
Damien Miller167ea5d2005-05-26 12:04:02 +1000776.Pa ~/.ssh/known_hosts
Ben Lindstrom9f049032002-06-21 00:59:05 +0000777during
Ben Lindstrom9f049032002-06-21 00:59:05 +0000778.Cm HostbasedAuthentication .
779The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000780.Cm no .
Damien Miller0dac6fb2010-11-20 15:19:38 +1100781.It Cm IPQoS
782Specifies the IPv4 type-of-service or DSCP class for the connection.
783Accepted values are
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000784.Cm af11 ,
785.Cm af12 ,
786.Cm af13 ,
787.Cm af21 ,
788.Cm af22 ,
789.Cm af23 ,
790.Cm af31 ,
791.Cm af32 ,
792.Cm af33 ,
793.Cm af41 ,
794.Cm af42 ,
795.Cm af43 ,
796.Cm cs0 ,
797.Cm cs1 ,
798.Cm cs2 ,
799.Cm cs3 ,
800.Cm cs4 ,
801.Cm cs5 ,
802.Cm cs6 ,
803.Cm cs7 ,
804.Cm ef ,
805.Cm lowdelay ,
806.Cm throughput ,
807.Cm reliability ,
djm@openbsd.org51676ec2017-07-23 23:37:02 +0000808a numeric value, or
809.Cm none
810to use the operating system default.
Damien Miller928362d2010-12-26 14:26:45 +1100811This option may take one or two arguments, separated by whitespace.
Damien Miller0dac6fb2010-11-20 15:19:38 +1100812If one argument is specified, it is used as the packet class unconditionally.
813If two values are specified, the first is automatically selected for
814interactive sessions and the second for non-interactive sessions.
815The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000816.Cm lowdelay
Damien Miller0dac6fb2010-11-20 15:19:38 +1100817for interactive sessions and
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000818.Cm throughput
Damien Miller0dac6fb2010-11-20 15:19:38 +1100819for non-interactive sessions.
Damien Millere1e480a2014-02-04 11:13:17 +1100820.It Cm KbdInteractiveAuthentication
821Specifies whether to allow keyboard-interactive authentication.
822The argument to this keyword must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000823.Cm yes
Damien Millere1e480a2014-02-04 11:13:17 +1100824or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000825.Cm no .
Damien Millere1e480a2014-02-04 11:13:17 +1100826The default is to use whatever value
827.Cm ChallengeResponseAuthentication
828is set to
829(by default
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000830.Cm yes ) .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000831.It Cm KerberosAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000832Specifies whether the password provided by the user for
Ben Lindstrom9f049032002-06-21 00:59:05 +0000833.Cm PasswordAuthentication
Damien Miller1a0c0b92003-09-02 22:51:17 +1000834will be validated through the Kerberos KDC.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000835To use this option, the server needs a
836Kerberos servtab which allows the verification of the KDC's identity.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100837The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000838.Cm no .
Damien Miller8448e662004-03-08 23:13:15 +1100839.It Cm KerberosGetAFSToken
Darren Tuckere2dd2d52005-10-03 18:19:06 +1000840If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
Damien Miller8448e662004-03-08 23:13:15 +1100841an AFS token before accessing the user's home directory.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100842The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000843.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000844.It Cm KerberosOrLocalPasswd
Damien Miller5b0d63f2006-03-15 11:56:56 +1100845If password authentication through Kerberos fails then
Ben Lindstrom9f049032002-06-21 00:59:05 +0000846the password will be validated via any additional local mechanism
847such as
848.Pa /etc/passwd .
Damien Miller5b0d63f2006-03-15 11:56:56 +1100849The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000850.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000851.It Cm KerberosTicketCleanup
852Specifies whether to automatically destroy the user's ticket cache
853file on logout.
Damien Miller5b0d63f2006-03-15 11:56:56 +1100854The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000855.Cm yes .
Damien Millerd5f62bf2010-09-24 22:11:14 +1000856.It Cm KexAlgorithms
857Specifies the available KEX (Key Exchange) algorithms.
858Multiple algorithms must be comma-separated.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000859Alternately if the specified value begins with a
860.Sq +
861character, then the specified methods will be appended to the default set
862instead of replacing them.
djm@openbsd.org68bc8cf2017-02-03 23:01:19 +0000863If the specified value begins with a
864.Sq -
865character, then the specified methods (including wildcards) will be removed
866from the default set instead of replacing them.
Damien Millerc1621c82014-04-20 13:22:46 +1000867The supported algorithms are:
868.Pp
869.Bl -item -compact -offset indent
870.It
djm@openbsd.org16277fc2016-09-22 17:55:13 +0000871curve25519-sha256
872.It
Damien Millerc1621c82014-04-20 13:22:46 +1000873curve25519-sha256@libssh.org
874.It
875diffie-hellman-group1-sha1
876.It
877diffie-hellman-group14-sha1
878.It
879diffie-hellman-group-exchange-sha1
880.It
881diffie-hellman-group-exchange-sha256
882.It
883ecdh-sha2-nistp256
884.It
885ecdh-sha2-nistp384
886.It
887ecdh-sha2-nistp521
888.El
889.Pp
890The default is:
Damien Miller6575c3a2013-12-18 17:47:02 +1100891.Bd -literal -offset indent
djm@openbsd.org16277fc2016-09-22 17:55:13 +0000892curve25519-sha256,curve25519-sha256@libssh.org,
Damien Miller6575c3a2013-12-18 17:47:02 +1100893ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
894diffie-hellman-group-exchange-sha256,
Damien Millerc1621c82014-04-20 13:22:46 +1000895diffie-hellman-group14-sha1
Damien Miller6575c3a2013-12-18 17:47:02 +1100896.Ed
djm@openbsd.org8f6784f2014-12-22 09:05:17 +0000897.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000898The list of available key exchange algorithms may also be obtained using
899.Qq ssh -Q kex .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000900.It Cm ListenAddress
901Specifies the local addresses
Damien Miller5b0d63f2006-03-15 11:56:56 +1100902.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +0000903should listen on.
904The following forms may be used:
905.Pp
906.Bl -item -offset indent -compact
907.It
908.Cm ListenAddress
909.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000910.Ar host | Ar IPv4_addr | Ar IPv6_addr
Ben Lindstrom9f049032002-06-21 00:59:05 +0000911.Sm on
912.It
913.Cm ListenAddress
914.Sm off
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000915.Ar host | Ar IPv4_addr : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000916.Sm on
917.It
918.Cm ListenAddress
919.Sm off
920.Oo
jmc@openbsd.org08c0eeb2014-11-22 19:21:03 +0000921.Ar host | Ar IPv6_addr Oc : Ar port
Ben Lindstrom9f049032002-06-21 00:59:05 +0000922.Sm on
923.El
924.Pp
925If
926.Ar port
927is not specified,
dtucker@openbsd.org531a57a2015-04-29 03:48:56 +0000928sshd will listen on the address and all
Ben Lindstrom9f049032002-06-21 00:59:05 +0000929.Cm Port
Damien Millerfbf486b2003-05-23 18:44:23 +1000930options specified.
931The default is to listen on all local addresses.
Damien Miller495dca32003-04-01 21:42:14 +1000932Multiple
Ben Lindstrom9f049032002-06-21 00:59:05 +0000933.Cm ListenAddress
Damien Millerfbf486b2003-05-23 18:44:23 +1000934options are permitted.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000935.It Cm LoginGraceTime
936The server disconnects after this time if the user has not
937successfully logged in.
938If the value is 0, there is no time limit.
Damien Millerc1348632002-09-05 14:35:14 +1000939The default is 120 seconds.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000940.It Cm LogLevel
941Gives the verbosity level that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +1100942.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +0000943The possible values are:
Damien Miller5b0d63f2006-03-15 11:56:56 +1100944QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3.
Damien Miller495dca32003-04-01 21:42:14 +1000945The default is INFO.
946DEBUG and DEBUG1 are equivalent.
947DEBUG2 and DEBUG3 each specify higher levels of debugging output.
948Logging with a DEBUG level violates the privacy of users and is not recommended.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000949.It Cm MACs
950Specifies the available MAC (message authentication code) algorithms.
jmc@openbsd.orga685ae82016-02-17 07:38:19 +0000951The MAC algorithm is used for data integrity protection.
Ben Lindstrom9f049032002-06-21 00:59:05 +0000952Multiple algorithms must be comma-separated.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000953If the specified value begins with a
954.Sq +
955character, then the specified algorithms will be appended to the default set
956instead of replacing them.
djm@openbsd.org68bc8cf2017-02-03 23:01:19 +0000957If the specified value begins with a
958.Sq -
959character, then the specified algorithms (including wildcards) will be removed
960from the default set instead of replacing them.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +0000961.Pp
Damien Milleraf43a7a2012-12-12 10:46:31 +1100962The algorithms that contain
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +0000963.Qq -etm
Damien Milleraf43a7a2012-12-12 10:46:31 +1100964calculate the MAC after encryption (encrypt-then-mac).
965These are considered safer and their use recommended.
Damien Millerc1621c82014-04-20 13:22:46 +1000966The supported MACs are:
967.Pp
968.Bl -item -compact -offset indent
969.It
970hmac-md5
971.It
972hmac-md5-96
973.It
Damien Millerc1621c82014-04-20 13:22:46 +1000974hmac-sha1
975.It
976hmac-sha1-96
977.It
978hmac-sha2-256
979.It
980hmac-sha2-512
981.It
982umac-64@openssh.com
983.It
984umac-128@openssh.com
985.It
986hmac-md5-etm@openssh.com
987.It
988hmac-md5-96-etm@openssh.com
989.It
Damien Millerc1621c82014-04-20 13:22:46 +1000990hmac-sha1-etm@openssh.com
991.It
992hmac-sha1-96-etm@openssh.com
993.It
994hmac-sha2-256-etm@openssh.com
995.It
996hmac-sha2-512-etm@openssh.com
997.It
998umac-64-etm@openssh.com
999.It
1000umac-128-etm@openssh.com
1001.El
1002.Pp
Damien Miller5b0d63f2006-03-15 11:56:56 +11001003The default is:
Damien Miller22b7b492007-06-11 14:07:12 +10001004.Bd -literal -offset indent
Damien Milleraf43a7a2012-12-12 10:46:31 +11001005umac-64-etm@openssh.com,umac-128-etm@openssh.com,
1006hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
djm@openbsd.orge4c918a2016-02-11 02:56:32 +00001007hmac-sha1-etm@openssh.com,
Damien Millerc1621c82014-04-20 13:22:46 +10001008umac-64@openssh.com,umac-128@openssh.com,
djm@openbsd.orge4c918a2016-02-11 02:56:32 +00001009hmac-sha2-256,hmac-sha2-512,hmac-sha1
Damien Miller22b7b492007-06-11 14:07:12 +10001010.Ed
djm@openbsd.org8f6784f2014-12-22 09:05:17 +00001011.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001012The list of available MAC algorithms may also be obtained using
1013.Qq ssh -Q mac .
Darren Tucker45150472006-07-12 22:34:17 +10001014.It Cm Match
Damien Millerd04f3572006-07-24 13:46:50 +10001015Introduces a conditional block.
Damien Miller8c234032006-07-24 14:05:08 +10001016If all of the criteria on the
Darren Tucker45150472006-07-12 22:34:17 +10001017.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +10001018line are satisfied, the keywords on the following lines override those
1019set in the global section of the config file, until either another
Darren Tucker45150472006-07-12 22:34:17 +10001020.Cm Match
Damien Miller8c234032006-07-24 14:05:08 +10001021line or the end of the file.
Damien Millerfc5d6752014-02-28 10:01:28 +11001022If a keyword appears in multiple
1023.Cm Match
sobrado@openbsd.org180bcb42014-08-30 16:32:25 +00001024blocks that are satisfied, only the first instance of the keyword is
Damien Millerfc5d6752014-02-28 10:01:28 +11001025applied.
Darren Tucker7a3935d2008-06-10 22:59:10 +10001026.Pp
Damien Millerd04f3572006-07-24 13:46:50 +10001027The arguments to
Darren Tucker45150472006-07-12 22:34:17 +10001028.Cm Match
Damien Millercf31f382013-10-24 21:02:56 +11001029are one or more criteria-pattern pairs or the single token
1030.Cm All
1031which matches all criteria.
Darren Tucker45150472006-07-12 22:34:17 +10001032The available criteria are
1033.Cm User ,
Damien Miller565ca3f2006-08-19 00:23:15 +10001034.Cm Group ,
Darren Tucker45150472006-07-12 22:34:17 +10001035.Cm Host ,
Darren Tuckerfbcf8272012-05-19 19:37:01 +10001036.Cm LocalAddress ,
1037.Cm LocalPort ,
Darren Tucker45150472006-07-12 22:34:17 +10001038and
1039.Cm Address .
Darren Tucker7a3935d2008-06-10 22:59:10 +10001040The match patterns may consist of single entries or comma-separated
1041lists and may use the wildcard and negation operators described in the
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001042.Sx PATTERNS
1043section of
Darren Tuckerb06cc4a2008-06-10 22:59:53 +10001044.Xr ssh_config 5 .
Darren Tucker7a3935d2008-06-10 22:59:10 +10001045.Pp
1046The patterns in an
1047.Cm Address
1048criteria may additionally contain addresses to match in CIDR
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001049address/masklen format,
1050such as 192.0.2.0/24 or 2001:db8::/32.
Darren Tucker7a3935d2008-06-10 22:59:10 +10001051Note that the mask length provided must be consistent with the address -
1052it is an error to specify a mask length that is too long for the address
Darren Tucker6a2a4002008-06-10 23:03:04 +10001053or one with bits set in this host portion of the address.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001054For example, 192.0.2.0/33 and 192.0.2.0/8, respectively.
Darren Tucker7a3935d2008-06-10 22:59:10 +10001055.Pp
Darren Tucker45150472006-07-12 22:34:17 +10001056Only a subset of keywords may be used on the lines following a
1057.Cm Match
1058keyword.
1059Available keywords are
Damien Millerf8268502012-06-20 21:54:15 +10001060.Cm AcceptEnv ,
Damien Miller17819012009-01-28 16:20:17 +11001061.Cm AllowAgentForwarding ,
Damien Millerf8268502012-06-20 21:54:15 +10001062.Cm AllowGroups ,
djm@openbsd.org18a208d2015-02-20 22:40:32 +00001063.Cm AllowStreamLocalForwarding ,
Damien Miller9b439df2006-07-24 14:04:00 +10001064.Cm AllowTcpForwarding ,
Damien Millerc24da772012-06-20 21:53:58 +10001065.Cm AllowUsers ,
Damien Millera6e3f012012-11-04 23:21:40 +11001066.Cm AuthenticationMethods ,
Damien Miller09d3e122012-10-31 08:58:58 +11001067.Cm AuthorizedKeysCommand ,
1068.Cm AuthorizedKeysCommandUser ,
Damien Millerf33580e2012-11-04 22:22:52 +11001069.Cm AuthorizedKeysFile ,
djm@openbsd.orgb6b91082015-11-13 02:57:46 +00001070.Cm AuthorizedPrincipalsCommand ,
1071.Cm AuthorizedPrincipalsCommandUser ,
Damien Millerab6de352010-06-26 09:38:45 +10001072.Cm AuthorizedPrincipalsFile ,
Darren Tucker1629c072007-02-19 22:25:37 +11001073.Cm Banner ,
Damien Miller797e3d12008-05-19 14:27:42 +10001074.Cm ChrootDirectory ,
markus@openbsd.orgf0ddede2016-11-23 23:14:15 +00001075.Cm ClientAliveCountMax ,
1076.Cm ClientAliveInterval ,
Damien Millerc24da772012-06-20 21:53:58 +10001077.Cm DenyGroups ,
1078.Cm DenyUsers ,
Damien Millere2754432006-07-24 14:06:47 +10001079.Cm ForceCommand ,
djm@openbsd.org18a208d2015-02-20 22:40:32 +00001080.Cm GatewayPorts ,
djm@openbsd.orgbd49da22015-02-20 23:46:01 +00001081.Cm GSSAPIAuthentication ,
djm@openbsd.org1f729f02015-01-13 07:39:19 +00001082.Cm HostbasedAcceptedKeyTypes ,
Damien Miller25434de2008-05-19 14:29:08 +10001083.Cm HostbasedAuthentication ,
Damien Millerab6de352010-06-26 09:38:45 +10001084.Cm HostbasedUsesNameFromPacketOnly ,
djm@openbsd.org18a208d2015-02-20 22:40:32 +00001085.Cm IPQoS ,
Darren Tucker1d75f222007-03-01 21:31:28 +11001086.Cm KbdInteractiveAuthentication ,
Damien Miller5737e362007-03-06 21:21:18 +11001087.Cm KerberosAuthentication ,
djm@openbsd.org54cd41a2017-05-17 01:24:17 +00001088.Cm LogLevel ,
Damien Miller307c1d12008-06-16 07:56:20 +10001089.Cm MaxAuthTries ,
Damien Millerc62a5af2008-06-16 07:55:46 +10001090.Cm MaxSessions ,
Darren Tucker1629c072007-02-19 22:25:37 +11001091.Cm PasswordAuthentication ,
Damien Miller51bde602008-11-03 19:23:10 +11001092.Cm PermitEmptyPasswords ,
Damien Millerd1de9952006-07-24 14:05:48 +10001093.Cm PermitOpen ,
Darren Tucker15f94272008-01-01 20:36:56 +11001094.Cm PermitRootLogin ,
Damien Miller5ff30c62013-10-30 22:21:50 +11001095.Cm PermitTTY ,
Damien Millerab6de352010-06-26 09:38:45 +10001096.Cm PermitTunnel ,
Damien Miller72e6b5c2014-07-04 09:00:04 +10001097.Cm PermitUserRC ,
djm@openbsd.org1f729f02015-01-13 07:39:19 +00001098.Cm PubkeyAcceptedKeyTypes ,
Darren Tucker1477ea12009-10-07 08:36:05 +11001099.Cm PubkeyAuthentication ,
djm@openbsd.org18a208d2015-02-20 22:40:32 +00001100.Cm RekeyLimit ,
1101.Cm RevokedKeys ,
djm@openbsd.org18a208d2015-02-20 22:40:32 +00001102.Cm StreamLocalBindMask ,
1103.Cm StreamLocalBindUnlink ,
1104.Cm TrustedUserCAKeys ,
Damien Millerd1de9952006-07-24 14:05:48 +10001105.Cm X11DisplayOffset ,
Damien Miller19913842009-02-23 10:53:58 +11001106.Cm X11Forwarding
Darren Tucker45150472006-07-12 22:34:17 +10001107and
Damien Miller0296ae82009-02-23 11:00:24 +11001108.Cm X11UseLocalHost .
Darren Tucker89413db2004-05-24 10:36:23 +10001109.It Cm MaxAuthTries
1110Specifies the maximum number of authentication attempts permitted per
Damien Miller26213e52004-06-30 22:39:34 +10001111connection.
1112Once the number of failures reaches half this value,
1113additional failures are logged.
1114The default is 6.
Damien Miller7207f642008-05-19 15:34:50 +10001115.It Cm MaxSessions
djm@openbsd.orgcac3b662016-02-05 02:37:56 +00001116Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
1117sessions permitted per network connection.
1118Multiple sessions may be established by clients that support connection
1119multiplexing.
1120Setting
1121.Cm MaxSessions
1122to 1 will effectively disable session multiplexing, whereas setting it to 0
1123will prevent all shell, login and subsystem sessions while still permitting
1124forwarding.
Damien Miller7207f642008-05-19 15:34:50 +10001125The default is 10.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001126.It Cm MaxStartups
1127Specifies the maximum number of concurrent unauthenticated connections to the
Damien Miller5b0d63f2006-03-15 11:56:56 +11001128SSH daemon.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001129Additional connections will be dropped until authentication succeeds or the
1130.Cm LoginGraceTime
1131expires for a connection.
Damien Miller1f583df2013-02-12 11:02:08 +11001132The default is 10:30:100.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001133.Pp
1134Alternatively, random early drop can be enabled by specifying
1135the three colon separated values
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001136start:rate:full (e.g. "10:30:60").
Damien Millerf4f22b52006-03-15 11:57:25 +11001137.Xr sshd 8
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001138will refuse connection attempts with a probability of rate/100 (30%)
1139if there are currently start (10) unauthenticated connections.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001140The probability increases linearly and all connection attempts
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001141are refused if the number of unauthenticated connections reaches full (60).
Ben Lindstrom9f049032002-06-21 00:59:05 +00001142.It Cm PasswordAuthentication
1143Specifies whether password authentication is allowed.
1144The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001145.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001146.It Cm PermitEmptyPasswords
1147When password authentication is allowed, it specifies whether the
1148server allows login to accounts with empty password strings.
1149The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001150.Cm no .
Damien Miller9b439df2006-07-24 14:04:00 +10001151.It Cm PermitOpen
1152Specifies the destinations to which TCP port forwarding is permitted.
1153The forwarding specification must be one of the following forms:
1154.Pp
1155.Bl -item -offset indent -compact
1156.It
1157.Cm PermitOpen
1158.Sm off
1159.Ar host : port
1160.Sm on
1161.It
1162.Cm PermitOpen
1163.Sm off
1164.Ar IPv4_addr : port
1165.Sm on
1166.It
1167.Cm PermitOpen
1168.Sm off
1169.Ar \&[ IPv6_addr \&] : port
1170.Sm on
1171.El
1172.Pp
Damien Millera765cf42006-07-24 14:08:13 +10001173Multiple forwards may be specified by separating them with whitespace.
Damien Miller9b439df2006-07-24 14:04:00 +10001174An argument of
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001175.Cm any
Damien Miller9b439df2006-07-24 14:04:00 +10001176can be used to remove all restrictions and permit any forwarding requests.
Darren Tuckerba9ea322012-05-19 19:37:33 +10001177An argument of
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001178.Cm none
Darren Tuckerba9ea322012-05-19 19:37:33 +10001179can be used to prohibit all forwarding requests.
jmc@openbsd.org32d921c2016-07-19 12:59:16 +00001180The wildcard
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001181.Sq *
jmc@openbsd.org32d921c2016-07-19 12:59:16 +00001182can be used for host or port to allow all hosts or ports, respectively.
Damien Miller65bc2c42006-07-24 14:04:16 +10001183By default all port forwarding requests are permitted.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001184.It Cm PermitRootLogin
Darren Tuckerb3509012005-01-20 11:01:46 +11001185Specifies whether root can log in using
Ben Lindstrom9f049032002-06-21 00:59:05 +00001186.Xr ssh 1 .
1187The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001188.Cm yes ,
1189.Cm prohibit-password ,
1190.Cm without-password ,
1191.Cm forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001192or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001193.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001194The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001195.Cm prohibit-password .
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 prohibit-password
deraadt@openbsd.org1dc8d932015-08-06 14:53:21 +00001199or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001200.Cm without-password ,
deraadt@openbsd.org1dc8d932015-08-06 14:53:21 +00001201password and keyboard-interactive authentication are disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001202.Pp
1203If this option is set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001204.Cm forced-commands-only ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001205root login with public key authentication will be allowed,
1206but only if the
1207.Ar command
1208option has been specified
1209(which may be useful for taking remote backups even if root login is
Damien Millerfbf486b2003-05-23 18:44:23 +10001210normally not allowed).
1211All other authentication methods are disabled for root.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001212.Pp
1213If this option is set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001214.Cm no ,
Darren Tuckerb3509012005-01-20 11:01:46 +11001215root is not allowed to log in.
jmc@openbsd.orgf219fc82016-09-07 18:39:24 +00001216.It Cm PermitTTY
1217Specifies whether
1218.Xr pty 4
1219allocation is permitted.
1220The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001221.Cm yes .
Damien Millerd27b9472005-12-13 19:29:02 +11001222.It Cm PermitTunnel
1223Specifies whether
1224.Xr tun 4
1225device forwarding is allowed.
Damien Miller7b58e802005-12-13 19:33:19 +11001226The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001227.Cm yes ,
1228.Cm point-to-point
Damien Miller991dba42006-07-10 20:16:27 +10001229(layer 3),
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001230.Cm ethernet
Damien Miller991dba42006-07-10 20:16:27 +10001231(layer 2), or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001232.Cm no .
Damien Miller991dba42006-07-10 20:16:27 +10001233Specifying
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001234.Cm yes
Damien Miller991dba42006-07-10 20:16:27 +10001235permits both
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001236.Cm point-to-point
Damien Miller991dba42006-07-10 20:16:27 +10001237and
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001238.Cm ethernet .
Damien Millerd27b9472005-12-13 19:29:02 +11001239The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001240.Cm no .
djm@openbsd.org48dffd52014-09-09 09:45:36 +00001241.Pp
1242Independent of this setting, the permissions of the selected
1243.Xr tun 4
1244device must allow access to the user.
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001245.It Cm PermitUserEnvironment
1246Specifies whether
1247.Pa ~/.ssh/environment
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001248and
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001249.Cm environment=
1250options in
1251.Pa ~/.ssh/authorized_keys
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001252are processed by
Damien Miller5b0d63f2006-03-15 11:56:56 +11001253.Xr sshd 8 .
Ben Lindstrom5d860f02002-08-01 01:28:38 +00001254The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001255.Cm no .
Ben Lindstrombd9bf382002-08-20 18:54:20 +00001256Enabling environment processing may enable users to bypass access
1257restrictions in some configurations using mechanisms such as
1258.Ev LD_PRELOAD .
Damien Miller72e6b5c2014-07-04 09:00:04 +10001259.It Cm PermitUserRC
1260Specifies whether any
1261.Pa ~/.ssh/rc
1262file is executed.
1263The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001264.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001265.It Cm PidFile
Ben Lindstrom959de992002-06-23 00:35:25 +00001266Specifies the file that contains the process ID of the
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001267SSH daemon, or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001268.Cm none
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001269to not write one.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001270The default is
1271.Pa /var/run/sshd.pid .
1272.It Cm Port
1273Specifies the port number that
Damien Miller5b0d63f2006-03-15 11:56:56 +11001274.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001275listens on.
1276The default is 22.
1277Multiple options of this type are permitted.
1278See also
1279.Cm ListenAddress .
1280.It Cm PrintLastLog
1281Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001282.Xr sshd 8
Darren Tucker7cc5c232004-11-05 20:06:59 +11001283should print the date and time of the last user login when a user logs
1284in interactively.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001285The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001286.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001287.It Cm PrintMotd
1288Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001289.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001290should print
1291.Pa /etc/motd
1292when a user logs in interactively.
1293(On some systems it is also printed by the shell,
1294.Pa /etc/profile ,
1295or equivalent.)
1296The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001297.Cm yes .
djm@openbsd.org1f729f02015-01-13 07:39:19 +00001298.It Cm PubkeyAcceptedKeyTypes
1299Specifies the key types that will be accepted for public key authentication
1300as a comma-separated pattern list.
djm@openbsd.orgf9eca242015-07-30 00:01:34 +00001301Alternately if the specified value begins with a
1302.Sq +
1303character, then the specified key types will be appended to the default set
1304instead of replacing them.
djm@openbsd.org68bc8cf2017-02-03 23:01:19 +00001305If the specified value begins with a
1306.Sq -
1307character, then the specified key types (including wildcards) will be removed
1308from the default set instead of replacing them.
markus@openbsd.org3a1638d2015-07-10 06:21:53 +00001309The default for this option is:
1310.Bd -literal -offset 3n
1311ecdsa-sha2-nistp256-cert-v01@openssh.com,
1312ecdsa-sha2-nistp384-cert-v01@openssh.com,
1313ecdsa-sha2-nistp521-cert-v01@openssh.com,
1314ssh-ed25519-cert-v01@openssh.com,
1315ssh-rsa-cert-v01@openssh.com,
1316ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,
djm@openbsd.org3a13cb52016-02-17 08:57:34 +00001317ssh-ed25519,ssh-rsa
markus@openbsd.org3a1638d2015-07-10 06:21:53 +00001318.Ed
1319.Pp
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001320The list of available key types may also be obtained using
1321.Qq ssh -Q key .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001322.It Cm PubkeyAuthentication
1323Specifies whether public key authentication is allowed.
1324The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001325.Cm yes .
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001326.It Cm RekeyLimit
1327Specifies the maximum amount of data that may be transmitted before the
1328session key is renegotiated, optionally followed a maximum amount of
1329time that may pass before the session key is renegotiated.
1330The first argument is specified in bytes and may have a suffix of
1331.Sq K ,
1332.Sq M ,
1333or
1334.Sq G
1335to indicate Kilobytes, Megabytes, or Gigabytes, respectively.
1336The default is between
1337.Sq 1G
1338and
1339.Sq 4G ,
1340depending on the cipher.
1341The optional second value is specified in seconds and may use any of the
1342units documented in the
1343.Sx TIME FORMATS
Darren Tucker64d22942013-05-16 20:31:29 +10001344section.
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001345The default value for
1346.Cm RekeyLimit
1347is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001348.Cm default none ,
Darren Tucker5f96f3b2013-05-16 20:29:28 +10001349which means that rekeying is performed after the cipher's default amount
1350of data has been sent or received and no time based rekeying is done.
Damien Miller1aed65e2010-03-04 21:53:35 +11001351.It Cm RevokedKeys
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001352Specifies revoked public keys file, or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001353.Cm none
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001354to not use one.
Damien Miller1aed65e2010-03-04 21:53:35 +11001355Keys listed in this file will be refused for public key authentication.
1356Note that if this file is not readable, then public key authentication will
1357be refused for all users.
Damien Millerf3747bf2013-01-18 11:44:04 +11001358Keys may be specified as a text file, listing one public key per line, or as
1359an OpenSSH Key Revocation List (KRL) as generated by
Damien Miller72abeb72013-01-20 22:33:44 +11001360.Xr ssh-keygen 1 .
Damien Millerfecfd112013-07-18 16:11:50 +10001361For more information on KRLs, see the KEY REVOCATION LISTS section in
Damien Millerf3747bf2013-01-18 11:44:04 +11001362.Xr ssh-keygen 1 .
Damien Miller7acefbb2014-07-18 14:11:24 +10001363.It Cm StreamLocalBindMask
1364Sets the octal file creation mode mask
1365.Pq umask
1366used when creating a Unix-domain socket file for local or remote
1367port forwarding.
1368This option is only used for port forwarding to a Unix-domain socket file.
1369.Pp
1370The default value is 0177, which creates a Unix-domain socket file that is
1371readable and writable only by the owner.
1372Note that not all operating systems honor the file mode on Unix-domain
1373socket files.
1374.It Cm StreamLocalBindUnlink
1375Specifies whether to remove an existing Unix-domain socket file for local
1376or remote port forwarding before creating a new one.
1377If the socket file already exists and
1378.Cm StreamLocalBindUnlink
1379is not enabled,
1380.Nm sshd
1381will be unable to forward the port to the Unix-domain socket file.
1382This option is only used for port forwarding to a Unix-domain socket file.
1383.Pp
1384The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001385.Cm yes
Damien Miller7acefbb2014-07-18 14:11:24 +10001386or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001387.Cm no .
Damien Miller7acefbb2014-07-18 14:11:24 +10001388The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001389.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001390.It Cm StrictModes
1391Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001392.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001393should check file modes and ownership of the
1394user's files and home directory before accepting login.
1395This is normally desirable because novices sometimes accidentally leave their
1396directory or files world-writable.
1397The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001398.Cm yes .
Darren Tuckerf788a912010-01-08 17:06:47 +11001399Note that this does not apply to
1400.Cm ChrootDirectory ,
1401whose permissions and ownership are checked unconditionally.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001402.It Cm Subsystem
Damien Miller208f1ed2006-03-15 11:56:03 +11001403Configures an external subsystem (e.g. file transfer daemon).
Damien Miller917f9b62006-07-10 20:36:47 +10001404Arguments should be a subsystem name and a command (with optional arguments)
1405to execute upon subsystem request.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001406.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001407The command
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001408.Cm sftp-server
1409implements the SFTP file transfer subsystem.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001410.Pp
1411Alternately the name
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001412.Cm internal-sftp
1413implements an in-process SFTP server.
Damien Millerd8cb1f12008-02-10 22:40:12 +11001414This may simplify configurations using
1415.Cm ChrootDirectory
1416to force a different filesystem root on clients.
1417.Pp
Ben Lindstrom9f049032002-06-21 00:59:05 +00001418By default no subsystems are defined.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001419.It Cm SyslogFacility
1420Gives the facility code that is used when logging messages from
Damien Millerf4f22b52006-03-15 11:57:25 +11001421.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001422The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1423LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1424The default is AUTH.
Damien Miller12c150e2003-12-17 16:31:10 +11001425.It Cm TCPKeepAlive
1426Specifies whether the system should send TCP keepalive messages to the
1427other side.
1428If they are sent, death of the connection or crash of one
1429of the machines will be properly noticed.
1430However, this means that
1431connections will die if the route is down temporarily, and some people
1432find it annoying.
1433On the other hand, if TCP keepalives are not sent,
1434sessions may hang indefinitely on the server, leaving
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001435.Qq ghost
Damien Miller12c150e2003-12-17 16:31:10 +11001436users and consuming server resources.
1437.Pp
1438The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001439.Cm yes
Damien Miller12c150e2003-12-17 16:31:10 +11001440(to send TCP keepalive messages), and the server will notice
1441if the network goes down or the client host crashes.
1442This avoids infinitely hanging sessions.
1443.Pp
1444To disable TCP keepalive messages, the value should be set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001445.Cm no .
Damien Miller1aed65e2010-03-04 21:53:35 +11001446.It Cm TrustedUserCAKeys
1447Specifies a file containing public keys of certificate authorities that are
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001448trusted to sign user certificates for authentication, or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001449.Cm none
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001450to not use one.
Damien Miller72b33822010-03-05 07:39:01 +11001451Keys are listed one per line; empty lines and comments starting with
Damien Miller1aed65e2010-03-04 21:53:35 +11001452.Ql #
1453are allowed.
1454If a certificate is presented for authentication and has its signing CA key
1455listed in this file, then it may be used for authentication for any user
1456listed in the certificate's principals list.
1457Note that certificates that lack a list of principals will not be permitted
1458for authentication using
1459.Cm TrustedUserCAKeys .
Damien Millerfecfd112013-07-18 16:11:50 +10001460For more details on certificates, see the CERTIFICATES section in
Damien Miller1aed65e2010-03-04 21:53:35 +11001461.Xr ssh-keygen 1 .
Damien Miller3a961dc2003-06-03 10:25:48 +10001462.It Cm UseDNS
1463Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001464.Xr sshd 8
djm@openbsd.orgc63c9a62015-07-20 00:30:01 +00001465should look up the remote host name, and to check that
Damien Miller3a961dc2003-06-03 10:25:48 +10001466the resolved host name for the remote IP address maps back to the
1467very same IP address.
djm@openbsd.orgc63c9a62015-07-20 00:30:01 +00001468.Pp
1469If this option is set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001470.Cm no
djm@openbsd.orgc63c9a62015-07-20 00:30:01 +00001471(the default) then only addresses and not host names may be used in
djm@openbsd.org0235a5f2016-03-17 17:19:43 +00001472.Pa ~/.ssh/authorized_keys
djm@openbsd.orgc63c9a62015-07-20 00:30:01 +00001473.Cm from
1474and
jmc@openbsd.org1f8d3d62015-08-14 15:32:41 +00001475.Nm
djm@openbsd.orgc63c9a62015-07-20 00:30:01 +00001476.Cm Match
1477.Cm Host
1478directives.
Damien Miller2e193e22003-05-14 15:13:03 +10001479.It Cm UsePAM
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001480Enables the Pluggable Authentication Module interface.
1481If set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001482.Cm yes
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001483this will enable PAM authentication using
1484.Cm ChallengeResponseAuthentication
Darren Tuckera4904f72006-02-23 21:35:30 +11001485and
1486.Cm PasswordAuthentication
1487in addition to PAM account and session module processing for all
1488authentication types.
Darren Tucker1dcff9a2004-05-13 16:51:40 +10001489.Pp
1490Because PAM challenge-response authentication usually serves an equivalent
1491role to password authentication, you should disable either
1492.Cm PasswordAuthentication
1493or
1494.Cm ChallengeResponseAuthentication.
1495.Pp
1496If
1497.Cm UsePAM
1498is enabled, you will not be able to run
1499.Xr sshd 8
1500as a non-root user.
1501The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001502.Cm no .
Damien Miller23528812012-04-22 11:24:43 +10001503.It Cm VersionAddendum
1504Optionally specifies additional text to append to the SSH protocol banner
1505sent by the server upon connection.
1506The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001507.Cm none .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001508.It Cm X11DisplayOffset
1509Specifies the first display number available for
Damien Miller5b0d63f2006-03-15 11:56:56 +11001510.Xr sshd 8 Ns 's
Ben Lindstrom9f049032002-06-21 00:59:05 +00001511X11 forwarding.
Damien Miller5b0d63f2006-03-15 11:56:56 +11001512This prevents sshd from interfering with real X11 servers.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001513The default is 10.
1514.It Cm X11Forwarding
1515Specifies whether X11 forwarding is permitted.
Damien Miller101c4a72002-09-19 11:51:21 +10001516The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001517.Cm yes
Damien Miller101c4a72002-09-19 11:51:21 +10001518or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001519.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001520The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001521.Cm no .
Damien Miller101c4a72002-09-19 11:51:21 +10001522.Pp
1523When X11 forwarding is enabled, there may be additional exposure to
1524the server and to client displays if the
Damien Miller5b0d63f2006-03-15 11:56:56 +11001525.Xr sshd 8
Damien Miller101c4a72002-09-19 11:51:21 +10001526proxy display is configured to listen on the wildcard address (see
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001527.Cm X11UseLocalhost ) ,
1528though this is not the default.
Damien Miller101c4a72002-09-19 11:51:21 +10001529Additionally, the authentication spoofing and authentication data
1530verification and substitution occur on the client side.
1531The security risk of using X11 forwarding is that the client's X11
Damien Miller5b0d63f2006-03-15 11:56:56 +11001532display server may be exposed to attack when the SSH client requests
Damien Miller101c4a72002-09-19 11:51:21 +10001533forwarding (see the warnings for
1534.Cm ForwardX11
1535in
Damien Millerf1ce5052003-06-11 22:04:39 +10001536.Xr ssh_config 5 ) .
Damien Miller101c4a72002-09-19 11:51:21 +10001537A system administrator may have a stance in which they want to
1538protect clients that may expose themselves to attack by unwittingly
1539requesting X11 forwarding, which can warrant a
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001540.Cm no
Damien Miller101c4a72002-09-19 11:51:21 +10001541setting.
1542.Pp
1543Note that disabling X11 forwarding does not prevent users from
1544forwarding X11 traffic, as users can always install their own forwarders.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001545.It Cm X11UseLocalhost
1546Specifies whether
Damien Miller5b0d63f2006-03-15 11:56:56 +11001547.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001548should bind the X11 forwarding server to the loopback address or to
Damien Miller495dca32003-04-01 21:42:14 +10001549the wildcard address.
1550By default,
Damien Miller5b0d63f2006-03-15 11:56:56 +11001551sshd binds the forwarding server to the loopback address and sets the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001552hostname part of the
1553.Ev DISPLAY
1554environment variable to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001555.Cm localhost .
Ben Lindstrom15b61202002-08-20 18:44:24 +00001556This prevents remote hosts from connecting to the proxy display.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001557However, some older X11 clients may not function with this
1558configuration.
1559.Cm X11UseLocalhost
1560may be set to
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001561.Cm no
Ben Lindstrom9f049032002-06-21 00:59:05 +00001562to specify that the forwarding server should be bound to the wildcard
1563address.
1564The argument must be
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001565.Cm yes
Ben Lindstrom9f049032002-06-21 00:59:05 +00001566or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001567.Cm no .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001568The default is
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001569.Cm yes .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001570.It Cm XAuthLocation
Damien Miller05913ba2002-09-04 16:51:03 +10001571Specifies the full pathname of the
Ben Lindstrom9f049032002-06-21 00:59:05 +00001572.Xr xauth 1
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001573program, or
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001574.Cm none
dtucker@openbsd.org6cc7cfa2015-04-16 23:25:50 +00001575to not use one.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001576The default is
1577.Pa /usr/X11R6/bin/xauth .
1578.El
Damien Millere3beba22006-03-15 11:59:25 +11001579.Sh TIME FORMATS
Damien Millerf4f22b52006-03-15 11:57:25 +11001580.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001581command-line arguments and configuration file options that specify time
1582may be expressed using a sequence of the form:
1583.Sm off
Ben Lindstrom1f8cf4f2002-08-20 18:43:27 +00001584.Ar time Op Ar qualifier ,
Ben Lindstrom9f049032002-06-21 00:59:05 +00001585.Sm on
1586where
1587.Ar time
1588is a positive integer value and
1589.Ar qualifier
1590is one of the following:
1591.Pp
1592.Bl -tag -width Ds -compact -offset indent
Damien Miller393821a2006-07-24 14:04:53 +10001593.It Aq Cm none
Ben Lindstrom9f049032002-06-21 00:59:05 +00001594seconds
1595.It Cm s | Cm S
1596seconds
1597.It Cm m | Cm M
1598minutes
1599.It Cm h | Cm H
1600hours
1601.It Cm d | Cm D
1602days
1603.It Cm w | Cm W
1604weeks
1605.El
1606.Pp
1607Each member of the sequence is added together to calculate
1608the total time value.
1609.Pp
1610Time format examples:
1611.Pp
1612.Bl -tag -width Ds -compact -offset indent
1613.It 600
1614600 seconds (10 minutes)
1615.It 10m
161610 minutes
1617.It 1h30m
16181 hour 30 minutes (90 minutes)
1619.El
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +00001620.Sh TOKENS
1621Arguments to some keywords can make use of tokens,
1622which are expanded at runtime:
1623.Pp
1624.Bl -tag -width XXXX -offset indent -compact
1625.It %%
1626A literal
1627.Sq % .
1628.It %F
1629The fingerprint of the CA key.
1630.It %f
1631The fingerprint of the key or certificate.
1632.It %h
1633The home directory of the user.
1634.It %i
1635The key ID in the certificate.
1636.It %K
1637The base64-encoded CA key.
1638.It %k
1639The base64-encoded key or certificate for authentication.
1640.It %s
1641The serial number of the certificate.
1642.It \&%T
1643The type of the CA key.
1644.It %t
1645The key or certificate type.
1646.It %u
1647The username.
1648.El
1649.Pp
1650.Cm AuthorizedKeysCommand
jmc@openbsd.orga1187bd2017-01-06 16:28:12 +00001651accepts the tokens %%, %f, %h, %k, %t, and %u.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +00001652.Pp
1653.Cm AuthorizedKeysFile
1654accepts the tokens %%, %h, and %u.
1655.Pp
1656.Cm AuthorizedPrincipalsCommand
jmc@openbsd.orga1187bd2017-01-06 16:28:12 +00001657accepts the tokens %%, %F, %f, %h, %i, %K, %k, %s, %T, %t, and %u.
jmc@openbsd.orgde6a1752016-09-22 19:19:01 +00001658.Pp
1659.Cm AuthorizedPrincipalsFile
1660accepts the tokens %%, %h, and %u.
1661.Pp
1662.Cm ChrootDirectory
1663accepts the tokens %%, %h, and %u.
Ben Lindstrom9f049032002-06-21 00:59:05 +00001664.Sh FILES
1665.Bl -tag -width Ds
1666.It Pa /etc/ssh/sshd_config
1667Contains configuration data for
Damien Millerf4f22b52006-03-15 11:57:25 +11001668.Xr sshd 8 .
Ben Lindstrom9f049032002-06-21 00:59:05 +00001669This file should be writable by root only, but it is recommended
1670(though not necessary) that it be world-readable.
1671.El
Damien Millerf1ce5052003-06-11 22:04:39 +10001672.Sh SEE ALSO
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001673.Xr sftp-server 8 ,
Damien Millerf1ce5052003-06-11 22:04:39 +10001674.Xr sshd 8
Ben Lindstrom9f049032002-06-21 00:59:05 +00001675.Sh AUTHORS
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001676.An -nosplit
Ben Lindstrom9f049032002-06-21 00:59:05 +00001677OpenSSH is a derivative of the original and free
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001678ssh 1.2.12 release by
1679.An Tatu Ylonen .
1680.An Aaron Campbell , Bob Beck , Markus Friedl , Niels Provos ,
1681.An Theo de Raadt
1682and
1683.An Dug Song
Ben Lindstrom9f049032002-06-21 00:59:05 +00001684removed many bugs, re-added newer features and
1685created OpenSSH.
jmc@openbsd.orgaae4dbd2016-10-07 14:41:52 +00001686.An Markus Friedl
1687contributed the support for SSH protocol versions 1.5 and 2.0.
1688.An Niels Provos
1689and
1690.An Markus Friedl
1691contributed support for privilege separation.