]>
Commit | Line | Data |
---|---|---|
588df31a | 1 | .\" -*- nroff -*- |
2 | .\" | |
3 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> | |
4 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | |
5 | .\" All rights reserved | |
6 | .\" | |
7 | .\" As far as I am concerned, the code I have written for this software | |
8 | .\" can be used freely for any purpose. Any derived versions of this | |
9 | .\" software must be clearly marked as such, and if the derived work is | |
10 | .\" incompatible with the protocol description in the RFC file, it must be | |
11 | .\" called by a name other than "ssh" or "Secure Shell". | |
12 | .\" | |
13 | .\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. | |
14 | .\" Copyright (c) 1999 Aaron Campbell. All rights reserved. | |
15 | .\" Copyright (c) 1999 Theo de Raadt. All rights reserved. | |
16 | .\" | |
17 | .\" Redistribution and use in source and binary forms, with or without | |
18 | .\" modification, are permitted provided that the following conditions | |
19 | .\" are met: | |
20 | .\" 1. Redistributions of source code must retain the above copyright | |
21 | .\" notice, this list of conditions and the following disclaimer. | |
22 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
23 | .\" notice, this list of conditions and the following disclaimer in the | |
24 | .\" documentation and/or other materials provided with the distribution. | |
25 | .\" | |
26 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
27 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
28 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
29 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
30 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
31 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
32 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
33 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
36 | .\" | |
ac1ec4d8 | 37 | .\" $OpenBSD: sshd_config.5,v 1.49 2006/02/24 10:33:54 jmc Exp $ |
588df31a | 38 | .Dd September 25, 1999 |
39 | .Dt SSHD_CONFIG 5 | |
40 | .Os | |
41 | .Sh NAME | |
42 | .Nm sshd_config | |
43 | .Nd OpenSSH SSH daemon configuration file | |
44 | .Sh SYNOPSIS | |
45 | .Bl -tag -width Ds -compact | |
46 | .It Pa /etc/ssh/sshd_config | |
47 | .El | |
48 | .Sh DESCRIPTION | |
49 | .Nm sshd | |
50 | reads configuration data from | |
51 | .Pa /etc/ssh/sshd_config | |
52 | (or the file specified with | |
53 | .Fl f | |
54 | on the command line). | |
55 | The file contains keyword-argument pairs, one per line. | |
56 | Lines starting with | |
57 | .Ql # | |
58 | and empty lines are interpreted as comments. | |
59 | .Pp | |
60 | The possible | |
61 | keywords and their meanings are as follows (note that | |
62 | keywords are case-insensitive and arguments are case-sensitive): | |
63 | .Bl -tag -width Ds | |
61a2c1da | 64 | .It Cm AcceptEnv |
65 | Specifies what environment variables sent by the client will be copied into | |
66 | the session's | |
67 | .Xr environ 7 . | |
68 | See | |
69 | .Cm SendEnv | |
70 | in | |
71 | .Xr ssh_config 5 | |
72 | for how to configure the client. | |
b8b9f2e6 | 73 | Note that environment passing is only supported for protocol 2. |
61a2c1da | 74 | Variables are specified by name, which may contain the wildcard characters |
75 | .Ql \&* | |
76 | and | |
77 | .Ql \&? . | |
b8b9f2e6 | 78 | Multiple environment variables may be separated by whitespace or spread |
61a2c1da | 79 | across multiple |
80 | .Cm AcceptEnv | |
81 | directives. | |
b8b9f2e6 | 82 | Be warned that some environment variables could be used to bypass restricted |
61a2c1da | 83 | user environments. |
84 | For this reason, care should be taken in the use of this directive. | |
85 | The default is not to accept any environment variables. | |
31b41ceb | 86 | .It Cm AddressFamily |
87 | Specifies which address family should be used by | |
88 | .Nm sshd . | |
89 | Valid arguments are | |
90 | .Dq any , | |
91 | .Dq inet | |
92 | (use IPv4 only) or | |
93 | .Dq inet6 | |
94 | (use IPv6 only). | |
95 | The default is | |
96 | .Dq any . | |
588df31a | 97 | .It Cm AllowGroups |
98 | This keyword can be followed by a list of group name patterns, separated | |
99 | by spaces. | |
100 | If specified, login is allowed only for users whose primary | |
101 | group or supplementary group list matches one of the patterns. | |
588df31a | 102 | Only group names are valid; a numerical group ID is not recognized. |
103 | By default, login is allowed for all groups. | |
ac1ec4d8 | 104 | .Pp |
105 | See | |
106 | .Sx PATTERNS | |
107 | in | |
108 | .Xr ssh_config 5 | |
109 | for more information on patterns. | |
588df31a | 110 | .It Cm AllowTcpForwarding |
111 | Specifies whether TCP forwarding is permitted. | |
112 | The default is | |
113 | .Dq yes . | |
114 | Note that disabling TCP forwarding does not improve security unless | |
115 | users are also denied shell access, as they can always install their | |
116 | own forwarders. | |
588df31a | 117 | .It Cm AllowUsers |
118 | This keyword can be followed by a list of user name patterns, separated | |
119 | by spaces. | |
1be697b6 | 120 | If specified, login is allowed only for user names that |
588df31a | 121 | match one of the patterns. |
588df31a | 122 | Only user names are valid; a numerical user ID is not recognized. |
123 | By default, login is allowed for all users. | |
124 | If the pattern takes the form USER@HOST then USER and HOST | |
125 | are separately checked, restricting logins to particular | |
126 | users from particular hosts. | |
ac1ec4d8 | 127 | .Pp |
128 | See | |
129 | .Sx PATTERNS | |
130 | in | |
131 | .Xr ssh_config 5 | |
132 | for more information on patterns. | |
588df31a | 133 | .It Cm AuthorizedKeysFile |
134 | Specifies the file that contains the public keys that can be used | |
135 | for user authentication. | |
136 | .Cm AuthorizedKeysFile | |
137 | may contain tokens of the form %T which are substituted during connection | |
3cbc677d | 138 | set-up. |
139 | The following tokens are defined: %% is replaced by a literal '%', | |
588df31a | 140 | %h is replaced by the home directory of the user being authenticated and |
141 | %u is replaced by the username of that user. | |
142 | After expansion, | |
143 | .Cm AuthorizedKeysFile | |
144 | is taken to be an absolute path or one relative to the user's home | |
145 | directory. | |
146 | The default is | |
147 | .Dq .ssh/authorized_keys . | |
148 | .It Cm Banner | |
149 | In some jurisdictions, sending a warning message before authentication | |
150 | may be relevant for getting legal protection. | |
151 | The contents of the specified file are sent to the remote user before | |
152 | authentication is allowed. | |
153 | This option is only available for protocol version 2. | |
154 | By default, no banner is displayed. | |
588df31a | 155 | .It Cm ChallengeResponseAuthentication |
156 | Specifies whether challenge response authentication is allowed. | |
157 | All authentication styles from | |
158 | .Xr login.conf 5 | |
159 | are supported. | |
160 | The default is | |
161 | .Dq yes . | |
162 | .It Cm Ciphers | |
163 | Specifies the ciphers allowed for protocol version 2. | |
164 | Multiple ciphers must be comma-separated. | |
3b9baa7b | 165 | The supported ciphers are |
166 | .Dq 3des-cbc , | |
167 | .Dq aes128-cbc , | |
168 | .Dq aes192-cbc , | |
169 | .Dq aes256-cbc , | |
170 | .Dq aes128-ctr , | |
171 | .Dq aes192-ctr , | |
172 | .Dq aes256-ctr , | |
74a66cc8 | 173 | .Dq arcfour128 , |
174 | .Dq arcfour256 , | |
3b9baa7b | 175 | .Dq arcfour , |
176 | .Dq blowfish-cbc , | |
177 | and | |
178 | .Dq cast128-cbc . | |
588df31a | 179 | The default is |
588df31a | 180 | .Bd -literal |
74a66cc8 | 181 | ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, |
182 | arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, | |
183 | aes192-ctr,aes256-ctr'' | |
588df31a | 184 | .Ed |
588df31a | 185 | .It Cm ClientAliveCountMax |
79e46360 | 186 | Sets the number of client alive messages (see below) which may be |
588df31a | 187 | sent without |
188 | .Nm sshd | |
3cbc677d | 189 | receiving any messages back from the client. |
190 | If this threshold is reached while client alive messages are being sent, | |
588df31a | 191 | .Nm sshd |
3cbc677d | 192 | will disconnect the client, terminating the session. |
193 | It is important to note that the use of client alive messages is very | |
194 | different from | |
fd573618 | 195 | .Cm TCPKeepAlive |
3cbc677d | 196 | (below). |
197 | The client alive messages are sent through the encrypted channel | |
198 | and therefore will not be spoofable. | |
199 | The TCP keepalive option enabled by | |
fd573618 | 200 | .Cm TCPKeepAlive |
3cbc677d | 201 | is spoofable. |
202 | The client alive mechanism is valuable when the client or | |
588df31a | 203 | server depend on knowing when a connection has become inactive. |
204 | .Pp | |
3cbc677d | 205 | The default value is 3. |
206 | If | |
588df31a | 207 | .Cm ClientAliveInterval |
79e46360 | 208 | (see below) is set to 15, and |
588df31a | 209 | .Cm ClientAliveCountMax |
210 | is left at the default, unresponsive ssh clients | |
211 | will be disconnected after approximately 45 seconds. | |
2264526c | 212 | .It Cm ClientAliveInterval |
213 | Sets a timeout interval in seconds after which if no data has been received | |
214 | from the client, | |
215 | .Nm sshd | |
216 | will send a message through the encrypted | |
217 | channel to request a response from the client. | |
218 | The default | |
219 | is 0, indicating that these messages will not be sent to the client. | |
220 | This option applies to protocol version 2 only. | |
588df31a | 221 | .It Cm Compression |
07200973 | 222 | Specifies whether compression is allowed, or delayed until |
223 | the user has authenticated successfully. | |
588df31a | 224 | The argument must be |
07200973 | 225 | .Dq yes , |
226 | .Dq delayed , | |
588df31a | 227 | or |
228 | .Dq no . | |
229 | The default is | |
07200973 | 230 | .Dq delayed . |
588df31a | 231 | .It Cm DenyGroups |
232 | This keyword can be followed by a list of group name patterns, separated | |
233 | by spaces. | |
234 | Login is disallowed for users whose primary group or supplementary | |
235 | group list matches one of the patterns. | |
588df31a | 236 | Only group names are valid; a numerical group ID is not recognized. |
237 | By default, login is allowed for all groups. | |
ac1ec4d8 | 238 | .Pp |
239 | See | |
240 | .Sx PATTERNS | |
241 | in | |
242 | .Xr ssh_config 5 | |
243 | for more information on patterns. | |
588df31a | 244 | .It Cm DenyUsers |
245 | This keyword can be followed by a list of user name patterns, separated | |
246 | by spaces. | |
247 | Login is disallowed for user names that match one of the patterns. | |
588df31a | 248 | Only user names are valid; a numerical user ID is not recognized. |
249 | By default, login is allowed for all users. | |
250 | If the pattern takes the form USER@HOST then USER and HOST | |
251 | are separately checked, restricting logins to particular | |
252 | users from particular hosts. | |
ac1ec4d8 | 253 | .Pp |
254 | See | |
255 | .Sx PATTERNS | |
256 | in | |
257 | .Xr ssh_config 5 | |
258 | for more information on patterns. | |
588df31a | 259 | .It Cm GatewayPorts |
260 | Specifies whether remote hosts are allowed to connect to ports | |
261 | forwarded for the client. | |
262 | By default, | |
263 | .Nm sshd | |
a4e5acef | 264 | binds remote port forwardings to the loopback address. |
265 | This prevents other remote hosts from connecting to forwarded ports. | |
588df31a | 266 | .Cm GatewayPorts |
267 | can be used to specify that | |
268 | .Nm sshd | |
3867aa0a | 269 | should allow remote port forwardings to bind to non-loopback addresses, thus |
270 | allowing other hosts to connect. | |
271 | The argument may be | |
272 | .Dq no | |
273 | to force remote port forwardings to be available to the local host only, | |
588df31a | 274 | .Dq yes |
3867aa0a | 275 | to force remote port forwardings to bind to the wildcard address, or |
276 | .Dq clientspecified | |
277 | to allow the client to select the address to which the forwarding is bound. | |
588df31a | 278 | The default is |
279 | .Dq no . | |
7364bd04 | 280 | .It Cm GSSAPIAuthentication |
105b07db | 281 | Specifies whether user authentication based on GSSAPI is allowed. |
aff51935 | 282 | The default is |
7364bd04 | 283 | .Dq no . |
284 | Note that this option applies to protocol version 2 only. | |
285 | .It Cm GSSAPICleanupCredentials | |
286 | Specifies whether to automatically destroy the user's credentials cache | |
287 | on logout. | |
288 | The default is | |
289 | .Dq yes . | |
290 | Note that this option applies to protocol version 2 only. | |
588df31a | 291 | .It Cm HostbasedAuthentication |
292 | Specifies whether rhosts or /etc/hosts.equiv authentication together | |
293 | with successful public key client host authentication is allowed | |
294 | (hostbased authentication). | |
295 | This option is similar to | |
296 | .Cm RhostsRSAAuthentication | |
297 | and applies to protocol version 2 only. | |
298 | The default is | |
299 | .Dq no . | |
300 | .It Cm HostKey | |
301 | Specifies a file containing a private host key | |
302 | used by SSH. | |
303 | The default is | |
304 | .Pa /etc/ssh/ssh_host_key | |
305 | for protocol version 1, and | |
306 | .Pa /etc/ssh/ssh_host_rsa_key | |
307 | and | |
308 | .Pa /etc/ssh/ssh_host_dsa_key | |
309 | for protocol version 2. | |
310 | Note that | |
311 | .Nm sshd | |
312 | will refuse to use a file if it is group/world-accessible. | |
313 | It is possible to have multiple host key files. | |
314 | .Dq rsa1 | |
315 | keys are used for version 1 and | |
316 | .Dq dsa | |
317 | or | |
318 | .Dq rsa | |
319 | are used for version 2 of the SSH protocol. | |
320 | .It Cm IgnoreRhosts | |
321 | Specifies that | |
322 | .Pa .rhosts | |
323 | and | |
324 | .Pa .shosts | |
325 | files will not be used in | |
588df31a | 326 | .Cm RhostsRSAAuthentication |
327 | or | |
328 | .Cm HostbasedAuthentication . | |
329 | .Pp | |
330 | .Pa /etc/hosts.equiv | |
331 | and | |
332 | .Pa /etc/shosts.equiv | |
333 | are still used. | |
334 | The default is | |
335 | .Dq yes . | |
336 | .It Cm IgnoreUserKnownHosts | |
337 | Specifies whether | |
338 | .Nm sshd | |
339 | should ignore the user's | |
140e3e97 | 340 | .Pa ~/.ssh/known_hosts |
588df31a | 341 | during |
342 | .Cm RhostsRSAAuthentication | |
343 | or | |
344 | .Cm HostbasedAuthentication . | |
345 | The default is | |
346 | .Dq no . | |
588df31a | 347 | .It Cm KerberosAuthentication |
8f73f7bb | 348 | Specifies whether the password provided by the user for |
588df31a | 349 | .Cm PasswordAuthentication |
8f73f7bb | 350 | will be validated through the Kerberos KDC. |
588df31a | 351 | To use this option, the server needs a |
352 | Kerberos servtab which allows the verification of the KDC's identity. | |
353 | Default is | |
354 | .Dq no . | |
24f37810 | 355 | .It Cm KerberosGetAFSToken |
0d3d1077 | 356 | If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire |
24f37810 | 357 | an AFS token before accessing the user's home directory. |
358 | Default is | |
359 | .Dq no . | |
588df31a | 360 | .It Cm KerberosOrLocalPasswd |
361 | If set then if password authentication through Kerberos fails then | |
362 | the password will be validated via any additional local mechanism | |
363 | such as | |
364 | .Pa /etc/passwd . | |
365 | Default is | |
366 | .Dq yes . | |
588df31a | 367 | .It Cm KerberosTicketCleanup |
368 | Specifies whether to automatically destroy the user's ticket cache | |
369 | file on logout. | |
370 | Default is | |
371 | .Dq yes . | |
372 | .It Cm KeyRegenerationInterval | |
373 | In protocol version 1, the ephemeral server key is automatically regenerated | |
374 | after this many seconds (if it has been used). | |
375 | The purpose of regeneration is to prevent | |
376 | decrypting captured sessions by later breaking into the machine and | |
377 | stealing the keys. | |
378 | The key is never stored anywhere. | |
379 | If the value is 0, the key is never regenerated. | |
380 | The default is 3600 (seconds). | |
381 | .It Cm ListenAddress | |
382 | Specifies the local addresses | |
383 | .Nm sshd | |
384 | should listen on. | |
385 | The following forms may be used: | |
386 | .Pp | |
387 | .Bl -item -offset indent -compact | |
388 | .It | |
389 | .Cm ListenAddress | |
390 | .Sm off | |
391 | .Ar host No | Ar IPv4_addr No | Ar IPv6_addr | |
392 | .Sm on | |
393 | .It | |
394 | .Cm ListenAddress | |
395 | .Sm off | |
396 | .Ar host No | Ar IPv4_addr No : Ar port | |
397 | .Sm on | |
398 | .It | |
399 | .Cm ListenAddress | |
400 | .Sm off | |
401 | .Oo | |
402 | .Ar host No | Ar IPv6_addr Oc : Ar port | |
403 | .Sm on | |
404 | .El | |
405 | .Pp | |
406 | If | |
407 | .Ar port | |
408 | is not specified, | |
409 | .Nm sshd | |
410 | will listen on the address and all prior | |
411 | .Cm Port | |
3cbc677d | 412 | options specified. |
413 | The default is to listen on all local addresses. | |
a4e5acef | 414 | Multiple |
588df31a | 415 | .Cm ListenAddress |
3cbc677d | 416 | options are permitted. |
417 | Additionally, any | |
588df31a | 418 | .Cm Port |
419 | options must precede this option for non port qualified addresses. | |
420 | .It Cm LoginGraceTime | |
421 | The server disconnects after this time if the user has not | |
422 | successfully logged in. | |
423 | If the value is 0, there is no time limit. | |
3445ca02 | 424 | The default is 120 seconds. |
588df31a | 425 | .It Cm LogLevel |
426 | Gives the verbosity level that is used when logging messages from | |
427 | .Nm sshd . | |
428 | The possible values are: | |
429 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. | |
a4e5acef | 430 | The default is INFO. |
431 | DEBUG and DEBUG1 are equivalent. | |
432 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. | |
433 | Logging with a DEBUG level violates the privacy of users and is not recommended. | |
588df31a | 434 | .It Cm MACs |
435 | Specifies the available MAC (message authentication code) algorithms. | |
436 | The MAC algorithm is used in protocol version 2 | |
437 | for data integrity protection. | |
438 | Multiple algorithms must be comma-separated. | |
439 | The default is | |
440 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . | |
af4bd935 | 441 | .It Cm MaxAuthTries |
442 | Specifies the maximum number of authentication attempts permitted per | |
8fca654b | 443 | connection. |
444 | Once the number of failures reaches half this value, | |
445 | additional failures are logged. | |
446 | The default is 6. | |
588df31a | 447 | .It Cm MaxStartups |
448 | Specifies the maximum number of concurrent unauthenticated connections to the | |
449 | .Nm sshd | |
450 | daemon. | |
451 | Additional connections will be dropped until authentication succeeds or the | |
452 | .Cm LoginGraceTime | |
453 | expires for a connection. | |
454 | The default is 10. | |
455 | .Pp | |
456 | Alternatively, random early drop can be enabled by specifying | |
457 | the three colon separated values | |
458 | .Dq start:rate:full | |
459 | (e.g., "10:30:60"). | |
460 | .Nm sshd | |
461 | will refuse connection attempts with a probability of | |
462 | .Dq rate/100 | |
463 | (30%) | |
464 | if there are currently | |
465 | .Dq start | |
466 | (10) | |
467 | unauthenticated connections. | |
468 | The probability increases linearly and all connection attempts | |
469 | are refused if the number of unauthenticated connections reaches | |
470 | .Dq full | |
471 | (60). | |
472 | .It Cm PasswordAuthentication | |
473 | Specifies whether password authentication is allowed. | |
474 | The default is | |
475 | .Dq yes . | |
476 | .It Cm PermitEmptyPasswords | |
477 | When password authentication is allowed, it specifies whether the | |
478 | server allows login to accounts with empty password strings. | |
479 | The default is | |
480 | .Dq no . | |
481 | .It Cm PermitRootLogin | |
667e4135 | 482 | Specifies whether root can log in using |
588df31a | 483 | .Xr ssh 1 . |
484 | The argument must be | |
485 | .Dq yes , | |
486 | .Dq without-password , | |
487 | .Dq forced-commands-only | |
488 | or | |
489 | .Dq no . | |
490 | The default is | |
491 | .Dq yes . | |
492 | .Pp | |
493 | If this option is set to | |
494 | .Dq without-password | |
8a4c4ee4 | 495 | password authentication is disabled for root. |
588df31a | 496 | .Pp |
497 | If this option is set to | |
498 | .Dq forced-commands-only | |
499 | root login with public key authentication will be allowed, | |
500 | but only if the | |
501 | .Ar command | |
502 | option has been specified | |
503 | (which may be useful for taking remote backups even if root login is | |
3cbc677d | 504 | normally not allowed). |
505 | All other authentication methods are disabled for root. | |
588df31a | 506 | .Pp |
507 | If this option is set to | |
508 | .Dq no | |
667e4135 | 509 | root is not allowed to log in. |
d20f3c9e | 510 | .It Cm PermitTunnel |
511 | Specifies whether | |
512 | .Xr tun 4 | |
513 | device forwarding is allowed. | |
a4f24bf8 | 514 | The argument must be |
515 | .Dq yes , | |
516 | .Dq point-to-point , | |
517 | .Dq ethernet | |
518 | or | |
519 | .Dq no . | |
d20f3c9e | 520 | The default is |
521 | .Dq no . | |
f00bab84 | 522 | .It Cm PermitUserEnvironment |
523 | Specifies whether | |
524 | .Pa ~/.ssh/environment | |
35453849 | 525 | and |
f00bab84 | 526 | .Cm environment= |
527 | options in | |
528 | .Pa ~/.ssh/authorized_keys | |
35453849 | 529 | are processed by |
530 | .Nm sshd . | |
f00bab84 | 531 | The default is |
532 | .Dq no . | |
35453849 | 533 | Enabling environment processing may enable users to bypass access |
534 | restrictions in some configurations using mechanisms such as | |
535 | .Ev LD_PRELOAD . | |
588df31a | 536 | .It Cm PidFile |
baa08b92 | 537 | Specifies the file that contains the process ID of the |
588df31a | 538 | .Nm sshd |
539 | daemon. | |
540 | The default is | |
541 | .Pa /var/run/sshd.pid . | |
542 | .It Cm Port | |
543 | Specifies the port number that | |
544 | .Nm sshd | |
545 | listens on. | |
546 | The default is 22. | |
547 | Multiple options of this type are permitted. | |
548 | See also | |
549 | .Cm ListenAddress . | |
550 | .It Cm PrintLastLog | |
551 | Specifies whether | |
552 | .Nm sshd | |
329a8666 | 553 | should print the date and time of the last user login when a user logs |
554 | in interactively. | |
588df31a | 555 | The default is |
556 | .Dq yes . | |
557 | .It Cm PrintMotd | |
558 | Specifies whether | |
559 | .Nm sshd | |
560 | should print | |
561 | .Pa /etc/motd | |
562 | when a user logs in interactively. | |
563 | (On some systems it is also printed by the shell, | |
564 | .Pa /etc/profile , | |
565 | or equivalent.) | |
566 | The default is | |
567 | .Dq yes . | |
568 | .It Cm Protocol | |
569 | Specifies the protocol versions | |
570 | .Nm sshd | |
94ad46d1 | 571 | supports. |
588df31a | 572 | The possible values are |
573 | .Dq 1 | |
574 | and | |
575 | .Dq 2 . | |
576 | Multiple versions must be comma-separated. | |
577 | The default is | |
578 | .Dq 2,1 . | |
94ad46d1 | 579 | Note that the order of the protocol list does not indicate preference, |
580 | because the client selects among multiple protocol versions offered | |
581 | by the server. | |
582 | Specifying | |
583 | .Dq 2,1 | |
584 | is identical to | |
585 | .Dq 1,2 . | |
588df31a | 586 | .It Cm PubkeyAuthentication |
587 | Specifies whether public key authentication is allowed. | |
588 | The default is | |
589 | .Dq yes . | |
590 | Note that this option applies to protocol version 2 only. | |
588df31a | 591 | .It Cm RhostsRSAAuthentication |
592 | Specifies whether rhosts or /etc/hosts.equiv authentication together | |
593 | with successful RSA host authentication is allowed. | |
594 | The default is | |
595 | .Dq no . | |
596 | This option applies to protocol version 1 only. | |
597 | .It Cm RSAAuthentication | |
598 | Specifies whether pure RSA authentication is allowed. | |
599 | The default is | |
600 | .Dq yes . | |
601 | This option applies to protocol version 1 only. | |
602 | .It Cm ServerKeyBits | |
603 | Defines the number of bits in the ephemeral protocol version 1 server key. | |
604 | The minimum value is 512, and the default is 768. | |
605 | .It Cm StrictModes | |
606 | Specifies whether | |
607 | .Nm sshd | |
608 | should check file modes and ownership of the | |
609 | user's files and home directory before accepting login. | |
610 | This is normally desirable because novices sometimes accidentally leave their | |
611 | directory or files world-writable. | |
612 | The default is | |
613 | .Dq yes . | |
614 | .It Cm Subsystem | |
615 | Configures an external subsystem (e.g., file transfer daemon). | |
616 | Arguments should be a subsystem name and a command to execute upon subsystem | |
617 | request. | |
618 | The command | |
619 | .Xr sftp-server 8 | |
620 | implements the | |
621 | .Dq sftp | |
622 | file transfer subsystem. | |
623 | By default no subsystems are defined. | |
624 | Note that this option applies to protocol version 2 only. | |
625 | .It Cm SyslogFacility | |
626 | Gives the facility code that is used when logging messages from | |
627 | .Nm sshd . | |
628 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, | |
629 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. | |
630 | The default is AUTH. | |
fd573618 | 631 | .It Cm TCPKeepAlive |
632 | Specifies whether the system should send TCP keepalive messages to the | |
633 | other side. | |
634 | If they are sent, death of the connection or crash of one | |
635 | of the machines will be properly noticed. | |
636 | However, this means that | |
637 | connections will die if the route is down temporarily, and some people | |
638 | find it annoying. | |
639 | On the other hand, if TCP keepalives are not sent, | |
640 | sessions may hang indefinitely on the server, leaving | |
641 | .Dq ghost | |
642 | users and consuming server resources. | |
643 | .Pp | |
644 | The default is | |
645 | .Dq yes | |
646 | (to send TCP keepalive messages), and the server will notice | |
647 | if the network goes down or the client host crashes. | |
648 | This avoids infinitely hanging sessions. | |
649 | .Pp | |
650 | To disable TCP keepalive messages, the value should be set to | |
651 | .Dq no . | |
c5a7d788 | 652 | .It Cm UseDNS |
653 | Specifies whether | |
654 | .Nm sshd | |
102c77c2 | 655 | should look up the remote host name and check that |
c5a7d788 | 656 | the resolved host name for the remote IP address maps back to the |
657 | very same IP address. | |
658 | The default is | |
659 | .Dq yes . | |
588df31a | 660 | .It Cm UseLogin |
661 | Specifies whether | |
662 | .Xr login 1 | |
663 | is used for interactive login sessions. | |
664 | The default is | |
665 | .Dq no . | |
666 | Note that | |
667 | .Xr login 1 | |
668 | is never used for remote command execution. | |
669 | Note also, that if this is enabled, | |
670 | .Cm X11Forwarding | |
671 | will be disabled because | |
672 | .Xr login 1 | |
673 | does not know how to handle | |
674 | .Xr xauth 1 | |
a4e5acef | 675 | cookies. |
676 | If | |
588df31a | 677 | .Cm UsePrivilegeSeparation |
678 | is specified, it will be disabled after authentication. | |
72c35df7 | 679 | .It Cm UsePAM |
d5c67850 | 680 | Enables the Pluggable Authentication Module interface. |
681 | If set to | |
682 | .Dq yes | |
683 | this will enable PAM authentication using | |
684 | .Cm ChallengeResponseAuthentication | |
05059810 | 685 | and |
686 | .Cm PasswordAuthentication | |
687 | in addition to PAM account and session module processing for all | |
688 | authentication types. | |
d5c67850 | 689 | .Pp |
690 | Because PAM challenge-response authentication usually serves an equivalent | |
691 | role to password authentication, you should disable either | |
692 | .Cm PasswordAuthentication | |
693 | or | |
694 | .Cm ChallengeResponseAuthentication. | |
695 | .Pp | |
696 | If | |
697 | .Cm UsePAM | |
698 | is enabled, you will not be able to run | |
699 | .Xr sshd 8 | |
700 | as a non-root user. | |
701 | The default is | |
a83a3125 | 702 | .Dq no . |
588df31a | 703 | .It Cm UsePrivilegeSeparation |
704 | Specifies whether | |
705 | .Nm sshd | |
706 | separates privileges by creating an unprivileged child process | |
a4e5acef | 707 | to deal with incoming network traffic. |
708 | After successful authentication, another process will be created that has | |
709 | the privilege of the authenticated user. | |
710 | The goal of privilege separation is to prevent privilege | |
588df31a | 711 | escalation by containing any corruption within the unprivileged processes. |
712 | The default is | |
713 | .Dq yes . | |
588df31a | 714 | .It Cm X11DisplayOffset |
715 | Specifies the first display number available for | |
716 | .Nm sshd Ns 's | |
717 | X11 forwarding. | |
718 | This prevents | |
719 | .Nm sshd | |
720 | from interfering with real X11 servers. | |
721 | The default is 10. | |
722 | .It Cm X11Forwarding | |
723 | Specifies whether X11 forwarding is permitted. | |
e6fe1bab | 724 | The argument must be |
725 | .Dq yes | |
726 | or | |
727 | .Dq no . | |
588df31a | 728 | The default is |
729 | .Dq no . | |
e6fe1bab | 730 | .Pp |
731 | When X11 forwarding is enabled, there may be additional exposure to | |
732 | the server and to client displays if the | |
733 | .Nm sshd | |
734 | proxy display is configured to listen on the wildcard address (see | |
735 | .Cm X11UseLocalhost | |
736 | below), however this is not the default. | |
737 | Additionally, the authentication spoofing and authentication data | |
738 | verification and substitution occur on the client side. | |
739 | The security risk of using X11 forwarding is that the client's X11 | |
740 | display server may be exposed to attack when the ssh client requests | |
741 | forwarding (see the warnings for | |
742 | .Cm ForwardX11 | |
743 | in | |
be193d89 | 744 | .Xr ssh_config 5 ) . |
e6fe1bab | 745 | A system administrator may have a stance in which they want to |
746 | protect clients that may expose themselves to attack by unwittingly | |
747 | requesting X11 forwarding, which can warrant a | |
748 | .Dq no | |
749 | setting. | |
750 | .Pp | |
751 | Note that disabling X11 forwarding does not prevent users from | |
752 | forwarding X11 traffic, as users can always install their own forwarders. | |
588df31a | 753 | X11 forwarding is automatically disabled if |
754 | .Cm UseLogin | |
755 | is enabled. | |
756 | .It Cm X11UseLocalhost | |
757 | Specifies whether | |
758 | .Nm sshd | |
759 | should bind the X11 forwarding server to the loopback address or to | |
a4e5acef | 760 | the wildcard address. |
761 | By default, | |
588df31a | 762 | .Nm sshd |
763 | binds the forwarding server to the loopback address and sets the | |
764 | hostname part of the | |
765 | .Ev DISPLAY | |
766 | environment variable to | |
767 | .Dq localhost . | |
b3641662 | 768 | This prevents remote hosts from connecting to the proxy display. |
588df31a | 769 | However, some older X11 clients may not function with this |
770 | configuration. | |
771 | .Cm X11UseLocalhost | |
772 | may be set to | |
773 | .Dq no | |
774 | to specify that the forwarding server should be bound to the wildcard | |
775 | address. | |
776 | The argument must be | |
777 | .Dq yes | |
778 | or | |
779 | .Dq no . | |
780 | The default is | |
781 | .Dq yes . | |
782 | .It Cm XAuthLocation | |
57ff5eeb | 783 | Specifies the full pathname of the |
588df31a | 784 | .Xr xauth 1 |
785 | program. | |
786 | The default is | |
787 | .Pa /usr/X11R6/bin/xauth . | |
788 | .El | |
789 | .Ss Time Formats | |
588df31a | 790 | .Nm sshd |
791 | command-line arguments and configuration file options that specify time | |
792 | may be expressed using a sequence of the form: | |
793 | .Sm off | |
36535ee6 | 794 | .Ar time Op Ar qualifier , |
588df31a | 795 | .Sm on |
796 | where | |
797 | .Ar time | |
798 | is a positive integer value and | |
799 | .Ar qualifier | |
800 | is one of the following: | |
801 | .Pp | |
802 | .Bl -tag -width Ds -compact -offset indent | |
803 | .It Cm <none> | |
804 | seconds | |
805 | .It Cm s | Cm S | |
806 | seconds | |
807 | .It Cm m | Cm M | |
808 | minutes | |
809 | .It Cm h | Cm H | |
810 | hours | |
811 | .It Cm d | Cm D | |
812 | days | |
813 | .It Cm w | Cm W | |
814 | weeks | |
815 | .El | |
816 | .Pp | |
817 | Each member of the sequence is added together to calculate | |
818 | the total time value. | |
819 | .Pp | |
820 | Time format examples: | |
821 | .Pp | |
822 | .Bl -tag -width Ds -compact -offset indent | |
823 | .It 600 | |
824 | 600 seconds (10 minutes) | |
825 | .It 10m | |
826 | 10 minutes | |
827 | .It 1h30m | |
828 | 1 hour 30 minutes (90 minutes) | |
829 | .El | |
830 | .Sh FILES | |
831 | .Bl -tag -width Ds | |
832 | .It Pa /etc/ssh/sshd_config | |
833 | Contains configuration data for | |
834 | .Nm sshd . | |
835 | This file should be writable by root only, but it is recommended | |
836 | (though not necessary) that it be world-readable. | |
837 | .El | |
be193d89 | 838 | .Sh SEE ALSO |
839 | .Xr sshd 8 | |
588df31a | 840 | .Sh AUTHORS |
841 | OpenSSH is a derivative of the original and free | |
842 | ssh 1.2.12 release by Tatu Ylonen. | |
843 | Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, | |
844 | Theo de Raadt and Dug Song | |
845 | removed many bugs, re-added newer features and | |
846 | created OpenSSH. | |
847 | Markus Friedl contributed the support for SSH | |
848 | protocol versions 1.5 and 2.0. | |
849 | Niels Provos and Markus Friedl contributed support | |
850 | for privilege separation. |