xref: /freebsd/crypto/openssh/sshd_config.5 (revision b74df5b26fa43e05a034a6ce662dcf286a1ffdd9)
1545d5ecaSDag-Erling Smørgrav.\"  -*- nroff -*-
2545d5ecaSDag-Erling Smørgrav.\"
3545d5ecaSDag-Erling Smørgrav.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
4545d5ecaSDag-Erling Smørgrav.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5545d5ecaSDag-Erling Smørgrav.\"                    All rights reserved
6545d5ecaSDag-Erling Smørgrav.\"
7545d5ecaSDag-Erling Smørgrav.\" As far as I am concerned, the code I have written for this software
8545d5ecaSDag-Erling Smørgrav.\" can be used freely for any purpose.  Any derived versions of this
9545d5ecaSDag-Erling Smørgrav.\" software must be clearly marked as such, and if the derived work is
10545d5ecaSDag-Erling Smørgrav.\" incompatible with the protocol description in the RFC file, it must be
11545d5ecaSDag-Erling Smørgrav.\" called by a name other than "ssh" or "Secure Shell".
12545d5ecaSDag-Erling Smørgrav.\"
13545d5ecaSDag-Erling Smørgrav.\" Copyright (c) 1999,2000 Markus Friedl.  All rights reserved.
14545d5ecaSDag-Erling Smørgrav.\" Copyright (c) 1999 Aaron Campbell.  All rights reserved.
15545d5ecaSDag-Erling Smørgrav.\" Copyright (c) 1999 Theo de Raadt.  All rights reserved.
16545d5ecaSDag-Erling Smørgrav.\"
17545d5ecaSDag-Erling Smørgrav.\" Redistribution and use in source and binary forms, with or without
18545d5ecaSDag-Erling Smørgrav.\" modification, are permitted provided that the following conditions
19545d5ecaSDag-Erling Smørgrav.\" are met:
20545d5ecaSDag-Erling Smørgrav.\" 1. Redistributions of source code must retain the above copyright
21545d5ecaSDag-Erling Smørgrav.\"    notice, this list of conditions and the following disclaimer.
22545d5ecaSDag-Erling Smørgrav.\" 2. Redistributions in binary form must reproduce the above copyright
23545d5ecaSDag-Erling Smørgrav.\"    notice, this list of conditions and the following disclaimer in the
24545d5ecaSDag-Erling Smørgrav.\"    documentation and/or other materials provided with the distribution.
25545d5ecaSDag-Erling Smørgrav.\"
26545d5ecaSDag-Erling Smørgrav.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27545d5ecaSDag-Erling Smørgrav.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28545d5ecaSDag-Erling Smørgrav.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29545d5ecaSDag-Erling Smørgrav.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30545d5ecaSDag-Erling Smørgrav.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31545d5ecaSDag-Erling Smørgrav.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32545d5ecaSDag-Erling Smørgrav.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33545d5ecaSDag-Erling Smørgrav.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34545d5ecaSDag-Erling Smørgrav.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35545d5ecaSDag-Erling Smørgrav.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36545d5ecaSDag-Erling Smørgrav.\"
37b74df5b2SDag-Erling Smørgrav.\" $OpenBSD: sshd_config.5,v 1.48 2006/01/02 17:09:49 jmc Exp $
3835d4ccfbSDag-Erling Smørgrav.\" $FreeBSD$
39545d5ecaSDag-Erling Smørgrav.Dd September 25, 1999
40545d5ecaSDag-Erling Smørgrav.Dt SSHD_CONFIG 5
41545d5ecaSDag-Erling Smørgrav.Os
42545d5ecaSDag-Erling Smørgrav.Sh NAME
43545d5ecaSDag-Erling Smørgrav.Nm sshd_config
44545d5ecaSDag-Erling Smørgrav.Nd OpenSSH SSH daemon configuration file
45545d5ecaSDag-Erling Smørgrav.Sh SYNOPSIS
46545d5ecaSDag-Erling Smørgrav.Bl -tag -width Ds -compact
47545d5ecaSDag-Erling Smørgrav.It Pa /etc/ssh/sshd_config
48545d5ecaSDag-Erling Smørgrav.El
49545d5ecaSDag-Erling Smørgrav.Sh DESCRIPTION
50545d5ecaSDag-Erling Smørgrav.Nm sshd
51545d5ecaSDag-Erling Smørgravreads configuration data from
52545d5ecaSDag-Erling Smørgrav.Pa /etc/ssh/sshd_config
53545d5ecaSDag-Erling Smørgrav(or the file specified with
54545d5ecaSDag-Erling Smørgrav.Fl f
55545d5ecaSDag-Erling Smørgravon the command line).
56545d5ecaSDag-Erling SmørgravThe file contains keyword-argument pairs, one per line.
57545d5ecaSDag-Erling SmørgravLines starting with
58545d5ecaSDag-Erling Smørgrav.Ql #
59545d5ecaSDag-Erling Smørgravand empty lines are interpreted as comments.
60545d5ecaSDag-Erling Smørgrav.Pp
61545d5ecaSDag-Erling SmørgravThe possible
62545d5ecaSDag-Erling Smørgravkeywords and their meanings are as follows (note that
63545d5ecaSDag-Erling Smørgravkeywords are case-insensitive and arguments are case-sensitive):
64545d5ecaSDag-Erling Smørgrav.Bl -tag -width Ds
6521e764dfSDag-Erling Smørgrav.It Cm AcceptEnv
6621e764dfSDag-Erling SmørgravSpecifies what environment variables sent by the client will be copied into
6721e764dfSDag-Erling Smørgravthe session's
6821e764dfSDag-Erling Smørgrav.Xr environ 7 .
6921e764dfSDag-Erling SmørgravSee
7021e764dfSDag-Erling Smørgrav.Cm SendEnv
7121e764dfSDag-Erling Smørgravin
7221e764dfSDag-Erling Smørgrav.Xr ssh_config 5
7321e764dfSDag-Erling Smørgravfor how to configure the client.
7421e764dfSDag-Erling SmørgravNote that environment passing is only supported for protocol 2.
7521e764dfSDag-Erling SmørgravVariables are specified by name, which may contain the wildcard characters
7621e764dfSDag-Erling Smørgrav.Ql \&*
7721e764dfSDag-Erling Smørgravand
7821e764dfSDag-Erling Smørgrav.Ql \&? .
7921e764dfSDag-Erling SmørgravMultiple environment variables may be separated by whitespace or spread
8021e764dfSDag-Erling Smørgravacross multiple
8121e764dfSDag-Erling Smørgrav.Cm AcceptEnv
8221e764dfSDag-Erling Smørgravdirectives.
8321e764dfSDag-Erling SmørgravBe warned that some environment variables could be used to bypass restricted
8421e764dfSDag-Erling Smørgravuser environments.
8521e764dfSDag-Erling SmørgravFor this reason, care should be taken in the use of this directive.
8621e764dfSDag-Erling SmørgravThe default is not to accept any environment variables.
87aa49c926SDag-Erling Smørgrav.It Cm AddressFamily
88aa49c926SDag-Erling SmørgravSpecifies which address family should be used by
89aa49c926SDag-Erling Smørgrav.Nm sshd .
90aa49c926SDag-Erling SmørgravValid arguments are
91aa49c926SDag-Erling Smørgrav.Dq any ,
92aa49c926SDag-Erling Smørgrav.Dq inet
93aa49c926SDag-Erling Smørgrav(use IPv4 only) or
94aa49c926SDag-Erling Smørgrav.Dq inet6
95aa49c926SDag-Erling Smørgrav(use IPv6 only).
96aa49c926SDag-Erling SmørgravThe default is
97aa49c926SDag-Erling Smørgrav.Dq any .
98545d5ecaSDag-Erling Smørgrav.It Cm AllowGroups
99545d5ecaSDag-Erling SmørgravThis keyword can be followed by a list of group name patterns, separated
100545d5ecaSDag-Erling Smørgravby spaces.
101545d5ecaSDag-Erling SmørgravIf specified, login is allowed only for users whose primary
102545d5ecaSDag-Erling Smørgravgroup or supplementary group list matches one of the patterns.
103545d5ecaSDag-Erling Smørgrav.Ql \&*
104545d5ecaSDag-Erling Smørgravand
105cf2b5f3bSDag-Erling Smørgrav.Ql \&?
106545d5ecaSDag-Erling Smørgravcan be used as
107545d5ecaSDag-Erling Smørgravwildcards in the patterns.
108545d5ecaSDag-Erling SmørgravOnly group names are valid; a numerical group ID is not recognized.
109545d5ecaSDag-Erling SmørgravBy default, login is allowed for all groups.
110545d5ecaSDag-Erling Smørgrav.It Cm AllowTcpForwarding
111545d5ecaSDag-Erling SmørgravSpecifies whether TCP forwarding is permitted.
112545d5ecaSDag-Erling SmørgravThe default is
113545d5ecaSDag-Erling Smørgrav.Dq yes .
114545d5ecaSDag-Erling SmørgravNote that disabling TCP forwarding does not improve security unless
115545d5ecaSDag-Erling Smørgravusers are also denied shell access, as they can always install their
116545d5ecaSDag-Erling Smørgravown forwarders.
117545d5ecaSDag-Erling Smørgrav.It Cm AllowUsers
118545d5ecaSDag-Erling SmørgravThis keyword can be followed by a list of user name patterns, separated
119545d5ecaSDag-Erling Smørgravby spaces.
120e73e9afaSDag-Erling SmørgravIf specified, login is allowed only for user names that
121545d5ecaSDag-Erling Smørgravmatch one of the patterns.
122545d5ecaSDag-Erling Smørgrav.Ql \&*
123545d5ecaSDag-Erling Smørgravand
124cf2b5f3bSDag-Erling Smørgrav.Ql \&?
125545d5ecaSDag-Erling Smørgravcan be used as
126545d5ecaSDag-Erling Smørgravwildcards in the patterns.
127545d5ecaSDag-Erling SmørgravOnly user names are valid; a numerical user ID is not recognized.
128545d5ecaSDag-Erling SmørgravBy default, login is allowed for all users.
129545d5ecaSDag-Erling SmørgravIf the pattern takes the form USER@HOST then USER and HOST
130545d5ecaSDag-Erling Smørgravare separately checked, restricting logins to particular
131545d5ecaSDag-Erling Smørgravusers from particular hosts.
132545d5ecaSDag-Erling Smørgrav.It Cm AuthorizedKeysFile
133545d5ecaSDag-Erling SmørgravSpecifies the file that contains the public keys that can be used
134545d5ecaSDag-Erling Smørgravfor user authentication.
135545d5ecaSDag-Erling Smørgrav.Cm AuthorizedKeysFile
136545d5ecaSDag-Erling Smørgravmay contain tokens of the form %T which are substituted during connection
137cf2b5f3bSDag-Erling Smørgravset-up.
138cf2b5f3bSDag-Erling SmørgravThe following tokens are defined: %% is replaced by a literal '%',
139545d5ecaSDag-Erling Smørgrav%h is replaced by the home directory of the user being authenticated and
140545d5ecaSDag-Erling Smørgrav%u is replaced by the username of that user.
141545d5ecaSDag-Erling SmørgravAfter expansion,
142545d5ecaSDag-Erling Smørgrav.Cm AuthorizedKeysFile
143545d5ecaSDag-Erling Smørgravis taken to be an absolute path or one relative to the user's home
144545d5ecaSDag-Erling Smørgravdirectory.
145545d5ecaSDag-Erling SmørgravThe default is
146545d5ecaSDag-Erling Smørgrav.Dq .ssh/authorized_keys .
147545d5ecaSDag-Erling Smørgrav.It Cm Banner
148545d5ecaSDag-Erling SmørgravIn some jurisdictions, sending a warning message before authentication
149545d5ecaSDag-Erling Smørgravmay be relevant for getting legal protection.
150545d5ecaSDag-Erling SmørgravThe contents of the specified file are sent to the remote user before
151545d5ecaSDag-Erling Smørgravauthentication is allowed.
152545d5ecaSDag-Erling SmørgravThis option is only available for protocol version 2.
153545d5ecaSDag-Erling SmørgravBy default, no banner is displayed.
154545d5ecaSDag-Erling Smørgrav.It Cm ChallengeResponseAuthentication
155ee8aeb14SDag-Erling SmørgravSpecifies whether challenge-response authentication is allowed.
156ee8aeb14SDag-Erling SmørgravSpecifically, in
157ee8aeb14SDag-Erling Smørgrav.Fx ,
158ee8aeb14SDag-Erling Smørgravthis controls the use of PAM (see
159ee8aeb14SDag-Erling Smørgrav.Xr pam 3 )
160ee8aeb14SDag-Erling Smørgravfor authentication.
161810a15b1SDag-Erling SmørgravNote that this affects the effectiveness of the
162810a15b1SDag-Erling Smørgrav.Cm PasswordAuthentication
163810a15b1SDag-Erling Smørgravand
164810a15b1SDag-Erling Smørgrav.Cm PermitRootLogin
165810a15b1SDag-Erling Smørgravvariables.
166545d5ecaSDag-Erling SmørgravThe default is
167545d5ecaSDag-Erling Smørgrav.Dq yes .
168545d5ecaSDag-Erling Smørgrav.It Cm Ciphers
169545d5ecaSDag-Erling SmørgravSpecifies the ciphers allowed for protocol version 2.
170545d5ecaSDag-Erling SmørgravMultiple ciphers must be comma-separated.
17121e764dfSDag-Erling SmørgravThe supported ciphers are
17221e764dfSDag-Erling Smørgrav.Dq 3des-cbc ,
17321e764dfSDag-Erling Smørgrav.Dq aes128-cbc ,
17421e764dfSDag-Erling Smørgrav.Dq aes192-cbc ,
17521e764dfSDag-Erling Smørgrav.Dq aes256-cbc ,
17621e764dfSDag-Erling Smørgrav.Dq aes128-ctr ,
17721e764dfSDag-Erling Smørgrav.Dq aes192-ctr ,
17821e764dfSDag-Erling Smørgrav.Dq aes256-ctr ,
179d4ecd108SDag-Erling Smørgrav.Dq arcfour128 ,
180d4ecd108SDag-Erling Smørgrav.Dq arcfour256 ,
18121e764dfSDag-Erling Smørgrav.Dq arcfour ,
18221e764dfSDag-Erling Smørgrav.Dq blowfish-cbc ,
18321e764dfSDag-Erling Smørgravand
18421e764dfSDag-Erling Smørgrav.Dq cast128-cbc .
185545d5ecaSDag-Erling SmørgravThe default is
186545d5ecaSDag-Erling Smørgrav.Bd -literal
187d4ecd108SDag-Erling Smørgrav  ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,
188d4ecd108SDag-Erling Smørgrav    arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr,
189d4ecd108SDag-Erling Smørgrav    aes192-ctr,aes256-ctr''
190545d5ecaSDag-Erling Smørgrav.Ed
191545d5ecaSDag-Erling Smørgrav.It Cm ClientAliveCountMax
192b74df5b2SDag-Erling SmørgravSets the number of client alive messages (see below) which may be
193545d5ecaSDag-Erling Smørgravsent without
194545d5ecaSDag-Erling Smørgrav.Nm sshd
195cf2b5f3bSDag-Erling Smørgravreceiving any messages back from the client.
196cf2b5f3bSDag-Erling SmørgravIf this threshold is reached while client alive messages are being sent,
197545d5ecaSDag-Erling Smørgrav.Nm sshd
198cf2b5f3bSDag-Erling Smørgravwill disconnect the client, terminating the session.
199cf2b5f3bSDag-Erling SmørgravIt is important to note that the use of client alive messages is very
200cf2b5f3bSDag-Erling Smørgravdifferent from
2011ec0d754SDag-Erling Smørgrav.Cm TCPKeepAlive
202cf2b5f3bSDag-Erling Smørgrav(below).
203cf2b5f3bSDag-Erling SmørgravThe client alive messages are sent through the encrypted channel
204cf2b5f3bSDag-Erling Smørgravand therefore will not be spoofable.
205cf2b5f3bSDag-Erling SmørgravThe TCP keepalive option enabled by
2061ec0d754SDag-Erling Smørgrav.Cm TCPKeepAlive
207cf2b5f3bSDag-Erling Smørgravis spoofable.
208cf2b5f3bSDag-Erling SmørgravThe client alive mechanism is valuable when the client or
209545d5ecaSDag-Erling Smørgravserver depend on knowing when a connection has become inactive.
210545d5ecaSDag-Erling Smørgrav.Pp
211cf2b5f3bSDag-Erling SmørgravThe default value is 3.
212cf2b5f3bSDag-Erling SmørgravIf
213545d5ecaSDag-Erling Smørgrav.Cm ClientAliveInterval
214b74df5b2SDag-Erling Smørgrav(see below) is set to 15, and
215545d5ecaSDag-Erling Smørgrav.Cm ClientAliveCountMax
216545d5ecaSDag-Erling Smørgravis left at the default, unresponsive ssh clients
217545d5ecaSDag-Erling Smørgravwill be disconnected after approximately 45 seconds.
218d4ecd108SDag-Erling Smørgrav.It Cm ClientAliveInterval
219d4ecd108SDag-Erling SmørgravSets a timeout interval in seconds after which if no data has been received
220d4ecd108SDag-Erling Smørgravfrom the client,
221d4ecd108SDag-Erling Smørgrav.Nm sshd
222d4ecd108SDag-Erling Smørgravwill send a message through the encrypted
223d4ecd108SDag-Erling Smørgravchannel to request a response from the client.
224d4ecd108SDag-Erling SmørgravThe default
225d4ecd108SDag-Erling Smørgravis 0, indicating that these messages will not be sent to the client.
226d4ecd108SDag-Erling SmørgravThis option applies to protocol version 2 only.
227545d5ecaSDag-Erling Smørgrav.It Cm Compression
228d4ecd108SDag-Erling SmørgravSpecifies whether compression is allowed, or delayed until
229d4ecd108SDag-Erling Smørgravthe user has authenticated successfully.
230545d5ecaSDag-Erling SmørgravThe argument must be
231d4ecd108SDag-Erling Smørgrav.Dq yes ,
232d4ecd108SDag-Erling Smørgrav.Dq delayed ,
233545d5ecaSDag-Erling Smørgravor
234545d5ecaSDag-Erling Smørgrav.Dq no .
235545d5ecaSDag-Erling SmørgravThe default is
236d4ecd108SDag-Erling Smørgrav.Dq delayed .
237545d5ecaSDag-Erling Smørgrav.It Cm DenyGroups
238545d5ecaSDag-Erling SmørgravThis keyword can be followed by a list of group name patterns, separated
239545d5ecaSDag-Erling Smørgravby spaces.
240545d5ecaSDag-Erling SmørgravLogin is disallowed for users whose primary group or supplementary
241545d5ecaSDag-Erling Smørgravgroup list matches one of the patterns.
242545d5ecaSDag-Erling Smørgrav.Ql \&*
243545d5ecaSDag-Erling Smørgravand
244cf2b5f3bSDag-Erling Smørgrav.Ql \&?
245545d5ecaSDag-Erling Smørgravcan be used as
246545d5ecaSDag-Erling Smørgravwildcards in the patterns.
247545d5ecaSDag-Erling SmørgravOnly group names are valid; a numerical group ID is not recognized.
248545d5ecaSDag-Erling SmørgravBy default, login is allowed for all groups.
249545d5ecaSDag-Erling Smørgrav.It Cm DenyUsers
250545d5ecaSDag-Erling SmørgravThis keyword can be followed by a list of user name patterns, separated
251545d5ecaSDag-Erling Smørgravby spaces.
252545d5ecaSDag-Erling SmørgravLogin is disallowed for user names that match one of the patterns.
253545d5ecaSDag-Erling Smørgrav.Ql \&*
254545d5ecaSDag-Erling Smørgravand
255cf2b5f3bSDag-Erling Smørgrav.Ql \&?
256545d5ecaSDag-Erling Smørgravcan be used as wildcards in the patterns.
257545d5ecaSDag-Erling SmørgravOnly user names are valid; a numerical user ID is not recognized.
258545d5ecaSDag-Erling SmørgravBy default, login is allowed for all users.
259545d5ecaSDag-Erling SmørgravIf the pattern takes the form USER@HOST then USER and HOST
260545d5ecaSDag-Erling Smørgravare separately checked, restricting logins to particular
261545d5ecaSDag-Erling Smørgravusers from particular hosts.
262545d5ecaSDag-Erling Smørgrav.It Cm GatewayPorts
263545d5ecaSDag-Erling SmørgravSpecifies whether remote hosts are allowed to connect to ports
264545d5ecaSDag-Erling Smørgravforwarded for the client.
265545d5ecaSDag-Erling SmørgravBy default,
266545d5ecaSDag-Erling Smørgrav.Nm sshd
267e73e9afaSDag-Erling Smørgravbinds remote port forwardings to the loopback address.
268e73e9afaSDag-Erling SmørgravThis prevents other remote hosts from connecting to forwarded ports.
269545d5ecaSDag-Erling Smørgrav.Cm GatewayPorts
270545d5ecaSDag-Erling Smørgravcan be used to specify that
271545d5ecaSDag-Erling Smørgrav.Nm sshd
272aa49c926SDag-Erling Smørgravshould allow remote port forwardings to bind to non-loopback addresses, thus
273aa49c926SDag-Erling Smørgravallowing other hosts to connect.
274aa49c926SDag-Erling SmørgravThe argument may be
275aa49c926SDag-Erling Smørgrav.Dq no
276aa49c926SDag-Erling Smørgravto force remote port forwardings to be available to the local host only,
277545d5ecaSDag-Erling Smørgrav.Dq yes
278aa49c926SDag-Erling Smørgravto force remote port forwardings to bind to the wildcard address, or
279aa49c926SDag-Erling Smørgrav.Dq clientspecified
280aa49c926SDag-Erling Smørgravto allow the client to select the address to which the forwarding is bound.
281545d5ecaSDag-Erling SmørgravThe default is
282545d5ecaSDag-Erling Smørgrav.Dq no .
283cf2b5f3bSDag-Erling Smørgrav.It Cm GSSAPIAuthentication
284cf2b5f3bSDag-Erling SmørgravSpecifies whether user authentication based on GSSAPI is allowed.
285cf2b5f3bSDag-Erling SmørgravThe default is
286cf2b5f3bSDag-Erling Smørgrav.Dq no .
287cf2b5f3bSDag-Erling SmørgravNote that this option applies to protocol version 2 only.
288cf2b5f3bSDag-Erling Smørgrav.It Cm GSSAPICleanupCredentials
289cf2b5f3bSDag-Erling SmørgravSpecifies whether to automatically destroy the user's credentials cache
290cf2b5f3bSDag-Erling Smørgravon logout.
291cf2b5f3bSDag-Erling SmørgravThe default is
292cf2b5f3bSDag-Erling Smørgrav.Dq yes .
293cf2b5f3bSDag-Erling SmørgravNote that this option applies to protocol version 2 only.
294545d5ecaSDag-Erling Smørgrav.It Cm HostbasedAuthentication
295545d5ecaSDag-Erling SmørgravSpecifies whether rhosts or /etc/hosts.equiv authentication together
296545d5ecaSDag-Erling Smørgravwith successful public key client host authentication is allowed
297545d5ecaSDag-Erling Smørgrav(hostbased authentication).
298545d5ecaSDag-Erling SmørgravThis option is similar to
299545d5ecaSDag-Erling Smørgrav.Cm RhostsRSAAuthentication
300545d5ecaSDag-Erling Smørgravand applies to protocol version 2 only.
301545d5ecaSDag-Erling SmørgravThe default is
302545d5ecaSDag-Erling Smørgrav.Dq no .
303545d5ecaSDag-Erling Smørgrav.It Cm HostKey
304545d5ecaSDag-Erling SmørgravSpecifies a file containing a private host key
305545d5ecaSDag-Erling Smørgravused by SSH.
306545d5ecaSDag-Erling SmørgravThe default is
307545d5ecaSDag-Erling Smørgrav.Pa /etc/ssh/ssh_host_key
308545d5ecaSDag-Erling Smørgravfor protocol version 1, and
309545d5ecaSDag-Erling Smørgrav.Pa /etc/ssh/ssh_host_dsa_key
310545d5ecaSDag-Erling Smørgravfor protocol version 2.
311545d5ecaSDag-Erling SmørgravNote that
312545d5ecaSDag-Erling Smørgrav.Nm sshd
313545d5ecaSDag-Erling Smørgravwill refuse to use a file if it is group/world-accessible.
314545d5ecaSDag-Erling SmørgravIt is possible to have multiple host key files.
315545d5ecaSDag-Erling Smørgrav.Dq rsa1
316545d5ecaSDag-Erling Smørgravkeys are used for version 1 and
317545d5ecaSDag-Erling Smørgrav.Dq dsa
318545d5ecaSDag-Erling Smørgravor
319545d5ecaSDag-Erling Smørgrav.Dq rsa
320545d5ecaSDag-Erling Smørgravare used for version 2 of the SSH protocol.
321545d5ecaSDag-Erling Smørgrav.It Cm IgnoreRhosts
322545d5ecaSDag-Erling SmørgravSpecifies that
323545d5ecaSDag-Erling Smørgrav.Pa .rhosts
324545d5ecaSDag-Erling Smørgravand
325545d5ecaSDag-Erling Smørgrav.Pa .shosts
326545d5ecaSDag-Erling Smørgravfiles will not be used in
327545d5ecaSDag-Erling Smørgrav.Cm RhostsRSAAuthentication
328545d5ecaSDag-Erling Smørgravor
329545d5ecaSDag-Erling Smørgrav.Cm HostbasedAuthentication .
330545d5ecaSDag-Erling Smørgrav.Pp
331545d5ecaSDag-Erling Smørgrav.Pa /etc/hosts.equiv
332545d5ecaSDag-Erling Smørgravand
33335d4ccfbSDag-Erling Smørgrav.Pa /etc/ssh/shosts.equiv
334545d5ecaSDag-Erling Smørgravare still used.
335545d5ecaSDag-Erling SmørgravThe default is
336545d5ecaSDag-Erling Smørgrav.Dq yes .
337545d5ecaSDag-Erling Smørgrav.It Cm IgnoreUserKnownHosts
338545d5ecaSDag-Erling SmørgravSpecifies whether
339545d5ecaSDag-Erling Smørgrav.Nm sshd
340545d5ecaSDag-Erling Smørgravshould ignore the user's
341d4ecd108SDag-Erling Smørgrav.Pa ~/.ssh/known_hosts
342545d5ecaSDag-Erling Smørgravduring
343545d5ecaSDag-Erling Smørgrav.Cm RhostsRSAAuthentication
344545d5ecaSDag-Erling Smørgravor
345545d5ecaSDag-Erling Smørgrav.Cm HostbasedAuthentication .
346545d5ecaSDag-Erling SmørgravThe default is
347545d5ecaSDag-Erling Smørgrav.Dq no .
348545d5ecaSDag-Erling Smørgrav.It Cm KerberosAuthentication
349cf2b5f3bSDag-Erling SmørgravSpecifies whether the password provided by the user for
350545d5ecaSDag-Erling Smørgrav.Cm PasswordAuthentication
351cf2b5f3bSDag-Erling Smørgravwill be validated through the Kerberos KDC.
352545d5ecaSDag-Erling SmørgravTo use this option, the server needs a
353545d5ecaSDag-Erling SmørgravKerberos servtab which allows the verification of the KDC's identity.
354545d5ecaSDag-Erling SmørgravDefault is
355545d5ecaSDag-Erling Smørgrav.Dq no .
3565962c0e9SDag-Erling Smørgrav.It Cm KerberosGetAFSToken
357b74df5b2SDag-Erling SmørgravIf AFS is active and the user has a Kerberos 5 TGT, attempt to acquire
3585962c0e9SDag-Erling Smørgravan AFS token before accessing the user's home directory.
3595962c0e9SDag-Erling SmørgravDefault is
3605962c0e9SDag-Erling Smørgrav.Dq no .
361545d5ecaSDag-Erling Smørgrav.It Cm KerberosOrLocalPasswd
362545d5ecaSDag-Erling SmørgravIf set then if password authentication through Kerberos fails then
363545d5ecaSDag-Erling Smørgravthe password will be validated via any additional local mechanism
364545d5ecaSDag-Erling Smørgravsuch as
365545d5ecaSDag-Erling Smørgrav.Pa /etc/passwd .
366545d5ecaSDag-Erling SmørgravDefault is
367545d5ecaSDag-Erling Smørgrav.Dq yes .
368545d5ecaSDag-Erling Smørgrav.It Cm KerberosTicketCleanup
369545d5ecaSDag-Erling SmørgravSpecifies whether to automatically destroy the user's ticket cache
370545d5ecaSDag-Erling Smørgravfile on logout.
371545d5ecaSDag-Erling SmørgravDefault is
372545d5ecaSDag-Erling Smørgrav.Dq yes .
373545d5ecaSDag-Erling Smørgrav.It Cm KeyRegenerationInterval
374545d5ecaSDag-Erling SmørgravIn protocol version 1, the ephemeral server key is automatically regenerated
375545d5ecaSDag-Erling Smørgravafter this many seconds (if it has been used).
376545d5ecaSDag-Erling SmørgravThe purpose of regeneration is to prevent
377545d5ecaSDag-Erling Smørgravdecrypting captured sessions by later breaking into the machine and
378545d5ecaSDag-Erling Smørgravstealing the keys.
379545d5ecaSDag-Erling SmørgravThe key is never stored anywhere.
380545d5ecaSDag-Erling SmørgravIf the value is 0, the key is never regenerated.
381545d5ecaSDag-Erling SmørgravThe default is 3600 (seconds).
382545d5ecaSDag-Erling Smørgrav.It Cm ListenAddress
383545d5ecaSDag-Erling SmørgravSpecifies the local addresses
384545d5ecaSDag-Erling Smørgrav.Nm sshd
385545d5ecaSDag-Erling Smørgravshould listen on.
386545d5ecaSDag-Erling SmørgravThe following forms may be used:
387545d5ecaSDag-Erling Smørgrav.Pp
388545d5ecaSDag-Erling Smørgrav.Bl -item -offset indent -compact
389545d5ecaSDag-Erling Smørgrav.It
390545d5ecaSDag-Erling Smørgrav.Cm ListenAddress
391545d5ecaSDag-Erling Smørgrav.Sm off
392545d5ecaSDag-Erling Smørgrav.Ar host No | Ar IPv4_addr No | Ar IPv6_addr
393545d5ecaSDag-Erling Smørgrav.Sm on
394545d5ecaSDag-Erling Smørgrav.It
395545d5ecaSDag-Erling Smørgrav.Cm ListenAddress
396545d5ecaSDag-Erling Smørgrav.Sm off
397545d5ecaSDag-Erling Smørgrav.Ar host No | Ar IPv4_addr No : Ar port
398545d5ecaSDag-Erling Smørgrav.Sm on
399545d5ecaSDag-Erling Smørgrav.It
400545d5ecaSDag-Erling Smørgrav.Cm ListenAddress
401545d5ecaSDag-Erling Smørgrav.Sm off
402545d5ecaSDag-Erling Smørgrav.Oo
403545d5ecaSDag-Erling Smørgrav.Ar host No | Ar IPv6_addr Oc : Ar port
404545d5ecaSDag-Erling Smørgrav.Sm on
405545d5ecaSDag-Erling Smørgrav.El
406545d5ecaSDag-Erling Smørgrav.Pp
407545d5ecaSDag-Erling SmørgravIf
408545d5ecaSDag-Erling Smørgrav.Ar port
409545d5ecaSDag-Erling Smørgravis not specified,
410545d5ecaSDag-Erling Smørgrav.Nm sshd
411545d5ecaSDag-Erling Smørgravwill listen on the address and all prior
412545d5ecaSDag-Erling Smørgrav.Cm Port
413cf2b5f3bSDag-Erling Smørgravoptions specified.
414cf2b5f3bSDag-Erling SmørgravThe default is to listen on all local addresses.
415e73e9afaSDag-Erling SmørgravMultiple
416545d5ecaSDag-Erling Smørgrav.Cm ListenAddress
417cf2b5f3bSDag-Erling Smørgravoptions are permitted.
418cf2b5f3bSDag-Erling SmørgravAdditionally, any
419545d5ecaSDag-Erling Smørgrav.Cm Port
420545d5ecaSDag-Erling Smørgravoptions must precede this option for non port qualified addresses.
421545d5ecaSDag-Erling Smørgrav.It Cm LoginGraceTime
422545d5ecaSDag-Erling SmørgravThe server disconnects after this time if the user has not
423545d5ecaSDag-Erling Smørgravsuccessfully logged in.
424545d5ecaSDag-Erling SmørgravIf the value is 0, there is no time limit.
425f388f5efSDag-Erling SmørgravThe default is 120 seconds.
426545d5ecaSDag-Erling Smørgrav.It Cm LogLevel
427545d5ecaSDag-Erling SmørgravGives the verbosity level that is used when logging messages from
428545d5ecaSDag-Erling Smørgrav.Nm sshd .
429545d5ecaSDag-Erling SmørgravThe possible values are:
430545d5ecaSDag-Erling SmørgravQUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3.
431e73e9afaSDag-Erling SmørgravThe default is INFO.
432e73e9afaSDag-Erling SmørgravDEBUG and DEBUG1 are equivalent.
433e73e9afaSDag-Erling SmørgravDEBUG2 and DEBUG3 each specify higher levels of debugging output.
434e73e9afaSDag-Erling SmørgravLogging with a DEBUG level violates the privacy of users and is not recommended.
435545d5ecaSDag-Erling Smørgrav.It Cm MACs
436545d5ecaSDag-Erling SmørgravSpecifies the available MAC (message authentication code) algorithms.
437545d5ecaSDag-Erling SmørgravThe MAC algorithm is used in protocol version 2
438545d5ecaSDag-Erling Smørgravfor data integrity protection.
439545d5ecaSDag-Erling SmørgravMultiple algorithms must be comma-separated.
440545d5ecaSDag-Erling SmørgravThe default is
441545d5ecaSDag-Erling Smørgrav.Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 .
44221e764dfSDag-Erling Smørgrav.It Cm MaxAuthTries
44321e764dfSDag-Erling SmørgravSpecifies the maximum number of authentication attempts permitted per
44421e764dfSDag-Erling Smørgravconnection.
44521e764dfSDag-Erling SmørgravOnce the number of failures reaches half this value,
44621e764dfSDag-Erling Smørgravadditional failures are logged.
44721e764dfSDag-Erling SmørgravThe default is 6.
448545d5ecaSDag-Erling Smørgrav.It Cm MaxStartups
449545d5ecaSDag-Erling SmørgravSpecifies the maximum number of concurrent unauthenticated connections to the
450545d5ecaSDag-Erling Smørgrav.Nm sshd
451545d5ecaSDag-Erling Smørgravdaemon.
452545d5ecaSDag-Erling SmørgravAdditional connections will be dropped until authentication succeeds or the
453545d5ecaSDag-Erling Smørgrav.Cm LoginGraceTime
454545d5ecaSDag-Erling Smørgravexpires for a connection.
455545d5ecaSDag-Erling SmørgravThe default is 10.
456545d5ecaSDag-Erling Smørgrav.Pp
457545d5ecaSDag-Erling SmørgravAlternatively, random early drop can be enabled by specifying
458545d5ecaSDag-Erling Smørgravthe three colon separated values
459545d5ecaSDag-Erling Smørgrav.Dq start:rate:full
460545d5ecaSDag-Erling Smørgrav(e.g., "10:30:60").
461545d5ecaSDag-Erling Smørgrav.Nm sshd
462545d5ecaSDag-Erling Smørgravwill refuse connection attempts with a probability of
463545d5ecaSDag-Erling Smørgrav.Dq rate/100
464545d5ecaSDag-Erling Smørgrav(30%)
465545d5ecaSDag-Erling Smørgravif there are currently
466545d5ecaSDag-Erling Smørgrav.Dq start
467545d5ecaSDag-Erling Smørgrav(10)
468545d5ecaSDag-Erling Smørgravunauthenticated connections.
469545d5ecaSDag-Erling SmørgravThe probability increases linearly and all connection attempts
470545d5ecaSDag-Erling Smørgravare refused if the number of unauthenticated connections reaches
471545d5ecaSDag-Erling Smørgrav.Dq full
472545d5ecaSDag-Erling Smørgrav(60).
473545d5ecaSDag-Erling Smørgrav.It Cm PasswordAuthentication
474545d5ecaSDag-Erling SmørgravSpecifies whether password authentication is allowed.
475545d5ecaSDag-Erling SmørgravThe default is
476b909c84bSDag-Erling Smørgrav.Dq no ,
477b909c84bSDag-Erling Smørgravunless
478b909c84bSDag-Erling Smørgrav.Nm sshd
479b909c84bSDag-Erling Smørgravwas built without PAM support, in which case the default is
480545d5ecaSDag-Erling Smørgrav.Dq yes .
481b0a159ccSSimon L. B. NielsenNote that if
482810a15b1SDag-Erling Smørgrav.Cm ChallengeResponseAuthentication
483810a15b1SDag-Erling Smørgravis
484810a15b1SDag-Erling Smørgrav.Dq yes ,
485810a15b1SDag-Erling Smørgravand the PAM authentication policy for
486810a15b1SDag-Erling Smørgrav.Nm sshd
487810a15b1SDag-Erling Smørgravincludes
488810a15b1SDag-Erling Smørgrav.Xr pam_unix 8 ,
489810a15b1SDag-Erling Smørgravpassword authentication will be allowed through the challenge-response
490810a15b1SDag-Erling Smørgravmechanism regardless of the value of
491810a15b1SDag-Erling Smørgrav.Cm PasswordAuthentication .
492545d5ecaSDag-Erling Smørgrav.It Cm PermitEmptyPasswords
493545d5ecaSDag-Erling SmørgravWhen password authentication is allowed, it specifies whether the
494545d5ecaSDag-Erling Smørgravserver allows login to accounts with empty password strings.
495545d5ecaSDag-Erling SmørgravThe default is
496545d5ecaSDag-Erling Smørgrav.Dq no .
497545d5ecaSDag-Erling Smørgrav.It Cm PermitRootLogin
498545d5ecaSDag-Erling SmørgravSpecifies whether root can log in using
499545d5ecaSDag-Erling Smørgrav.Xr ssh 1 .
500545d5ecaSDag-Erling SmørgravThe argument must be
501545d5ecaSDag-Erling Smørgrav.Dq yes ,
502545d5ecaSDag-Erling Smørgrav.Dq without-password ,
503545d5ecaSDag-Erling Smørgrav.Dq forced-commands-only
504545d5ecaSDag-Erling Smørgravor
505545d5ecaSDag-Erling Smørgrav.Dq no .
506545d5ecaSDag-Erling SmørgravThe default is
50735d4ccfbSDag-Erling Smørgrav.Dq no .
508810a15b1SDag-Erling SmørgravNote that if
509810a15b1SDag-Erling Smørgrav.Cm ChallengeResponseAuthentication
510810a15b1SDag-Erling Smørgravis
511810a15b1SDag-Erling Smørgrav.Dq yes ,
512810a15b1SDag-Erling Smørgravthe root user may be allowed in with its password even if
513810a15b1SDag-Erling Smørgrav.Cm PermitRootLogin is set to
514810a15b1SDag-Erling Smørgrav.Dq without-password .
515545d5ecaSDag-Erling Smørgrav.Pp
516545d5ecaSDag-Erling SmørgravIf this option is set to
517545d5ecaSDag-Erling Smørgrav.Dq without-password
518aa49c926SDag-Erling Smørgravpassword authentication is disabled for root.
519545d5ecaSDag-Erling Smørgrav.Pp
520545d5ecaSDag-Erling SmørgravIf this option is set to
521545d5ecaSDag-Erling Smørgrav.Dq forced-commands-only
522545d5ecaSDag-Erling Smørgravroot login with public key authentication will be allowed,
523545d5ecaSDag-Erling Smørgravbut only if the
524545d5ecaSDag-Erling Smørgrav.Ar command
525545d5ecaSDag-Erling Smørgravoption has been specified
526545d5ecaSDag-Erling Smørgrav(which may be useful for taking remote backups even if root login is
527cf2b5f3bSDag-Erling Smørgravnormally not allowed).
528cf2b5f3bSDag-Erling SmørgravAll other authentication methods are disabled for root.
529545d5ecaSDag-Erling Smørgrav.Pp
530545d5ecaSDag-Erling SmørgravIf this option is set to
531545d5ecaSDag-Erling Smørgrav.Dq no
532545d5ecaSDag-Erling Smørgravroot is not allowed to log in.
533b74df5b2SDag-Erling Smørgrav.It Cm PermitTunnel
534b74df5b2SDag-Erling SmørgravSpecifies whether
535b74df5b2SDag-Erling Smørgrav.Xr tun 4
536b74df5b2SDag-Erling Smørgravdevice forwarding is allowed.
537b74df5b2SDag-Erling SmørgravThe argument must be
538b74df5b2SDag-Erling Smørgrav.Dq yes ,
539b74df5b2SDag-Erling Smørgrav.Dq point-to-point ,
540b74df5b2SDag-Erling Smørgrav.Dq ethernet
541b74df5b2SDag-Erling Smørgravor
542b74df5b2SDag-Erling Smørgrav.Dq no .
543b74df5b2SDag-Erling SmørgravThe default is
544b74df5b2SDag-Erling Smørgrav.Dq no .
545f388f5efSDag-Erling Smørgrav.It Cm PermitUserEnvironment
546f388f5efSDag-Erling SmørgravSpecifies whether
547f388f5efSDag-Erling Smørgrav.Pa ~/.ssh/environment
548f388f5efSDag-Erling Smørgravand
549f388f5efSDag-Erling Smørgrav.Cm environment=
550f388f5efSDag-Erling Smørgravoptions in
551f388f5efSDag-Erling Smørgrav.Pa ~/.ssh/authorized_keys
552f388f5efSDag-Erling Smørgravare processed by
553f388f5efSDag-Erling Smørgrav.Nm sshd .
554f388f5efSDag-Erling SmørgravThe default is
555f388f5efSDag-Erling Smørgrav.Dq no .
556f388f5efSDag-Erling SmørgravEnabling environment processing may enable users to bypass access
557f388f5efSDag-Erling Smørgravrestrictions in some configurations using mechanisms such as
558f388f5efSDag-Erling Smørgrav.Ev LD_PRELOAD .
559545d5ecaSDag-Erling Smørgrav.It Cm PidFile
560a82e551fSDag-Erling SmørgravSpecifies the file that contains the process ID of the
561545d5ecaSDag-Erling Smørgrav.Nm sshd
562545d5ecaSDag-Erling Smørgravdaemon.
563545d5ecaSDag-Erling SmørgravThe default is
564545d5ecaSDag-Erling Smørgrav.Pa /var/run/sshd.pid .
565545d5ecaSDag-Erling Smørgrav.It Cm Port
566545d5ecaSDag-Erling SmørgravSpecifies the port number that
567545d5ecaSDag-Erling Smørgrav.Nm sshd
568545d5ecaSDag-Erling Smørgravlistens on.
569545d5ecaSDag-Erling SmørgravThe default is 22.
570545d5ecaSDag-Erling SmørgravMultiple options of this type are permitted.
571545d5ecaSDag-Erling SmørgravSee also
572545d5ecaSDag-Erling Smørgrav.Cm ListenAddress .
573545d5ecaSDag-Erling Smørgrav.It Cm PrintLastLog
574545d5ecaSDag-Erling SmørgravSpecifies whether
575545d5ecaSDag-Erling Smørgrav.Nm sshd
576aa49c926SDag-Erling Smørgravshould print the date and time of the last user login when a user logs
577aa49c926SDag-Erling Smørgravin interactively.
578545d5ecaSDag-Erling SmørgravThe default is
579545d5ecaSDag-Erling Smørgrav.Dq yes .
580545d5ecaSDag-Erling Smørgrav.It Cm PrintMotd
581545d5ecaSDag-Erling SmørgravSpecifies whether
582545d5ecaSDag-Erling Smørgrav.Nm sshd
583545d5ecaSDag-Erling Smørgravshould print
584545d5ecaSDag-Erling Smørgrav.Pa /etc/motd
585545d5ecaSDag-Erling Smørgravwhen a user logs in interactively.
586545d5ecaSDag-Erling Smørgrav(On some systems it is also printed by the shell,
587545d5ecaSDag-Erling Smørgrav.Pa /etc/profile ,
588545d5ecaSDag-Erling Smørgravor equivalent.)
589545d5ecaSDag-Erling SmørgravThe default is
590545d5ecaSDag-Erling Smørgrav.Dq yes .
591545d5ecaSDag-Erling Smørgrav.It Cm Protocol
592545d5ecaSDag-Erling SmørgravSpecifies the protocol versions
593545d5ecaSDag-Erling Smørgrav.Nm sshd
594f388f5efSDag-Erling Smørgravsupports.
595545d5ecaSDag-Erling SmørgravThe possible values are
596545d5ecaSDag-Erling Smørgrav.Dq 1
597545d5ecaSDag-Erling Smørgravand
598545d5ecaSDag-Erling Smørgrav.Dq 2 .
599545d5ecaSDag-Erling SmørgravMultiple versions must be comma-separated.
600545d5ecaSDag-Erling SmørgravThe default is
601028c324aSDag-Erling Smørgrav.Dq 2 .
602f388f5efSDag-Erling SmørgravNote that the order of the protocol list does not indicate preference,
603f388f5efSDag-Erling Smørgravbecause the client selects among multiple protocol versions offered
604f388f5efSDag-Erling Smørgravby the server.
605f388f5efSDag-Erling SmørgravSpecifying
606f388f5efSDag-Erling Smørgrav.Dq 2,1
607f388f5efSDag-Erling Smørgravis identical to
608f388f5efSDag-Erling Smørgrav.Dq 1,2 .
609545d5ecaSDag-Erling Smørgrav.It Cm PubkeyAuthentication
610545d5ecaSDag-Erling SmørgravSpecifies whether public key authentication is allowed.
611545d5ecaSDag-Erling SmørgravThe default is
612545d5ecaSDag-Erling Smørgrav.Dq yes .
613545d5ecaSDag-Erling SmørgravNote that this option applies to protocol version 2 only.
614545d5ecaSDag-Erling Smørgrav.It Cm RhostsRSAAuthentication
61535d4ccfbSDag-Erling SmørgravSpecifies whether rhosts or
61635d4ccfbSDag-Erling Smørgrav.Pa /etc/hosts.equiv
61735d4ccfbSDag-Erling Smørgravauthentication together
618545d5ecaSDag-Erling Smørgravwith successful RSA host authentication is allowed.
619545d5ecaSDag-Erling SmørgravThe default is
620545d5ecaSDag-Erling Smørgrav.Dq no .
621545d5ecaSDag-Erling SmørgravThis option applies to protocol version 1 only.
622545d5ecaSDag-Erling Smørgrav.It Cm RSAAuthentication
623545d5ecaSDag-Erling SmørgravSpecifies whether pure RSA authentication is allowed.
624545d5ecaSDag-Erling SmørgravThe default is
625545d5ecaSDag-Erling Smørgrav.Dq yes .
626545d5ecaSDag-Erling SmørgravThis option applies to protocol version 1 only.
627545d5ecaSDag-Erling Smørgrav.It Cm ServerKeyBits
628545d5ecaSDag-Erling SmørgravDefines the number of bits in the ephemeral protocol version 1 server key.
629545d5ecaSDag-Erling SmørgravThe minimum value is 512, and the default is 768.
630545d5ecaSDag-Erling Smørgrav.It Cm StrictModes
631545d5ecaSDag-Erling SmørgravSpecifies whether
632545d5ecaSDag-Erling Smørgrav.Nm sshd
633545d5ecaSDag-Erling Smørgravshould check file modes and ownership of the
634545d5ecaSDag-Erling Smørgravuser's files and home directory before accepting login.
635545d5ecaSDag-Erling SmørgravThis is normally desirable because novices sometimes accidentally leave their
636545d5ecaSDag-Erling Smørgravdirectory or files world-writable.
637545d5ecaSDag-Erling SmørgravThe default is
638545d5ecaSDag-Erling Smørgrav.Dq yes .
639545d5ecaSDag-Erling Smørgrav.It Cm Subsystem
640545d5ecaSDag-Erling SmørgravConfigures an external subsystem (e.g., file transfer daemon).
641545d5ecaSDag-Erling SmørgravArguments should be a subsystem name and a command to execute upon subsystem
642545d5ecaSDag-Erling Smørgravrequest.
643545d5ecaSDag-Erling SmørgravThe command
644545d5ecaSDag-Erling Smørgrav.Xr sftp-server 8
645545d5ecaSDag-Erling Smørgravimplements the
646545d5ecaSDag-Erling Smørgrav.Dq sftp
647545d5ecaSDag-Erling Smørgravfile transfer subsystem.
648545d5ecaSDag-Erling SmørgravBy default no subsystems are defined.
649545d5ecaSDag-Erling SmørgravNote that this option applies to protocol version 2 only.
650545d5ecaSDag-Erling Smørgrav.It Cm SyslogFacility
651545d5ecaSDag-Erling SmørgravGives the facility code that is used when logging messages from
652545d5ecaSDag-Erling Smørgrav.Nm sshd .
653545d5ecaSDag-Erling SmørgravThe possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
654545d5ecaSDag-Erling SmørgravLOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
655545d5ecaSDag-Erling SmørgravThe default is AUTH.
6561ec0d754SDag-Erling Smørgrav.It Cm TCPKeepAlive
6571ec0d754SDag-Erling SmørgravSpecifies whether the system should send TCP keepalive messages to the
6581ec0d754SDag-Erling Smørgravother side.
6591ec0d754SDag-Erling SmørgravIf they are sent, death of the connection or crash of one
6601ec0d754SDag-Erling Smørgravof the machines will be properly noticed.
6611ec0d754SDag-Erling SmørgravHowever, this means that
6621ec0d754SDag-Erling Smørgravconnections will die if the route is down temporarily, and some people
6631ec0d754SDag-Erling Smørgravfind it annoying.
6641ec0d754SDag-Erling SmørgravOn the other hand, if TCP keepalives are not sent,
6651ec0d754SDag-Erling Smørgravsessions may hang indefinitely on the server, leaving
6661ec0d754SDag-Erling Smørgrav.Dq ghost
6671ec0d754SDag-Erling Smørgravusers and consuming server resources.
6681ec0d754SDag-Erling Smørgrav.Pp
6691ec0d754SDag-Erling SmørgravThe default is
6701ec0d754SDag-Erling Smørgrav.Dq yes
6711ec0d754SDag-Erling Smørgrav(to send TCP keepalive messages), and the server will notice
6721ec0d754SDag-Erling Smørgravif the network goes down or the client host crashes.
6731ec0d754SDag-Erling SmørgravThis avoids infinitely hanging sessions.
6741ec0d754SDag-Erling Smørgrav.Pp
6751ec0d754SDag-Erling SmørgravTo disable TCP keepalive messages, the value should be set to
6761ec0d754SDag-Erling Smørgrav.Dq no .
677cf2b5f3bSDag-Erling Smørgrav.It Cm UseDNS
678cf2b5f3bSDag-Erling SmørgravSpecifies whether
679cf2b5f3bSDag-Erling Smørgrav.Nm sshd
680cf2b5f3bSDag-Erling Smørgravshould look up the remote host name and check that
681cf2b5f3bSDag-Erling Smørgravthe resolved host name for the remote IP address maps back to the
682cf2b5f3bSDag-Erling Smørgravvery same IP address.
683cf2b5f3bSDag-Erling SmørgravThe default is
684cf2b5f3bSDag-Erling Smørgrav.Dq yes .
685545d5ecaSDag-Erling Smørgrav.It Cm UseLogin
686545d5ecaSDag-Erling SmørgravSpecifies whether
687545d5ecaSDag-Erling Smørgrav.Xr login 1
688545d5ecaSDag-Erling Smørgravis used for interactive login sessions.
689545d5ecaSDag-Erling SmørgravThe default is
690545d5ecaSDag-Erling Smørgrav.Dq no .
691545d5ecaSDag-Erling SmørgravNote that
692545d5ecaSDag-Erling Smørgrav.Xr login 1
693545d5ecaSDag-Erling Smørgravis never used for remote command execution.
694545d5ecaSDag-Erling SmørgravNote also, that if this is enabled,
695545d5ecaSDag-Erling Smørgrav.Cm X11Forwarding
696545d5ecaSDag-Erling Smørgravwill be disabled because
697545d5ecaSDag-Erling Smørgrav.Xr login 1
698545d5ecaSDag-Erling Smørgravdoes not know how to handle
699545d5ecaSDag-Erling Smørgrav.Xr xauth 1
700e73e9afaSDag-Erling Smørgravcookies.
701e73e9afaSDag-Erling SmørgravIf
702545d5ecaSDag-Erling Smørgrav.Cm UsePrivilegeSeparation
703545d5ecaSDag-Erling Smørgravis specified, it will be disabled after authentication.
704cf2b5f3bSDag-Erling Smørgrav.It Cm UsePAM
70521e764dfSDag-Erling SmørgravEnables the Pluggable Authentication Module interface.
70621e764dfSDag-Erling SmørgravIf set to
70721e764dfSDag-Erling Smørgrav.Dq yes
70821e764dfSDag-Erling Smørgravthis will enable PAM authentication using
70921e764dfSDag-Erling Smørgrav.Cm ChallengeResponseAuthentication
71021e764dfSDag-Erling Smørgravand PAM account and session module processing for all authentication types.
71121e764dfSDag-Erling Smørgrav.Pp
71221e764dfSDag-Erling SmørgravBecause PAM challenge-response authentication usually serves an equivalent
71321e764dfSDag-Erling Smørgravrole to password authentication, you should disable either
71421e764dfSDag-Erling Smørgrav.Cm PasswordAuthentication
71521e764dfSDag-Erling Smørgravor
71621e764dfSDag-Erling Smørgrav.Cm ChallengeResponseAuthentication.
71721e764dfSDag-Erling Smørgrav.Pp
71821e764dfSDag-Erling SmørgravIf
71921e764dfSDag-Erling Smørgrav.Cm UsePAM
72021e764dfSDag-Erling Smørgravis enabled, you will not be able to run
72121e764dfSDag-Erling Smørgrav.Xr sshd 8
72221e764dfSDag-Erling Smørgravas a non-root user.
72321e764dfSDag-Erling SmørgravThe default is
724d2b1b4f3SDag-Erling Smørgrav.Dq yes .
725545d5ecaSDag-Erling Smørgrav.It Cm UsePrivilegeSeparation
726545d5ecaSDag-Erling SmørgravSpecifies whether
727545d5ecaSDag-Erling Smørgrav.Nm sshd
728545d5ecaSDag-Erling Smørgravseparates privileges by creating an unprivileged child process
729e73e9afaSDag-Erling Smørgravto deal with incoming network traffic.
730e73e9afaSDag-Erling SmørgravAfter successful authentication, another process will be created that has
731e73e9afaSDag-Erling Smørgravthe privilege of the authenticated user.
732e73e9afaSDag-Erling SmørgravThe goal of privilege separation is to prevent privilege
733545d5ecaSDag-Erling Smørgravescalation by containing any corruption within the unprivileged processes.
734545d5ecaSDag-Erling SmørgravThe default is
735545d5ecaSDag-Erling Smørgrav.Dq yes .
73635d4ccfbSDag-Erling Smørgrav.It Cm VersionAddendum
73735d4ccfbSDag-Erling SmørgravSpecifies a string to append to the regular version string to identify
73835d4ccfbSDag-Erling SmørgravOS- or site-specific modifications.
739ee8aeb14SDag-Erling SmørgravThe default is
740b74df5b2SDag-Erling Smørgrav.Dq FreeBSD-20060322 .
741545d5ecaSDag-Erling Smørgrav.It Cm X11DisplayOffset
742545d5ecaSDag-Erling SmørgravSpecifies the first display number available for
743545d5ecaSDag-Erling Smørgrav.Nm sshd Ns 's
744545d5ecaSDag-Erling SmørgravX11 forwarding.
745545d5ecaSDag-Erling SmørgravThis prevents
746545d5ecaSDag-Erling Smørgrav.Nm sshd
747545d5ecaSDag-Erling Smørgravfrom interfering with real X11 servers.
748545d5ecaSDag-Erling SmørgravThe default is 10.
749545d5ecaSDag-Erling Smørgrav.It Cm X11Forwarding
750545d5ecaSDag-Erling SmørgravSpecifies whether X11 forwarding is permitted.
751f388f5efSDag-Erling SmørgravThe argument must be
752f388f5efSDag-Erling Smørgrav.Dq yes
753f388f5efSDag-Erling Smørgravor
754f388f5efSDag-Erling Smørgrav.Dq no .
755545d5ecaSDag-Erling SmørgravThe default is
756ee8aeb14SDag-Erling Smørgrav.Dq yes .
757f388f5efSDag-Erling Smørgrav.Pp
758f388f5efSDag-Erling SmørgravWhen X11 forwarding is enabled, there may be additional exposure to
759f388f5efSDag-Erling Smørgravthe server and to client displays if the
760f388f5efSDag-Erling Smørgrav.Nm sshd
761f388f5efSDag-Erling Smørgravproxy display is configured to listen on the wildcard address (see
762f388f5efSDag-Erling Smørgrav.Cm X11UseLocalhost
763f388f5efSDag-Erling Smørgravbelow), however this is not the default.
764f388f5efSDag-Erling SmørgravAdditionally, the authentication spoofing and authentication data
765f388f5efSDag-Erling Smørgravverification and substitution occur on the client side.
766f388f5efSDag-Erling SmørgravThe security risk of using X11 forwarding is that the client's X11
767f388f5efSDag-Erling Smørgravdisplay server may be exposed to attack when the ssh client requests
768f388f5efSDag-Erling Smørgravforwarding (see the warnings for
769f388f5efSDag-Erling Smørgrav.Cm ForwardX11
770f388f5efSDag-Erling Smørgravin
771f388f5efSDag-Erling Smørgrav.Xr ssh_config 5 ) .
772f388f5efSDag-Erling SmørgravA system administrator may have a stance in which they want to
773f388f5efSDag-Erling Smørgravprotect clients that may expose themselves to attack by unwittingly
774f388f5efSDag-Erling Smørgravrequesting X11 forwarding, which can warrant a
775f388f5efSDag-Erling Smørgrav.Dq no
776f388f5efSDag-Erling Smørgravsetting.
777f388f5efSDag-Erling Smørgrav.Pp
778f388f5efSDag-Erling SmørgravNote that disabling X11 forwarding does not prevent users from
779f388f5efSDag-Erling Smørgravforwarding X11 traffic, as users can always install their own forwarders.
780545d5ecaSDag-Erling SmørgravX11 forwarding is automatically disabled if
781545d5ecaSDag-Erling Smørgrav.Cm UseLogin
782545d5ecaSDag-Erling Smørgravis enabled.
783545d5ecaSDag-Erling Smørgrav.It Cm X11UseLocalhost
784545d5ecaSDag-Erling SmørgravSpecifies whether
785545d5ecaSDag-Erling Smørgrav.Nm sshd
786545d5ecaSDag-Erling Smørgravshould bind the X11 forwarding server to the loopback address or to
787e73e9afaSDag-Erling Smørgravthe wildcard address.
788e73e9afaSDag-Erling SmørgravBy default,
789545d5ecaSDag-Erling Smørgrav.Nm sshd
790545d5ecaSDag-Erling Smørgravbinds the forwarding server to the loopback address and sets the
791545d5ecaSDag-Erling Smørgravhostname part of the
792545d5ecaSDag-Erling Smørgrav.Ev DISPLAY
793545d5ecaSDag-Erling Smørgravenvironment variable to
794545d5ecaSDag-Erling Smørgrav.Dq localhost .
795f388f5efSDag-Erling SmørgravThis prevents remote hosts from connecting to the proxy display.
796545d5ecaSDag-Erling SmørgravHowever, some older X11 clients may not function with this
797545d5ecaSDag-Erling Smørgravconfiguration.
798545d5ecaSDag-Erling Smørgrav.Cm X11UseLocalhost
799545d5ecaSDag-Erling Smørgravmay be set to
800545d5ecaSDag-Erling Smørgrav.Dq no
801545d5ecaSDag-Erling Smørgravto specify that the forwarding server should be bound to the wildcard
802545d5ecaSDag-Erling Smørgravaddress.
803545d5ecaSDag-Erling SmørgravThe argument must be
804545d5ecaSDag-Erling Smørgrav.Dq yes
805545d5ecaSDag-Erling Smørgravor
806545d5ecaSDag-Erling Smørgrav.Dq no .
807545d5ecaSDag-Erling SmørgravThe default is
808545d5ecaSDag-Erling Smørgrav.Dq yes .
809545d5ecaSDag-Erling Smørgrav.It Cm XAuthLocation
810f388f5efSDag-Erling SmørgravSpecifies the full pathname of the
811545d5ecaSDag-Erling Smørgrav.Xr xauth 1
812545d5ecaSDag-Erling Smørgravprogram.
813545d5ecaSDag-Erling SmørgravThe default is
814545d5ecaSDag-Erling Smørgrav.Pa /usr/X11R6/bin/xauth .
815545d5ecaSDag-Erling Smørgrav.El
816545d5ecaSDag-Erling Smørgrav.Ss Time Formats
817545d5ecaSDag-Erling Smørgrav.Nm sshd
818545d5ecaSDag-Erling Smørgravcommand-line arguments and configuration file options that specify time
819545d5ecaSDag-Erling Smørgravmay be expressed using a sequence of the form:
820545d5ecaSDag-Erling Smørgrav.Sm off
821f388f5efSDag-Erling Smørgrav.Ar time Op Ar qualifier ,
822545d5ecaSDag-Erling Smørgrav.Sm on
823545d5ecaSDag-Erling Smørgravwhere
824545d5ecaSDag-Erling Smørgrav.Ar time
825545d5ecaSDag-Erling Smørgravis a positive integer value and
826545d5ecaSDag-Erling Smørgrav.Ar qualifier
827545d5ecaSDag-Erling Smørgravis one of the following:
828545d5ecaSDag-Erling Smørgrav.Pp
829545d5ecaSDag-Erling Smørgrav.Bl -tag -width Ds -compact -offset indent
830545d5ecaSDag-Erling Smørgrav.It Cm <none>
831545d5ecaSDag-Erling Smørgravseconds
832545d5ecaSDag-Erling Smørgrav.It Cm s | Cm S
833545d5ecaSDag-Erling Smørgravseconds
834545d5ecaSDag-Erling Smørgrav.It Cm m | Cm M
835545d5ecaSDag-Erling Smørgravminutes
836545d5ecaSDag-Erling Smørgrav.It Cm h | Cm H
837545d5ecaSDag-Erling Smørgravhours
838545d5ecaSDag-Erling Smørgrav.It Cm d | Cm D
839545d5ecaSDag-Erling Smørgravdays
840545d5ecaSDag-Erling Smørgrav.It Cm w | Cm W
841545d5ecaSDag-Erling Smørgravweeks
842545d5ecaSDag-Erling Smørgrav.El
843545d5ecaSDag-Erling Smørgrav.Pp
844545d5ecaSDag-Erling SmørgravEach member of the sequence is added together to calculate
845545d5ecaSDag-Erling Smørgravthe total time value.
846545d5ecaSDag-Erling Smørgrav.Pp
847545d5ecaSDag-Erling SmørgravTime format examples:
848545d5ecaSDag-Erling Smørgrav.Pp
849545d5ecaSDag-Erling Smørgrav.Bl -tag -width Ds -compact -offset indent
850545d5ecaSDag-Erling Smørgrav.It 600
851545d5ecaSDag-Erling Smørgrav600 seconds (10 minutes)
852545d5ecaSDag-Erling Smørgrav.It 10m
853545d5ecaSDag-Erling Smørgrav10 minutes
854545d5ecaSDag-Erling Smørgrav.It 1h30m
855545d5ecaSDag-Erling Smørgrav1 hour 30 minutes (90 minutes)
856545d5ecaSDag-Erling Smørgrav.El
857545d5ecaSDag-Erling Smørgrav.Sh FILES
858545d5ecaSDag-Erling Smørgrav.Bl -tag -width Ds
859545d5ecaSDag-Erling Smørgrav.It Pa /etc/ssh/sshd_config
860545d5ecaSDag-Erling SmørgravContains configuration data for
861545d5ecaSDag-Erling Smørgrav.Nm sshd .
862545d5ecaSDag-Erling SmørgravThis file should be writable by root only, but it is recommended
863545d5ecaSDag-Erling Smørgrav(though not necessary) that it be world-readable.
864545d5ecaSDag-Erling Smørgrav.El
865cf2b5f3bSDag-Erling Smørgrav.Sh SEE ALSO
866cf2b5f3bSDag-Erling Smørgrav.Xr sshd 8
867545d5ecaSDag-Erling Smørgrav.Sh AUTHORS
868545d5ecaSDag-Erling SmørgravOpenSSH is a derivative of the original and free
869545d5ecaSDag-Erling Smørgravssh 1.2.12 release by Tatu Ylonen.
870545d5ecaSDag-Erling SmørgravAaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
871545d5ecaSDag-Erling SmørgravTheo de Raadt and Dug Song
872545d5ecaSDag-Erling Smørgravremoved many bugs, re-added newer features and
873545d5ecaSDag-Erling Smørgravcreated OpenSSH.
874545d5ecaSDag-Erling SmørgravMarkus Friedl contributed the support for SSH
875545d5ecaSDag-Erling Smørgravprotocol versions 1.5 and 2.0.
876545d5ecaSDag-Erling SmørgravNiels Provos and Markus Friedl contributed support
877545d5ecaSDag-Erling Smørgravfor privilege separation.
878