diff options
Diffstat (limited to 'sshd_config.5')
-rw-r--r-- | sshd_config.5 | 340 |
1 files changed, 241 insertions, 99 deletions
diff --git a/sshd_config.5 b/sshd_config.5 index 841cb29d3..ce9888d03 100644 --- a/sshd_config.5 +++ b/sshd_config.5 | |||
@@ -34,7 +34,7 @@ | |||
34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 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. | 35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
36 | .\" | 36 | .\" |
37 | .\" $OpenBSD: sshd_config.5,v 1.48 2006/01/02 17:09:49 jmc Exp $ | 37 | .\" $OpenBSD: sshd_config.5,v 1.74 2007/03/01 16:19:33 jmc Exp $ |
38 | .Dd September 25, 1999 | 38 | .Dd September 25, 1999 |
39 | .Dt SSHD_CONFIG 5 | 39 | .Dt SSHD_CONFIG 5 |
40 | .Os | 40 | .Os |
@@ -42,11 +42,9 @@ | |||
42 | .Nm sshd_config | 42 | .Nm sshd_config |
43 | .Nd OpenSSH SSH daemon configuration file | 43 | .Nd OpenSSH SSH daemon configuration file |
44 | .Sh SYNOPSIS | 44 | .Sh SYNOPSIS |
45 | .Bl -tag -width Ds -compact | 45 | .Nm /etc/ssh/sshd_config |
46 | .It Pa /etc/ssh/sshd_config | ||
47 | .El | ||
48 | .Sh DESCRIPTION | 46 | .Sh DESCRIPTION |
49 | .Nm sshd | 47 | .Xr sshd 8 |
50 | reads configuration data from | 48 | reads configuration data from |
51 | .Pa /etc/ssh/sshd_config | 49 | .Pa /etc/ssh/sshd_config |
52 | (or the file specified with | 50 | (or the file specified with |
@@ -56,6 +54,9 @@ The file contains keyword-argument pairs, one per line. | |||
56 | Lines starting with | 54 | Lines starting with |
57 | .Ql # | 55 | .Ql # |
58 | and empty lines are interpreted as comments. | 56 | and empty lines are interpreted as comments. |
57 | Arguments may optionally be enclosed in double quotes | ||
58 | .Pq \&" | ||
59 | in order to represent arguments containing spaces. | ||
59 | .Pp | 60 | .Pp |
60 | The possible | 61 | The possible |
61 | keywords and their meanings are as follows (note that | 62 | keywords and their meanings are as follows (note that |
@@ -72,7 +73,7 @@ in | |||
72 | for how to configure the client. | 73 | for how to configure the client. |
73 | Note that environment passing is only supported for protocol 2. | 74 | Note that environment passing is only supported for protocol 2. |
74 | Variables are specified by name, which may contain the wildcard characters | 75 | Variables are specified by name, which may contain the wildcard characters |
75 | .Ql \&* | 76 | .Ql * |
76 | and | 77 | and |
77 | .Ql \&? . | 78 | .Ql \&? . |
78 | Multiple environment variables may be separated by whitespace or spread | 79 | Multiple environment variables may be separated by whitespace or spread |
@@ -85,11 +86,11 @@ For this reason, care should be taken in the use of this directive. | |||
85 | The default is not to accept any environment variables. | 86 | The default is not to accept any environment variables. |
86 | .It Cm AddressFamily | 87 | .It Cm AddressFamily |
87 | Specifies which address family should be used by | 88 | Specifies which address family should be used by |
88 | .Nm sshd . | 89 | .Xr sshd 8 . |
89 | Valid arguments are | 90 | Valid arguments are |
90 | .Dq any , | 91 | .Dq any , |
91 | .Dq inet | 92 | .Dq inet |
92 | (use IPv4 only) or | 93 | (use IPv4 only), or |
93 | .Dq inet6 | 94 | .Dq inet6 |
94 | (use IPv6 only). | 95 | (use IPv6 only). |
95 | The default is | 96 | The default is |
@@ -99,13 +100,20 @@ This keyword can be followed by a list of group name patterns, separated | |||
99 | by spaces. | 100 | by spaces. |
100 | If specified, login is allowed only for users whose primary | 101 | If specified, login is allowed only for users whose primary |
101 | group or supplementary group list matches one of the patterns. | 102 | group or supplementary group list matches one of the patterns. |
102 | .Ql \&* | ||
103 | and | ||
104 | .Ql \&? | ||
105 | can be used as | ||
106 | wildcards in the patterns. | ||
107 | Only group names are valid; a numerical group ID is not recognized. | 103 | Only group names are valid; a numerical group ID is not recognized. |
108 | By default, login is allowed for all groups. | 104 | By default, login is allowed for all groups. |
105 | The allow/deny directives are processed in the following order: | ||
106 | .Cm DenyUsers , | ||
107 | .Cm AllowUsers , | ||
108 | .Cm DenyGroups , | ||
109 | and finally | ||
110 | .Cm AllowGroups . | ||
111 | .Pp | ||
112 | See | ||
113 | .Sx PATTERNS | ||
114 | in | ||
115 | .Xr ssh_config 5 | ||
116 | for more information on patterns. | ||
109 | .It Cm AllowTcpForwarding | 117 | .It Cm AllowTcpForwarding |
110 | Specifies whether TCP forwarding is permitted. | 118 | Specifies whether TCP forwarding is permitted. |
111 | The default is | 119 | The default is |
@@ -118,24 +126,31 @@ This keyword can be followed by a list of user name patterns, separated | |||
118 | by spaces. | 126 | by spaces. |
119 | If specified, login is allowed only for user names that | 127 | If specified, login is allowed only for user names that |
120 | match one of the patterns. | 128 | match one of the patterns. |
121 | .Ql \&* | ||
122 | and | ||
123 | .Ql \&? | ||
124 | can be used as | ||
125 | wildcards in the patterns. | ||
126 | Only user names are valid; a numerical user ID is not recognized. | 129 | Only user names are valid; a numerical user ID is not recognized. |
127 | By default, login is allowed for all users. | 130 | By default, login is allowed for all users. |
128 | If the pattern takes the form USER@HOST then USER and HOST | 131 | If the pattern takes the form USER@HOST then USER and HOST |
129 | are separately checked, restricting logins to particular | 132 | are separately checked, restricting logins to particular |
130 | users from particular hosts. | 133 | users from particular hosts. |
134 | The allow/deny directives are processed in the following order: | ||
135 | .Cm DenyUsers , | ||
136 | .Cm AllowUsers , | ||
137 | .Cm DenyGroups , | ||
138 | and finally | ||
139 | .Cm AllowGroups . | ||
140 | .Pp | ||
141 | See | ||
142 | .Sx PATTERNS | ||
143 | in | ||
144 | .Xr ssh_config 5 | ||
145 | for more information on patterns. | ||
131 | .It Cm AuthorizedKeysFile | 146 | .It Cm AuthorizedKeysFile |
132 | Specifies the file that contains the public keys that can be used | 147 | Specifies the file that contains the public keys that can be used |
133 | for user authentication. | 148 | for user authentication. |
134 | .Cm AuthorizedKeysFile | 149 | .Cm AuthorizedKeysFile |
135 | may contain tokens of the form %T which are substituted during connection | 150 | may contain tokens of the form %T which are substituted during connection |
136 | set-up. | 151 | setup. |
137 | The following tokens are defined: %% is replaced by a literal '%', | 152 | The following tokens are defined: %% is replaced by a literal '%', |
138 | %h is replaced by the home directory of the user being authenticated and | 153 | %h is replaced by the home directory of the user being authenticated, and |
139 | %u is replaced by the username of that user. | 154 | %u is replaced by the username of that user. |
140 | After expansion, | 155 | After expansion, |
141 | .Cm AuthorizedKeysFile | 156 | .Cm AuthorizedKeysFile |
@@ -151,7 +166,7 @@ authentication is allowed. | |||
151 | This option is only available for protocol version 2. | 166 | This option is only available for protocol version 2. |
152 | By default, no banner is displayed. | 167 | By default, no banner is displayed. |
153 | .It Cm ChallengeResponseAuthentication | 168 | .It Cm ChallengeResponseAuthentication |
154 | Specifies whether challenge response authentication is allowed. | 169 | Specifies whether challenge-response authentication is allowed. |
155 | All authentication styles from | 170 | All authentication styles from |
156 | .Xr login.conf 5 | 171 | .Xr login.conf 5 |
157 | are supported. | 172 | are supported. |
@@ -174,20 +189,19 @@ The supported ciphers are | |||
174 | .Dq blowfish-cbc , | 189 | .Dq blowfish-cbc , |
175 | and | 190 | and |
176 | .Dq cast128-cbc . | 191 | .Dq cast128-cbc . |
177 | The default is | 192 | The default is: |
178 | .Bd -literal | 193 | .Bd -literal -offset 3n |
179 | ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, | 194 | aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, |
180 | arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, | 195 | arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, |
181 | aes192-ctr,aes256-ctr'' | 196 | aes192-ctr,aes256-ctr |
182 | .Ed | 197 | .Ed |
183 | .It Cm ClientAliveCountMax | 198 | .It Cm ClientAliveCountMax |
184 | Sets the number of client alive messages (see below) which may be | 199 | Sets the number of client alive messages (see below) which may be |
185 | sent without | 200 | sent without |
186 | .Nm sshd | 201 | .Xr sshd 8 |
187 | receiving any messages back from the client. | 202 | receiving any messages back from the client. |
188 | If this threshold is reached while client alive messages are being sent, | 203 | If this threshold is reached while client alive messages are being sent, |
189 | .Nm sshd | 204 | sshd will disconnect the client, terminating the session. |
190 | will disconnect the client, terminating the session. | ||
191 | It is important to note that the use of client alive messages is very | 205 | It is important to note that the use of client alive messages is very |
192 | different from | 206 | different from |
193 | .Cm TCPKeepAlive | 207 | .Cm TCPKeepAlive |
@@ -205,12 +219,13 @@ If | |||
205 | .Cm ClientAliveInterval | 219 | .Cm ClientAliveInterval |
206 | (see below) is set to 15, and | 220 | (see below) is set to 15, and |
207 | .Cm ClientAliveCountMax | 221 | .Cm ClientAliveCountMax |
208 | is left at the default, unresponsive ssh clients | 222 | is left at the default, unresponsive SSH clients |
209 | will be disconnected after approximately 45 seconds. | 223 | will be disconnected after approximately 45 seconds. |
224 | This option applies to protocol version 2 only. | ||
210 | .It Cm ClientAliveInterval | 225 | .It Cm ClientAliveInterval |
211 | Sets a timeout interval in seconds after which if no data has been received | 226 | Sets a timeout interval in seconds after which if no data has been received |
212 | from the client, | 227 | from the client, |
213 | .Nm sshd | 228 | .Xr sshd 8 |
214 | will send a message through the encrypted | 229 | will send a message through the encrypted |
215 | channel to request a response from the client. | 230 | channel to request a response from the client. |
216 | The default | 231 | The default |
@@ -231,36 +246,62 @@ This keyword can be followed by a list of group name patterns, separated | |||
231 | by spaces. | 246 | by spaces. |
232 | Login is disallowed for users whose primary group or supplementary | 247 | Login is disallowed for users whose primary group or supplementary |
233 | group list matches one of the patterns. | 248 | group list matches one of the patterns. |
234 | .Ql \&* | ||
235 | and | ||
236 | .Ql \&? | ||
237 | can be used as | ||
238 | wildcards in the patterns. | ||
239 | Only group names are valid; a numerical group ID is not recognized. | 249 | Only group names are valid; a numerical group ID is not recognized. |
240 | By default, login is allowed for all groups. | 250 | By default, login is allowed for all groups. |
251 | The allow/deny directives are processed in the following order: | ||
252 | .Cm DenyUsers , | ||
253 | .Cm AllowUsers , | ||
254 | .Cm DenyGroups , | ||
255 | and finally | ||
256 | .Cm AllowGroups . | ||
257 | .Pp | ||
258 | See | ||
259 | .Sx PATTERNS | ||
260 | in | ||
261 | .Xr ssh_config 5 | ||
262 | for more information on patterns. | ||
241 | .It Cm DenyUsers | 263 | .It Cm DenyUsers |
242 | This keyword can be followed by a list of user name patterns, separated | 264 | This keyword can be followed by a list of user name patterns, separated |
243 | by spaces. | 265 | by spaces. |
244 | Login is disallowed for user names that match one of the patterns. | 266 | Login is disallowed for user names that match one of the patterns. |
245 | .Ql \&* | ||
246 | and | ||
247 | .Ql \&? | ||
248 | can be used as wildcards in the patterns. | ||
249 | Only user names are valid; a numerical user ID is not recognized. | 267 | Only user names are valid; a numerical user ID is not recognized. |
250 | By default, login is allowed for all users. | 268 | By default, login is allowed for all users. |
251 | If the pattern takes the form USER@HOST then USER and HOST | 269 | If the pattern takes the form USER@HOST then USER and HOST |
252 | are separately checked, restricting logins to particular | 270 | are separately checked, restricting logins to particular |
253 | users from particular hosts. | 271 | users from particular hosts. |
272 | The allow/deny directives are processed in the following order: | ||
273 | .Cm DenyUsers , | ||
274 | .Cm AllowUsers , | ||
275 | .Cm DenyGroups , | ||
276 | and finally | ||
277 | .Cm AllowGroups . | ||
278 | .Pp | ||
279 | See | ||
280 | .Sx PATTERNS | ||
281 | in | ||
282 | .Xr ssh_config 5 | ||
283 | for more information on patterns. | ||
284 | .It Cm ForceCommand | ||
285 | Forces the execution of the command specified by | ||
286 | .Cm ForceCommand , | ||
287 | ignoring any command supplied by the client. | ||
288 | The command is invoked by using the user's login shell with the -c option. | ||
289 | This applies to shell, command, or subsystem execution. | ||
290 | It is most useful inside a | ||
291 | .Cm Match | ||
292 | block. | ||
293 | The command originally supplied by the client is available in the | ||
294 | .Ev SSH_ORIGINAL_COMMAND | ||
295 | environment variable. | ||
254 | .It Cm GatewayPorts | 296 | .It Cm GatewayPorts |
255 | Specifies whether remote hosts are allowed to connect to ports | 297 | Specifies whether remote hosts are allowed to connect to ports |
256 | forwarded for the client. | 298 | forwarded for the client. |
257 | By default, | 299 | By default, |
258 | .Nm sshd | 300 | .Xr sshd 8 |
259 | binds remote port forwardings to the loopback address. | 301 | binds remote port forwardings to the loopback address. |
260 | This prevents other remote hosts from connecting to forwarded ports. | 302 | This prevents other remote hosts from connecting to forwarded ports. |
261 | .Cm GatewayPorts | 303 | .Cm GatewayPorts |
262 | can be used to specify that | 304 | can be used to specify that sshd |
263 | .Nm sshd | ||
264 | should allow remote port forwardings to bind to non-loopback addresses, thus | 305 | should allow remote port forwardings to bind to non-loopback addresses, thus |
265 | allowing other hosts to connect. | 306 | allowing other hosts to connect. |
266 | The argument may be | 307 | The argument may be |
@@ -289,15 +330,49 @@ on logout. | |||
289 | The default is | 330 | The default is |
290 | .Dq yes . | 331 | .Dq yes . |
291 | Note that this option applies to protocol version 2 only. | 332 | Note that this option applies to protocol version 2 only. |
333 | .It Cm GSSAPIStrictAcceptorCheck | ||
334 | Determines whether to be strict about the identity of the GSSAPI acceptor | ||
335 | a client authenticates against. If | ||
336 | .Dq yes | ||
337 | then the client must authenticate against the | ||
338 | .Pa host | ||
339 | service on the current hostname. If | ||
340 | .Dq no | ||
341 | then the client may authenticate against any service key stored in the | ||
342 | machine's default store. This facility is provided to assist with operation | ||
343 | on multi homed machines. | ||
344 | The default is | ||
345 | .Dq yes . | ||
346 | Note that this option applies only to protocol version 2 GSSAPI connections, | ||
347 | and setting it to | ||
348 | .Dq no | ||
349 | may only work with recent Kerberos GSSAPI libraries. | ||
292 | .It Cm HostbasedAuthentication | 350 | .It Cm HostbasedAuthentication |
293 | Specifies whether rhosts or /etc/hosts.equiv authentication together | 351 | Specifies whether rhosts or /etc/hosts.equiv authentication together |
294 | with successful public key client host authentication is allowed | 352 | with successful public key client host authentication is allowed |
295 | (hostbased authentication). | 353 | (host-based authentication). |
296 | This option is similar to | 354 | This option is similar to |
297 | .Cm RhostsRSAAuthentication | 355 | .Cm RhostsRSAAuthentication |
298 | and applies to protocol version 2 only. | 356 | and applies to protocol version 2 only. |
299 | The default is | 357 | The default is |
300 | .Dq no . | 358 | .Dq no . |
359 | .It Cm HostbasedUsesNameFromPacketOnly | ||
360 | Specifies whether or not the server will attempt to perform a reverse | ||
361 | name lookup when matching the name in the | ||
362 | .Pa ~/.shosts , | ||
363 | .Pa ~/.rhosts , | ||
364 | and | ||
365 | .Pa /etc/hosts.equiv | ||
366 | files during | ||
367 | .Cm HostbasedAuthentication . | ||
368 | A setting of | ||
369 | .Dq yes | ||
370 | means that | ||
371 | .Xr sshd 8 | ||
372 | uses the name supplied by the client rather than | ||
373 | attempting to resolve the name from the TCP connection itself. | ||
374 | The default is | ||
375 | .Dq no . | ||
301 | .It Cm HostKey | 376 | .It Cm HostKey |
302 | Specifies a file containing a private host key | 377 | Specifies a file containing a private host key |
303 | used by SSH. | 378 | used by SSH. |
@@ -309,7 +384,7 @@ and | |||
309 | .Pa /etc/ssh/ssh_host_dsa_key | 384 | .Pa /etc/ssh/ssh_host_dsa_key |
310 | for protocol version 2. | 385 | for protocol version 2. |
311 | Note that | 386 | Note that |
312 | .Nm sshd | 387 | .Xr sshd 8 |
313 | will refuse to use a file if it is group/world-accessible. | 388 | will refuse to use a file if it is group/world-accessible. |
314 | It is possible to have multiple host key files. | 389 | It is possible to have multiple host key files. |
315 | .Dq rsa1 | 390 | .Dq rsa1 |
@@ -336,7 +411,7 @@ The default is | |||
336 | .Dq yes . | 411 | .Dq yes . |
337 | .It Cm IgnoreUserKnownHosts | 412 | .It Cm IgnoreUserKnownHosts |
338 | Specifies whether | 413 | Specifies whether |
339 | .Nm sshd | 414 | .Xr sshd 8 |
340 | should ignore the user's | 415 | should ignore the user's |
341 | .Pa ~/.ssh/known_hosts | 416 | .Pa ~/.ssh/known_hosts |
342 | during | 417 | during |
@@ -351,24 +426,24 @@ Specifies whether the password provided by the user for | |||
351 | will be validated through the Kerberos KDC. | 426 | will be validated through the Kerberos KDC. |
352 | To use this option, the server needs a | 427 | To use this option, the server needs a |
353 | Kerberos servtab which allows the verification of the KDC's identity. | 428 | Kerberos servtab which allows the verification of the KDC's identity. |
354 | Default is | 429 | The default is |
355 | .Dq no . | 430 | .Dq no . |
356 | .It Cm KerberosGetAFSToken | 431 | .It Cm KerberosGetAFSToken |
357 | If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire | 432 | If AFS is active and the user has a Kerberos 5 TGT, attempt to acquire |
358 | an AFS token before accessing the user's home directory. | 433 | an AFS token before accessing the user's home directory. |
359 | Default is | 434 | The default is |
360 | .Dq no . | 435 | .Dq no . |
361 | .It Cm KerberosOrLocalPasswd | 436 | .It Cm KerberosOrLocalPasswd |
362 | If set then if password authentication through Kerberos fails then | 437 | If password authentication through Kerberos fails then |
363 | the password will be validated via any additional local mechanism | 438 | the password will be validated via any additional local mechanism |
364 | such as | 439 | such as |
365 | .Pa /etc/passwd . | 440 | .Pa /etc/passwd . |
366 | Default is | 441 | The default is |
367 | .Dq yes . | 442 | .Dq yes . |
368 | .It Cm KerberosTicketCleanup | 443 | .It Cm KerberosTicketCleanup |
369 | Specifies whether to automatically destroy the user's ticket cache | 444 | Specifies whether to automatically destroy the user's ticket cache |
370 | file on logout. | 445 | file on logout. |
371 | Default is | 446 | The default is |
372 | .Dq yes . | 447 | .Dq yes . |
373 | .It Cm KeyRegenerationInterval | 448 | .It Cm KeyRegenerationInterval |
374 | In protocol version 1, the ephemeral server key is automatically regenerated | 449 | In protocol version 1, the ephemeral server key is automatically regenerated |
@@ -381,7 +456,7 @@ If the value is 0, the key is never regenerated. | |||
381 | The default is 3600 (seconds). | 456 | The default is 3600 (seconds). |
382 | .It Cm ListenAddress | 457 | .It Cm ListenAddress |
383 | Specifies the local addresses | 458 | Specifies the local addresses |
384 | .Nm sshd | 459 | .Xr sshd 8 |
385 | should listen on. | 460 | should listen on. |
386 | The following forms may be used: | 461 | The following forms may be used: |
387 | .Pp | 462 | .Pp |
@@ -407,8 +482,7 @@ The following forms may be used: | |||
407 | If | 482 | If |
408 | .Ar port | 483 | .Ar port |
409 | is not specified, | 484 | is not specified, |
410 | .Nm sshd | 485 | sshd will listen on the address and all prior |
411 | will listen on the address and all prior | ||
412 | .Cm Port | 486 | .Cm Port |
413 | options specified. | 487 | options specified. |
414 | The default is to listen on all local addresses. | 488 | The default is to listen on all local addresses. |
@@ -417,7 +491,7 @@ Multiple | |||
417 | options are permitted. | 491 | options are permitted. |
418 | Additionally, any | 492 | Additionally, any |
419 | .Cm Port | 493 | .Cm Port |
420 | options must precede this option for non port qualified addresses. | 494 | options must precede this option for non-port qualified addresses. |
421 | .It Cm LoginGraceTime | 495 | .It Cm LoginGraceTime |
422 | The server disconnects after this time if the user has not | 496 | The server disconnects after this time if the user has not |
423 | successfully logged in. | 497 | successfully logged in. |
@@ -425,9 +499,9 @@ If the value is 0, there is no time limit. | |||
425 | The default is 120 seconds. | 499 | The default is 120 seconds. |
426 | .It Cm LogLevel | 500 | .It Cm LogLevel |
427 | Gives the verbosity level that is used when logging messages from | 501 | Gives the verbosity level that is used when logging messages from |
428 | .Nm sshd . | 502 | .Xr sshd 8 . |
429 | The possible values are: | 503 | The possible values are: |
430 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. | 504 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
431 | The default is INFO. | 505 | The default is INFO. |
432 | DEBUG and DEBUG1 are equivalent. | 506 | DEBUG and DEBUG1 are equivalent. |
433 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. | 507 | DEBUG2 and DEBUG3 each specify higher levels of debugging output. |
@@ -437,8 +511,44 @@ Specifies the available MAC (message authentication code) algorithms. | |||
437 | The MAC algorithm is used in protocol version 2 | 511 | The MAC algorithm is used in protocol version 2 |
438 | for data integrity protection. | 512 | for data integrity protection. |
439 | Multiple algorithms must be comma-separated. | 513 | Multiple algorithms must be comma-separated. |
440 | The default is | 514 | The default is: |
441 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . | 515 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . |
516 | .It Cm Match | ||
517 | Introduces a conditional block. | ||
518 | If all of the criteria on the | ||
519 | .Cm Match | ||
520 | line are satisfied, the keywords on the following lines override those | ||
521 | set in the global section of the config file, until either another | ||
522 | .Cm Match | ||
523 | line or the end of the file. | ||
524 | The arguments to | ||
525 | .Cm Match | ||
526 | are one or more criteria-pattern pairs. | ||
527 | The available criteria are | ||
528 | .Cm User , | ||
529 | .Cm Group , | ||
530 | .Cm Host , | ||
531 | and | ||
532 | .Cm Address . | ||
533 | Only a subset of keywords may be used on the lines following a | ||
534 | .Cm Match | ||
535 | keyword. | ||
536 | Available keywords are | ||
537 | .Cm AllowTcpForwarding , | ||
538 | .Cm Banner , | ||
539 | .Cm ForceCommand , | ||
540 | .Cm GatewayPorts , | ||
541 | .Cm GSSApiAuthentication , | ||
542 | .Cm KbdInteractiveAuthentication , | ||
543 | .Cm KerberosAuthentication , | ||
544 | .Cm PasswordAuthentication , | ||
545 | .Cm PermitOpen , | ||
546 | .Cm RhostsRSAAuthentication , | ||
547 | .Cm RSAAuthentication , | ||
548 | .Cm X11DisplayOffset , | ||
549 | .Cm X11Forwarding , | ||
550 | and | ||
551 | .Cm X11UseLocalHost . | ||
442 | .It Cm MaxAuthTries | 552 | .It Cm MaxAuthTries |
443 | Specifies the maximum number of authentication attempts permitted per | 553 | Specifies the maximum number of authentication attempts permitted per |
444 | connection. | 554 | connection. |
@@ -447,8 +557,7 @@ additional failures are logged. | |||
447 | The default is 6. | 557 | The default is 6. |
448 | .It Cm MaxStartups | 558 | .It Cm MaxStartups |
449 | Specifies the maximum number of concurrent unauthenticated connections to the | 559 | Specifies the maximum number of concurrent unauthenticated connections to the |
450 | .Nm sshd | 560 | SSH daemon. |
451 | daemon. | ||
452 | Additional connections will be dropped until authentication succeeds or the | 561 | Additional connections will be dropped until authentication succeeds or the |
453 | .Cm LoginGraceTime | 562 | .Cm LoginGraceTime |
454 | expires for a connection. | 563 | expires for a connection. |
@@ -457,8 +566,8 @@ The default is 10. | |||
457 | Alternatively, random early drop can be enabled by specifying | 566 | Alternatively, random early drop can be enabled by specifying |
458 | the three colon separated values | 567 | the three colon separated values |
459 | .Dq start:rate:full | 568 | .Dq start:rate:full |
460 | (e.g., "10:30:60"). | 569 | (e.g. "10:30:60"). |
461 | .Nm sshd | 570 | .Xr sshd 8 |
462 | will refuse connection attempts with a probability of | 571 | will refuse connection attempts with a probability of |
463 | .Dq rate/100 | 572 | .Dq rate/100 |
464 | (30%) | 573 | (30%) |
@@ -479,24 +588,51 @@ When password authentication is allowed, it specifies whether the | |||
479 | server allows login to accounts with empty password strings. | 588 | server allows login to accounts with empty password strings. |
480 | The default is | 589 | The default is |
481 | .Dq no . | 590 | .Dq no . |
591 | .It Cm PermitOpen | ||
592 | Specifies the destinations to which TCP port forwarding is permitted. | ||
593 | The forwarding specification must be one of the following forms: | ||
594 | .Pp | ||
595 | .Bl -item -offset indent -compact | ||
596 | .It | ||
597 | .Cm PermitOpen | ||
598 | .Sm off | ||
599 | .Ar host : port | ||
600 | .Sm on | ||
601 | .It | ||
602 | .Cm PermitOpen | ||
603 | .Sm off | ||
604 | .Ar IPv4_addr : port | ||
605 | .Sm on | ||
606 | .It | ||
607 | .Cm PermitOpen | ||
608 | .Sm off | ||
609 | .Ar \&[ IPv6_addr \&] : port | ||
610 | .Sm on | ||
611 | .El | ||
612 | .Pp | ||
613 | Multiple forwards may be specified by separating them with whitespace. | ||
614 | An argument of | ||
615 | .Dq any | ||
616 | can be used to remove all restrictions and permit any forwarding requests. | ||
617 | By default all port forwarding requests are permitted. | ||
482 | .It Cm PermitRootLogin | 618 | .It Cm PermitRootLogin |
483 | Specifies whether root can log in using | 619 | Specifies whether root can log in using |
484 | .Xr ssh 1 . | 620 | .Xr ssh 1 . |
485 | The argument must be | 621 | The argument must be |
486 | .Dq yes , | 622 | .Dq yes , |
487 | .Dq without-password , | 623 | .Dq without-password , |
488 | .Dq forced-commands-only | 624 | .Dq forced-commands-only , |
489 | or | 625 | or |
490 | .Dq no . | 626 | .Dq no . |
491 | The default is | 627 | The default is |
492 | .Dq yes . | 628 | .Dq yes . |
493 | .Pp | 629 | .Pp |
494 | If this option is set to | 630 | If this option is set to |
495 | .Dq without-password | 631 | .Dq without-password , |
496 | password authentication is disabled for root. | 632 | password authentication is disabled for root. |
497 | .Pp | 633 | .Pp |
498 | If this option is set to | 634 | If this option is set to |
499 | .Dq forced-commands-only | 635 | .Dq forced-commands-only , |
500 | root login with public key authentication will be allowed, | 636 | root login with public key authentication will be allowed, |
501 | but only if the | 637 | but only if the |
502 | .Ar command | 638 | .Ar command |
@@ -506,7 +642,7 @@ normally not allowed). | |||
506 | All other authentication methods are disabled for root. | 642 | All other authentication methods are disabled for root. |
507 | .Pp | 643 | .Pp |
508 | If this option is set to | 644 | If this option is set to |
509 | .Dq no | 645 | .Dq no , |
510 | root is not allowed to log in. | 646 | root is not allowed to log in. |
511 | .It Cm PermitTunnel | 647 | .It Cm PermitTunnel |
512 | Specifies whether | 648 | Specifies whether |
@@ -514,10 +650,17 @@ Specifies whether | |||
514 | device forwarding is allowed. | 650 | device forwarding is allowed. |
515 | The argument must be | 651 | The argument must be |
516 | .Dq yes , | 652 | .Dq yes , |
517 | .Dq point-to-point , | 653 | .Dq point-to-point |
654 | (layer 3), | ||
518 | .Dq ethernet | 655 | .Dq ethernet |
519 | or | 656 | (layer 2), or |
520 | .Dq no . | 657 | .Dq no . |
658 | Specifying | ||
659 | .Dq yes | ||
660 | permits both | ||
661 | .Dq point-to-point | ||
662 | and | ||
663 | .Dq ethernet . | ||
521 | The default is | 664 | The default is |
522 | .Dq no . | 665 | .Dq no . |
523 | .It Cm PermitUserEnvironment | 666 | .It Cm PermitUserEnvironment |
@@ -528,7 +671,7 @@ and | |||
528 | options in | 671 | options in |
529 | .Pa ~/.ssh/authorized_keys | 672 | .Pa ~/.ssh/authorized_keys |
530 | are processed by | 673 | are processed by |
531 | .Nm sshd . | 674 | .Xr sshd 8 . |
532 | The default is | 675 | The default is |
533 | .Dq no . | 676 | .Dq no . |
534 | Enabling environment processing may enable users to bypass access | 677 | Enabling environment processing may enable users to bypass access |
@@ -536,13 +679,12 @@ restrictions in some configurations using mechanisms such as | |||
536 | .Ev LD_PRELOAD . | 679 | .Ev LD_PRELOAD . |
537 | .It Cm PidFile | 680 | .It Cm PidFile |
538 | Specifies the file that contains the process ID of the | 681 | Specifies the file that contains the process ID of the |
539 | .Nm sshd | 682 | SSH daemon. |
540 | daemon. | ||
541 | The default is | 683 | The default is |
542 | .Pa /var/run/sshd.pid . | 684 | .Pa /var/run/sshd.pid . |
543 | .It Cm Port | 685 | .It Cm Port |
544 | Specifies the port number that | 686 | Specifies the port number that |
545 | .Nm sshd | 687 | .Xr sshd 8 |
546 | listens on. | 688 | listens on. |
547 | The default is 22. | 689 | The default is 22. |
548 | Multiple options of this type are permitted. | 690 | Multiple options of this type are permitted. |
@@ -550,14 +692,14 @@ See also | |||
550 | .Cm ListenAddress . | 692 | .Cm ListenAddress . |
551 | .It Cm PrintLastLog | 693 | .It Cm PrintLastLog |
552 | Specifies whether | 694 | Specifies whether |
553 | .Nm sshd | 695 | .Xr sshd 8 |
554 | should print the date and time of the last user login when a user logs | 696 | should print the date and time of the last user login when a user logs |
555 | in interactively. | 697 | in interactively. |
556 | The default is | 698 | The default is |
557 | .Dq yes . | 699 | .Dq yes . |
558 | .It Cm PrintMotd | 700 | .It Cm PrintMotd |
559 | Specifies whether | 701 | Specifies whether |
560 | .Nm sshd | 702 | .Xr sshd 8 |
561 | should print | 703 | should print |
562 | .Pa /etc/motd | 704 | .Pa /etc/motd |
563 | when a user logs in interactively. | 705 | when a user logs in interactively. |
@@ -568,12 +710,12 @@ The default is | |||
568 | .Dq yes . | 710 | .Dq yes . |
569 | .It Cm Protocol | 711 | .It Cm Protocol |
570 | Specifies the protocol versions | 712 | Specifies the protocol versions |
571 | .Nm sshd | 713 | .Xr sshd 8 |
572 | supports. | 714 | supports. |
573 | The possible values are | 715 | The possible values are |
574 | .Dq 1 | 716 | .Sq 1 |
575 | and | 717 | and |
576 | .Dq 2 . | 718 | .Sq 2 . |
577 | Multiple versions must be comma-separated. | 719 | Multiple versions must be comma-separated. |
578 | The default is | 720 | The default is |
579 | .Dq 2,1 . | 721 | .Dq 2,1 . |
@@ -605,7 +747,7 @@ Defines the number of bits in the ephemeral protocol version 1 server key. | |||
605 | The minimum value is 512, and the default is 768. | 747 | The minimum value is 512, and the default is 768. |
606 | .It Cm StrictModes | 748 | .It Cm StrictModes |
607 | Specifies whether | 749 | Specifies whether |
608 | .Nm sshd | 750 | .Xr sshd 8 |
609 | should check file modes and ownership of the | 751 | should check file modes and ownership of the |
610 | user's files and home directory before accepting login. | 752 | user's files and home directory before accepting login. |
611 | This is normally desirable because novices sometimes accidentally leave their | 753 | This is normally desirable because novices sometimes accidentally leave their |
@@ -613,9 +755,9 @@ directory or files world-writable. | |||
613 | The default is | 755 | The default is |
614 | .Dq yes . | 756 | .Dq yes . |
615 | .It Cm Subsystem | 757 | .It Cm Subsystem |
616 | Configures an external subsystem (e.g., file transfer daemon). | 758 | Configures an external subsystem (e.g. file transfer daemon). |
617 | Arguments should be a subsystem name and a command to execute upon subsystem | 759 | Arguments should be a subsystem name and a command (with optional arguments) |
618 | request. | 760 | to execute upon subsystem request. |
619 | The command | 761 | The command |
620 | .Xr sftp-server 8 | 762 | .Xr sftp-server 8 |
621 | implements the | 763 | implements the |
@@ -625,7 +767,7 @@ By default no subsystems are defined. | |||
625 | Note that this option applies to protocol version 2 only. | 767 | Note that this option applies to protocol version 2 only. |
626 | .It Cm SyslogFacility | 768 | .It Cm SyslogFacility |
627 | Gives the facility code that is used when logging messages from | 769 | Gives the facility code that is used when logging messages from |
628 | .Nm sshd . | 770 | .Xr sshd 8 . |
629 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, | 771 | The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2, |
630 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. | 772 | LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. |
631 | The default is AUTH. | 773 | The default is AUTH. |
@@ -652,7 +794,7 @@ To disable TCP keepalive messages, the value should be set to | |||
652 | .Dq no . | 794 | .Dq no . |
653 | .It Cm UseDNS | 795 | .It Cm UseDNS |
654 | Specifies whether | 796 | Specifies whether |
655 | .Nm sshd | 797 | .Xr sshd 8 |
656 | should look up the remote host name and check that | 798 | should look up the remote host name and check that |
657 | the resolved host name for the remote IP address maps back to the | 799 | the resolved host name for the remote IP address maps back to the |
658 | very same IP address. | 800 | very same IP address. |
@@ -683,7 +825,10 @@ If set to | |||
683 | .Dq yes | 825 | .Dq yes |
684 | this will enable PAM authentication using | 826 | this will enable PAM authentication using |
685 | .Cm ChallengeResponseAuthentication | 827 | .Cm ChallengeResponseAuthentication |
686 | and PAM account and session module processing for all authentication types. | 828 | and |
829 | .Cm PasswordAuthentication | ||
830 | in addition to PAM account and session module processing for all | ||
831 | authentication types. | ||
687 | .Pp | 832 | .Pp |
688 | Because PAM challenge-response authentication usually serves an equivalent | 833 | Because PAM challenge-response authentication usually serves an equivalent |
689 | role to password authentication, you should disable either | 834 | role to password authentication, you should disable either |
@@ -700,7 +845,7 @@ The default is | |||
700 | .Dq no . | 845 | .Dq no . |
701 | .It Cm UsePrivilegeSeparation | 846 | .It Cm UsePrivilegeSeparation |
702 | Specifies whether | 847 | Specifies whether |
703 | .Nm sshd | 848 | .Xr sshd 8 |
704 | separates privileges by creating an unprivileged child process | 849 | separates privileges by creating an unprivileged child process |
705 | to deal with incoming network traffic. | 850 | to deal with incoming network traffic. |
706 | After successful authentication, another process will be created that has | 851 | After successful authentication, another process will be created that has |
@@ -711,11 +856,9 @@ The default is | |||
711 | .Dq yes . | 856 | .Dq yes . |
712 | .It Cm X11DisplayOffset | 857 | .It Cm X11DisplayOffset |
713 | Specifies the first display number available for | 858 | Specifies the first display number available for |
714 | .Nm sshd Ns 's | 859 | .Xr sshd 8 Ns 's |
715 | X11 forwarding. | 860 | X11 forwarding. |
716 | This prevents | 861 | This prevents sshd from interfering with real X11 servers. |
717 | .Nm sshd | ||
718 | from interfering with real X11 servers. | ||
719 | The default is 10. | 862 | The default is 10. |
720 | .It Cm X11Forwarding | 863 | .It Cm X11Forwarding |
721 | Specifies whether X11 forwarding is permitted. | 864 | Specifies whether X11 forwarding is permitted. |
@@ -728,14 +871,14 @@ The default is | |||
728 | .Pp | 871 | .Pp |
729 | When X11 forwarding is enabled, there may be additional exposure to | 872 | When X11 forwarding is enabled, there may be additional exposure to |
730 | the server and to client displays if the | 873 | the server and to client displays if the |
731 | .Nm sshd | 874 | .Xr sshd 8 |
732 | proxy display is configured to listen on the wildcard address (see | 875 | proxy display is configured to listen on the wildcard address (see |
733 | .Cm X11UseLocalhost | 876 | .Cm X11UseLocalhost |
734 | below), however this is not the default. | 877 | below), though this is not the default. |
735 | Additionally, the authentication spoofing and authentication data | 878 | Additionally, the authentication spoofing and authentication data |
736 | verification and substitution occur on the client side. | 879 | verification and substitution occur on the client side. |
737 | The security risk of using X11 forwarding is that the client's X11 | 880 | The security risk of using X11 forwarding is that the client's X11 |
738 | display server may be exposed to attack when the ssh client requests | 881 | display server may be exposed to attack when the SSH client requests |
739 | forwarding (see the warnings for | 882 | forwarding (see the warnings for |
740 | .Cm ForwardX11 | 883 | .Cm ForwardX11 |
741 | in | 884 | in |
@@ -753,12 +896,11 @@ X11 forwarding is automatically disabled if | |||
753 | is enabled. | 896 | is enabled. |
754 | .It Cm X11UseLocalhost | 897 | .It Cm X11UseLocalhost |
755 | Specifies whether | 898 | Specifies whether |
756 | .Nm sshd | 899 | .Xr sshd 8 |
757 | should bind the X11 forwarding server to the loopback address or to | 900 | should bind the X11 forwarding server to the loopback address or to |
758 | the wildcard address. | 901 | the wildcard address. |
759 | By default, | 902 | By default, |
760 | .Nm sshd | 903 | sshd binds the forwarding server to the loopback address and sets the |
761 | binds the forwarding server to the loopback address and sets the | ||
762 | hostname part of the | 904 | hostname part of the |
763 | .Ev DISPLAY | 905 | .Ev DISPLAY |
764 | environment variable to | 906 | environment variable to |
@@ -784,8 +926,8 @@ program. | |||
784 | The default is | 926 | The default is |
785 | .Pa /usr/X11R6/bin/xauth . | 927 | .Pa /usr/X11R6/bin/xauth . |
786 | .El | 928 | .El |
787 | .Ss Time Formats | 929 | .Sh TIME FORMATS |
788 | .Nm sshd | 930 | .Xr sshd 8 |
789 | command-line arguments and configuration file options that specify time | 931 | command-line arguments and configuration file options that specify time |
790 | may be expressed using a sequence of the form: | 932 | may be expressed using a sequence of the form: |
791 | .Sm off | 933 | .Sm off |
@@ -798,7 +940,7 @@ is a positive integer value and | |||
798 | is one of the following: | 940 | is one of the following: |
799 | .Pp | 941 | .Pp |
800 | .Bl -tag -width Ds -compact -offset indent | 942 | .Bl -tag -width Ds -compact -offset indent |
801 | .It Cm <none> | 943 | .It Aq Cm none |
802 | seconds | 944 | seconds |
803 | .It Cm s | Cm S | 945 | .It Cm s | Cm S |
804 | seconds | 946 | seconds |
@@ -829,7 +971,7 @@ Time format examples: | |||
829 | .Bl -tag -width Ds | 971 | .Bl -tag -width Ds |
830 | .It Pa /etc/ssh/sshd_config | 972 | .It Pa /etc/ssh/sshd_config |
831 | Contains configuration data for | 973 | Contains configuration data for |
832 | .Nm sshd . | 974 | .Xr sshd 8 . |
833 | This file should be writable by root only, but it is recommended | 975 | This file should be writable by root only, but it is recommended |
834 | (though not necessary) that it be world-readable. | 976 | (though not necessary) that it be world-readable. |
835 | .El | 977 | .El |