summaryrefslogtreecommitdiff
path: root/sshd_config.0
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2004-05-01 11:28:49 +0000
committerColin Watson <cjwatson@debian.org>2004-05-01 11:28:49 +0000
commit16f1d21ea191deaaeeba719d01c0ad82aa044653 (patch)
tree0e52caec9e5c0e1ad3494e62bd1bc1b776a738a0 /sshd_config.0
parentbd5f26f25dbbb93a9f9d3850c200a17a753ceee1 (diff)
parentf5bda272678ec6dccaa5f29379cf60cb855018e8 (diff)
Import OpenSSH 3.8.1p1.
Diffstat (limited to 'sshd_config.0')
-rw-r--r--sshd_config.0466
1 files changed, 466 insertions, 0 deletions
diff --git a/sshd_config.0 b/sshd_config.0
new file mode 100644
index 000000000..8a922666e
--- /dev/null
+++ b/sshd_config.0
@@ -0,0 +1,466 @@
1SSHD_CONFIG(5) OpenBSD Programmer's Manual SSHD_CONFIG(5)
2
3NAME
4 sshd_config - OpenSSH SSH daemon configuration file
5
6SYNOPSIS
7 /etc/ssh/sshd_config
8
9DESCRIPTION
10 sshd reads configuration data from /etc/ssh/sshd_config (or the file
11 specified with -f on the command line). The file contains keyword-argu-
12 ment pairs, one per line. Lines starting with `#' and empty lines are
13 interpreted as comments.
14
15 The possible keywords and their meanings are as follows (note that key-
16 words are case-insensitive and arguments are case-sensitive):
17
18 AllowGroups
19 This keyword can be followed by a list of group name patterns,
20 separated by spaces. If specified, login is allowed only for
21 users whose primary group or supplementary group list matches one
22 of the patterns. `*' and `?' can be used as wildcards in the
23 patterns. Only group names are valid; a numerical group ID is
24 not recognized. By default, login is allowed for all groups.
25
26 AllowTcpForwarding
27 Specifies whether TCP forwarding is permitted. The default is
28 ``yes''. Note that disabling TCP forwarding does not improve se-
29 curity unless users are also denied shell access, as they can al-
30 ways install their own forwarders.
31
32 AllowUsers
33 This keyword can be followed by a list of user name patterns,
34 separated by spaces. If specified, login is allowed only for us-
35 er names that match one of the patterns. `*' and `?' can be used
36 as wildcards in the patterns. Only user names are valid; a nu-
37 merical user ID is not recognized. By default, login is allowed
38 for all users. If the pattern takes the form USER@HOST then USER
39 and HOST are separately checked, restricting logins to particular
40 users from particular hosts.
41
42 AuthorizedKeysFile
43 Specifies the file that contains the public keys that can be used
44 for user authentication. AuthorizedKeysFile may contain tokens
45 of the form %T which are substituted during connection set-up.
46 The following tokens are defined: %% is replaced by a literal
47 '%', %h is replaced by the home directory of the user being au-
48 thenticated and %u is replaced by the username of that user. Af-
49 ter expansion, AuthorizedKeysFile is taken to be an absolute path
50 or one relative to the user's home directory. The default is
51 ``.ssh/authorized_keys''.
52
53 Banner In some jurisdictions, sending a warning message before authenti-
54 cation may be relevant for getting legal protection. The con-
55 tents of the specified file are sent to the remote user before
56 authentication is allowed. This option is only available for
57 protocol version 2. By default, no banner is displayed.
58
59 ChallengeResponseAuthentication
60 Specifies whether challenge response authentication is allowed.
61 All authentication styles from login.conf(5) are supported. The
62 default is ``yes''.
63
64 Ciphers
65 Specifies the ciphers allowed for protocol version 2. Multiple
66 ciphers must be comma-separated. The default is
67
68 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
69 aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr''
70
71 ClientAliveInterval
72 Sets a timeout interval in seconds after which if no data has
73 been received from the client, sshd will send a message through
74 the encrypted channel to request a response from the client. The
75 default is 0, indicating that these messages will not be sent to
76 the client. This option applies to protocol version 2 only.
77
78 ClientAliveCountMax
79 Sets the number of client alive messages (see above) which may be
80 sent without sshd receiving any messages back from the client.
81 If this threshold is reached while client alive messages are be-
82 ing sent, sshd will disconnect the client, terminating the ses-
83 sion. It is important to note that the use of client alive mes-
84 sages is very different from TCPKeepAlive (below). The client
85 alive messages are sent through the encrypted channel and there-
86 fore will not be spoofable. The TCP keepalive option enabled by
87 TCPKeepAlive is spoofable. The client alive mechanism is valu-
88 able when the client or server depend on knowing when a connec-
89 tion has become inactive.
90
91 The default value is 3. If ClientAliveInterval (above) is set to
92 15, and ClientAliveCountMax is left at the default, unresponsive
93 ssh clients will be disconnected after approximately 45 seconds.
94
95 Compression
96 Specifies whether compression is allowed. The argument must be
97 ``yes'' or ``no''. The default is ``yes''.
98
99 DenyGroups
100 This keyword can be followed by a list of group name patterns,
101 separated by spaces. Login is disallowed for users whose primary
102 group or supplementary group list matches one of the patterns.
103 `*' and `?' can be used as wildcards in the patterns. Only group
104 names are valid; a numerical group ID is not recognized. By de-
105 fault, login is allowed for all groups.
106
107 DenyUsers
108 This keyword can be followed by a list of user name patterns,
109 separated by spaces. Login is disallowed for user names that
110 match one of the patterns. `*' and `?' can be used as wildcards
111 in the patterns. Only user names are valid; a numerical user ID
112 is not recognized. By default, login is allowed for all users.
113 If the pattern takes the form USER@HOST then USER and HOST are
114 separately checked, restricting logins to particular users from
115 particular hosts.
116
117 GatewayPorts
118 Specifies whether remote hosts are allowed to connect to ports
119 forwarded for the client. By default, sshd binds remote port
120 forwardings to the loopback address. This prevents other remote
121 hosts from connecting to forwarded ports. GatewayPorts can be
122 used to specify that sshd should bind remote port forwardings to
123 the wildcard address, thus allowing remote hosts to connect to
124 forwarded ports. The argument must be ``yes'' or ``no''. The
125 default is ``no''.
126
127 GSSAPIAuthentication
128 Specifies whether user authentication based on GSSAPI is allowed.
129 The default is ``no''. Note that this option applies to protocol
130 version 2 only.
131
132 GSSAPICleanupCredentials
133 Specifies whether to automatically destroy the user's credentials
134 cache on logout. The default is ``yes''. Note that this option
135 applies to protocol version 2 only.
136
137 HostbasedAuthentication
138 Specifies whether rhosts or /etc/hosts.equiv authentication to-
139 gether with successful public key client host authentication is
140 allowed (hostbased authentication). This option is similar to
141 RhostsRSAAuthentication and applies to protocol version 2 only.
142 The default is ``no''.
143
144 HostKey
145 Specifies a file containing a private host key used by SSH. The
146 default is /etc/ssh/ssh_host_key for protocol version 1, and
147 /etc/ssh/ssh_host_rsa_key and /etc/ssh/ssh_host_dsa_key for pro-
148 tocol version 2. Note that sshd will refuse to use a file if it
149 is group/world-accessible. It is possible to have multiple host
150 key files. ``rsa1'' keys are used for version 1 and ``dsa'' or
151 ``rsa'' are used for version 2 of the SSH protocol.
152
153 IgnoreRhosts
154 Specifies that .rhosts and .shosts files will not be used in
155 RhostsRSAAuthentication or HostbasedAuthentication.
156
157 /etc/hosts.equiv and /etc/shosts.equiv are still used. The de-
158 fault is ``yes''.
159
160 IgnoreUserKnownHosts
161 Specifies whether sshd should ignore the user's
162 $HOME/.ssh/known_hosts during RhostsRSAAuthentication or
163 HostbasedAuthentication. The default is ``no''.
164
165 KerberosAuthentication
166 Specifies whether the password provided by the user for
167 PasswordAuthentication will be validated through the Kerberos
168 KDC. To use this option, the server needs a Kerberos servtab
169 which allows the verification of the KDC's identity. Default is
170 ``no''.
171
172 KerberosGetAFSToken
173 If AFS is active and the user has a Kerberos 5 TGT, attempt to
174 aquire an AFS token before accessing the user's home directory.
175 Default is ``no''.
176
177 KerberosOrLocalPasswd
178 If set then if password authentication through Kerberos fails
179 then the password will be validated via any additional local
180 mechanism such as /etc/passwd. Default is ``yes''.
181
182 KerberosTicketCleanup
183 Specifies whether to automatically destroy the user's ticket
184 cache file on logout. Default is ``yes''.
185
186 KeyRegenerationInterval
187 In protocol version 1, the ephemeral server key is automatically
188 regenerated after this many seconds (if it has been used). The
189 purpose of regeneration is to prevent decrypting captured ses-
190 sions by later breaking into the machine and stealing the keys.
191 The key is never stored anywhere. If the value is 0, the key is
192 never regenerated. The default is 3600 (seconds).
193
194 ListenAddress
195 Specifies the local addresses sshd should listen on. The follow-
196 ing forms may be used:
197
198 ListenAddress host|IPv4_addr|IPv6_addr
199 ListenAddress host|IPv4_addr:port
200 ListenAddress [host|IPv6_addr]:port
201
202 If port is not specified, sshd will listen on the address and all
203 prior Port options specified. The default is to listen on all
204 local addresses. Multiple ListenAddress options are permitted.
205 Additionally, any Port options must precede this option for non
206 port qualified addresses.
207
208 LoginGraceTime
209 The server disconnects after this time if the user has not suc-
210 cessfully logged in. If the value is 0, there is no time limit.
211 The default is 120 seconds.
212
213 LogLevel
214 Gives the verbosity level that is used when logging messages from
215 sshd. The possible values are: QUIET, FATAL, ERROR, INFO, VER-
216 BOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. The default is INFO.
217 DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify
218 higher levels of debugging output. Logging with a DEBUG level
219 violates the privacy of users and is not recommended.
220
221 MACs Specifies the available MAC (message authentication code) algo-
222 rithms. The MAC algorithm is used in protocol version 2 for data
223 integrity protection. Multiple algorithms must be comma-separat-
224 ed. The default is ``hmac-md5,hmac-sha1,hmac-ripemd160,hmac-
225 sha1-96,hmac-md5-96''.
226
227 MaxStartups
228 Specifies the maximum number of concurrent unauthenticated con-
229 nections to the sshd daemon. Additional connections will be
230 dropped until authentication succeeds or the LoginGraceTime ex-
231 pires for a connection. The default is 10.
232
233 Alternatively, random early drop can be enabled by specifying the
234 three colon separated values ``start:rate:full'' (e.g.,
235 "10:30:60"). sshd will refuse connection attempts with a proba-
236 bility of ``rate/100'' (30%) if there are currently ``start''
237 (10) unauthenticated connections. The probability increases lin-
238 early and all connection attempts are refused if the number of
239 unauthenticated connections reaches ``full'' (60).
240
241 PasswordAuthentication
242 Specifies whether password authentication is allowed. The de-
243 fault is ``yes''.
244
245 PermitEmptyPasswords
246 When password authentication is allowed, it specifies whether the
247 server allows login to accounts with empty password strings. The
248 default is ``no''.
249
250 PermitRootLogin
251 Specifies whether root can login using ssh(1). The argument must
252 be ``yes'', ``without-password'', ``forced-commands-only'' or
253 ``no''. The default is ``yes''.
254
255 If this option is set to ``without-password'' password authenti-
256 cation is disabled for root. Note that other authentication
257 methods (e.g., keyboard-interactive/PAM) may still allow root to
258 login using a password.
259
260 If this option is set to ``forced-commands-only'' root login with
261 public key authentication will be allowed, but only if the
262 command option has been specified (which may be useful for taking
263 remote backups even if root login is normally not allowed). All
264 other authentication methods are disabled for root.
265
266 If this option is set to ``no'' root is not allowed to login.
267
268 PermitUserEnvironment
269 Specifies whether ~/.ssh/environment and environment= options in
270 ~/.ssh/authorized_keys are processed by sshd. The default is
271 ``no''. Enabling environment processing may enable users to by-
272 pass access restrictions in some configurations using mechanisms
273 such as LD_PRELOAD.
274
275 PidFile
276 Specifies the file that contains the process ID of the sshd dae-
277 mon. The default is /var/run/sshd.pid.
278
279 Port Specifies the port number that sshd listens on. The default is
280 22. Multiple options of this type are permitted. See also
281 ListenAddress.
282
283 PrintLastLog
284 Specifies whether sshd should print the date and time when the
285 user last logged in. The default is ``yes''.
286
287 PrintMotd
288 Specifies whether sshd should print /etc/motd when a user logs in
289 interactively. (On some systems it is also printed by the shell,
290 /etc/profile, or equivalent.) The default is ``yes''.
291
292 Protocol
293 Specifies the protocol versions sshd supports. The possible val-
294 ues are ``1'' and ``2''. Multiple versions must be comma-sepa-
295 rated. The default is ``2,1''. Note that the order of the pro-
296 tocol list does not indicate preference, because the client se-
297 lects among multiple protocol versions offered by the server.
298 Specifying ``2,1'' is identical to ``1,2''.
299
300 PubkeyAuthentication
301 Specifies whether public key authentication is allowed. The de-
302 fault is ``yes''. Note that this option applies to protocol ver-
303 sion 2 only.
304
305 RhostsRSAAuthentication
306 Specifies whether rhosts or /etc/hosts.equiv authentication to-
307 gether with successful RSA host authentication is allowed. The
308 default is ``no''. This option applies to protocol version 1 on-
309 ly.
310
311 RSAAuthentication
312 Specifies whether pure RSA authentication is allowed. The de-
313 fault is ``yes''. This option applies to protocol version 1 on-
314 ly.
315
316 ServerKeyBits
317 Defines the number of bits in the ephemeral protocol version 1
318 server key. The minimum value is 512, and the default is 768.
319
320 StrictModes
321 Specifies whether sshd should check file modes and ownership of
322 the user's files and home directory before accepting login. This
323 is normally desirable because novices sometimes accidentally
324 leave their directory or files world-writable. The default is
325 ``yes''.
326
327 Subsystem
328 Configures an external subsystem (e.g., file transfer daemon).
329 Arguments should be a subsystem name and a command to execute up-
330 on subsystem request. The command sftp-server(8) implements the
331 ``sftp'' file transfer subsystem. By default no subsystems are
332 defined. Note that this option applies to protocol version 2 on-
333 ly.
334
335 SyslogFacility
336 Gives the facility code that is used when logging messages from
337 sshd. The possible values are: DAEMON, USER, AUTH, LOCAL0, LO-
338 CAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The de-
339 fault is AUTH.
340
341 TCPKeepAlive
342 Specifies whether the system should send TCP keepalive messages
343 to the other side. If they are sent, death of the connection or
344 crash of one of the machines will be properly noticed. However,
345 this means that connections will die if the route is down tem-
346 porarily, and some people find it annoying. On the other hand,
347 if TCP keepalives are not sent, sessions may hang indefinitely on
348 the server, leaving ``ghost'' users and consuming server re-
349 sources.
350
351 The default is ``yes'' (to send TCP keepalive messages), and the
352 server will notice if the network goes down or the client host
353 crashes. This avoids infinitely hanging sessions.
354
355 To disable TCP keepalive messages, the value should be set to
356 ``no''.
357
358 UseDNS Specifies whether sshd should lookup the remote host name and
359 check that the resolved host name for the remote IP address maps
360 back to the very same IP address. The default is ``yes''.
361
362 UseLogin
363 Specifies whether login(1) is used for interactive login ses-
364 sions. The default is ``no''. Note that login(1) is never used
365 for remote command execution. Note also, that if this is en-
366 abled, X11Forwarding will be disabled because login(1) does not
367 know how to handle xauth(1) cookies. If UsePrivilegeSeparation
368 is specified, it will be disabled after authentication.
369
370 UsePAM Enables PAM authentication (via challenge-response) and session
371 set up. If you enable this, you should probably disable
372 PasswordAuthentication. If you enable then you will not be able
373 to run sshd as a non-root user. The default is ``no''.
374
375 UsePrivilegeSeparation
376 Specifies whether sshd separates privileges by creating an un-
377 privileged child process to deal with incoming network traffic.
378 After successful authentication, another process will be created
379 that has the privilege of the authenticated user. The goal of
380 privilege separation is to prevent privilege escalation by con-
381 taining any corruption within the unprivileged processes. The
382 default is ``yes''.
383
384 X11DisplayOffset
385 Specifies the first display number available for sshd's X11 for-
386 warding. This prevents sshd from interfering with real X11
387 servers. The default is 10.
388
389 X11Forwarding
390 Specifies whether X11 forwarding is permitted. The argument must
391 be ``yes'' or ``no''. The default is ``no''.
392
393 When X11 forwarding is enabled, there may be additional exposure
394 to the server and to client displays if the sshd proxy display is
395 configured to listen on the wildcard address (see X11UseLocalhost
396 below), however this is not the default. Additionally, the au-
397 thentication spoofing and authentication data verification and
398 substitution occur on the client side. The security risk of us-
399 ing X11 forwarding is that the client's X11 display server may be
400 exposed to attack when the ssh client requests forwarding (see
401 the warnings for ForwardX11 in ssh_config(5)). A system adminis-
402 trator may have a stance in which they want to protect clients
403 that may expose themselves to attack by unwittingly requesting
404 X11 forwarding, which can warrant a ``no'' setting.
405
406 Note that disabling X11 forwarding does not prevent users from
407 forwarding X11 traffic, as users can always install their own
408 forwarders. X11 forwarding is automatically disabled if UseLogin
409 is enabled.
410
411 X11UseLocalhost
412 Specifies whether sshd should bind the X11 forwarding server to
413 the loopback address or to the wildcard address. By default,
414 sshd binds the forwarding server to the loopback address and sets
415 the hostname part of the DISPLAY environment variable to
416 ``localhost''. This prevents remote hosts from connecting to the
417 proxy display. However, some older X11 clients may not function
418 with this configuration. X11UseLocalhost may be set to ``no'' to
419 specify that the forwarding server should be bound to the wild-
420 card address. The argument must be ``yes'' or ``no''. The de-
421 fault is ``yes''.
422
423 XAuthLocation
424 Specifies the full pathname of the xauth(1) program. The default
425 is /usr/X11R6/bin/xauth.
426
427 Time Formats
428 sshd command-line arguments and configuration file options that specify
429 time may be expressed using a sequence of the form: time[qualifier],
430 where time is a positive integer value and qualifier is one of the fol-
431 lowing:
432
433 <none> seconds
434 s | S seconds
435 m | M minutes
436 h | H hours
437 d | D days
438 w | W weeks
439
440 Each member of the sequence is added together to calculate the total time
441 value.
442
443 Time format examples:
444
445 600 600 seconds (10 minutes)
446 10m 10 minutes
447 1h30m 1 hour 30 minutes (90 minutes)
448
449FILES
450 /etc/ssh/sshd_config
451 Contains configuration data for sshd. This file should be
452 writable by root only, but it is recommended (though not neces-
453 sary) that it be world-readable.
454
455SEE ALSO
456 sshd(8)
457
458AUTHORS
459 OpenSSH is a derivative of the original and free ssh 1.2.12 release by
460 Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
461 de Raadt and Dug Song removed many bugs, re-added newer features and cre-
462 ated OpenSSH. Markus Friedl contributed the support for SSH protocol
463 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
464 for privilege separation.
465
466OpenBSD 3.5 September 25, 1999 8