diff options
Diffstat (limited to 'ssh_config.5')
-rw-r--r-- | ssh_config.5 | 321 |
1 files changed, 210 insertions, 111 deletions
diff --git a/ssh_config.5 b/ssh_config.5 index 5c41189fa..83de2f7e4 100644 --- a/ssh_config.5 +++ b/ssh_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: ssh_config.5,v 1.76 2006/01/20 11:21:45 jmc Exp $ | 37 | .\" $OpenBSD: ssh_config.5,v 1.98 2007/01/10 13:23:22 jmc Exp $ |
38 | .Dd September 25, 1999 | 38 | .Dd September 25, 1999 |
39 | .Dt SSH_CONFIG 5 | 39 | .Dt SSH_CONFIG 5 |
40 | .Os | 40 | .Os |
@@ -42,14 +42,13 @@ | |||
42 | .Nm ssh_config | 42 | .Nm ssh_config |
43 | .Nd OpenSSH SSH client configuration files | 43 | .Nd OpenSSH SSH client configuration files |
44 | .Sh SYNOPSIS | 44 | .Sh SYNOPSIS |
45 | .Bl -tag -width Ds -compact | 45 | .Nm ~/.ssh/config |
46 | .It Pa ~/.ssh/config | 46 | .Nm /etc/ssh/ssh_config |
47 | .It Pa /etc/ssh/ssh_config | ||
48 | .El | ||
49 | .Sh DESCRIPTION | 47 | .Sh DESCRIPTION |
50 | .Nm ssh | 48 | .Xr ssh 1 |
51 | obtains configuration data from the following sources in | 49 | obtains configuration data from the following sources in |
52 | the following order: | 50 | the following order: |
51 | .Pp | ||
53 | .Bl -enum -offset indent -compact | 52 | .Bl -enum -offset indent -compact |
54 | .It | 53 | .It |
55 | command-line options | 54 | command-line options |
@@ -78,7 +77,6 @@ The configuration file has the following format: | |||
78 | Empty lines and lines starting with | 77 | Empty lines and lines starting with |
79 | .Ql # | 78 | .Ql # |
80 | are comments. | 79 | are comments. |
81 | .Pp | ||
82 | Otherwise a line is of the format | 80 | Otherwise a line is of the format |
83 | .Dq keyword arguments . | 81 | .Dq keyword arguments . |
84 | Configuration options may be separated by whitespace or | 82 | Configuration options may be separated by whitespace or |
@@ -87,11 +85,14 @@ optional whitespace and exactly one | |||
87 | the latter format is useful to avoid the need to quote whitespace | 85 | the latter format is useful to avoid the need to quote whitespace |
88 | when specifying configuration options using the | 86 | when specifying configuration options using the |
89 | .Nm ssh , | 87 | .Nm ssh , |
90 | .Nm scp | 88 | .Nm scp , |
91 | and | 89 | and |
92 | .Nm sftp | 90 | .Nm sftp |
93 | .Fl o | 91 | .Fl o |
94 | option. | 92 | option. |
93 | Arguments may optionally be enclosed in double quotes | ||
94 | .Pq \&" | ||
95 | in order to represent arguments containing spaces. | ||
95 | .Pp | 96 | .Pp |
96 | The possible | 97 | The possible |
97 | keywords and their meanings are as follows (note that | 98 | keywords and their meanings are as follows (note that |
@@ -102,25 +103,24 @@ Restricts the following declarations (up to the next | |||
102 | .Cm Host | 103 | .Cm Host |
103 | keyword) to be only for those hosts that match one of the patterns | 104 | keyword) to be only for those hosts that match one of the patterns |
104 | given after the keyword. | 105 | given after the keyword. |
105 | .Ql \&* | ||
106 | and | ||
107 | .Ql \&? | ||
108 | can be used as wildcards in the | ||
109 | patterns. | ||
110 | A single | 106 | A single |
111 | .Ql \&* | 107 | .Ql * |
112 | as a pattern can be used to provide global | 108 | as a pattern can be used to provide global |
113 | defaults for all hosts. | 109 | defaults for all hosts. |
114 | The host is the | 110 | The host is the |
115 | .Ar hostname | 111 | .Ar hostname |
116 | argument given on the command line (i.e., the name is not converted to | 112 | argument given on the command line (i.e. the name is not converted to |
117 | a canonicalized host name before matching). | 113 | a canonicalized host name before matching). |
114 | .Pp | ||
115 | See | ||
116 | .Sx PATTERNS | ||
117 | for more information on patterns. | ||
118 | .It Cm AddressFamily | 118 | .It Cm AddressFamily |
119 | Specifies which address family to use when connecting. | 119 | Specifies which address family to use when connecting. |
120 | Valid arguments are | 120 | Valid arguments are |
121 | .Dq any , | 121 | .Dq any , |
122 | .Dq inet | 122 | .Dq inet |
123 | (use IPv4 only) or | 123 | (use IPv4 only), or |
124 | .Dq inet6 | 124 | .Dq inet6 |
125 | (use IPv6 only). | 125 | (use IPv6 only). |
126 | .It Cm BatchMode | 126 | .It Cm BatchMode |
@@ -144,7 +144,7 @@ Note that this option does not work if | |||
144 | is set to | 144 | is set to |
145 | .Dq yes . | 145 | .Dq yes . |
146 | .It Cm ChallengeResponseAuthentication | 146 | .It Cm ChallengeResponseAuthentication |
147 | Specifies whether to use challenge response authentication. | 147 | Specifies whether to use challenge-response authentication. |
148 | The argument to this keyword must be | 148 | The argument to this keyword must be |
149 | .Dq yes | 149 | .Dq yes |
150 | or | 150 | or |
@@ -154,7 +154,8 @@ The default is | |||
154 | .It Cm CheckHostIP | 154 | .It Cm CheckHostIP |
155 | If this flag is set to | 155 | If this flag is set to |
156 | .Dq yes , | 156 | .Dq yes , |
157 | ssh will additionally check the host IP address in the | 157 | .Xr ssh 1 |
158 | will additionally check the host IP address in the | ||
158 | .Pa known_hosts | 159 | .Pa known_hosts |
159 | file. | 160 | file. |
160 | This allows ssh to detect if a host key changed due to DNS spoofing. | 161 | This allows ssh to detect if a host key changed due to DNS spoofing. |
@@ -174,7 +175,7 @@ and | |||
174 | are supported. | 175 | are supported. |
175 | .Ar des | 176 | .Ar des |
176 | is only supported in the | 177 | is only supported in the |
177 | .Nm ssh | 178 | .Xr ssh 1 |
178 | client for interoperability with legacy protocol 1 implementations | 179 | client for interoperability with legacy protocol 1 implementations |
179 | that do not support the | 180 | that do not support the |
180 | .Ar 3des | 181 | .Ar 3des |
@@ -200,18 +201,18 @@ The supported ciphers are | |||
200 | .Dq blowfish-cbc , | 201 | .Dq blowfish-cbc , |
201 | and | 202 | and |
202 | .Dq cast128-cbc . | 203 | .Dq cast128-cbc . |
203 | The default is | 204 | The default is: |
204 | .Bd -literal | 205 | .Bd -literal -offset 3n |
205 | ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, | 206 | aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, |
206 | arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, | 207 | arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, |
207 | aes192-ctr,aes256-ctr'' | 208 | aes192-ctr,aes256-ctr |
208 | .Ed | 209 | .Ed |
209 | .It Cm ClearAllForwardings | 210 | .It Cm ClearAllForwardings |
210 | Specifies that all local, remote and dynamic port forwardings | 211 | Specifies that all local, remote, and dynamic port forwardings |
211 | specified in the configuration files or on the command line be | 212 | specified in the configuration files or on the command line be |
212 | cleared. | 213 | cleared. |
213 | This option is primarily useful when used from the | 214 | This option is primarily useful when used from the |
214 | .Nm ssh | 215 | .Xr ssh 1 |
215 | command line to clear port forwardings set in | 216 | command line to clear port forwardings set in |
216 | configuration files, and is automatically set by | 217 | configuration files, and is automatically set by |
217 | .Xr scp 1 | 218 | .Xr scp 1 |
@@ -244,15 +245,15 @@ The argument must be an integer. | |||
244 | This may be useful in scripts if the connection sometimes fails. | 245 | This may be useful in scripts if the connection sometimes fails. |
245 | The default is 1. | 246 | The default is 1. |
246 | .It Cm ConnectTimeout | 247 | .It Cm ConnectTimeout |
247 | Specifies the timeout (in seconds) used when connecting to the ssh | 248 | Specifies the timeout (in seconds) used when connecting to the |
248 | server, instead of using the default system TCP timeout. | 249 | SSH server, instead of using the default system TCP timeout. |
249 | This value is used only when the target is down or really unreachable, | 250 | This value is used only when the target is down or really unreachable, |
250 | not when it refuses the connection. | 251 | not when it refuses the connection. |
251 | .It Cm ControlMaster | 252 | .It Cm ControlMaster |
252 | Enables the sharing of multiple sessions over a single network connection. | 253 | Enables the sharing of multiple sessions over a single network connection. |
253 | When set to | 254 | When set to |
254 | .Dq yes | 255 | .Dq yes , |
255 | .Nm ssh | 256 | .Xr ssh 1 |
256 | will listen for connections on a control socket specified using the | 257 | will listen for connections on a control socket specified using the |
257 | .Cm ControlPath | 258 | .Cm ControlPath |
258 | argument. | 259 | argument. |
@@ -269,8 +270,7 @@ if the control socket does not exist, or is not listening. | |||
269 | .Pp | 270 | .Pp |
270 | Setting this to | 271 | Setting this to |
271 | .Dq ask | 272 | .Dq ask |
272 | will cause | 273 | will cause ssh |
273 | .Nm ssh | ||
274 | to listen for control connections, but require confirmation using the | 274 | to listen for control connections, but require confirmation using the |
275 | .Ev SSH_ASKPASS | 275 | .Ev SSH_ASKPASS |
276 | program before they are accepted (see | 276 | program before they are accepted (see |
@@ -278,9 +278,8 @@ program before they are accepted (see | |||
278 | for details). | 278 | for details). |
279 | If the | 279 | If the |
280 | .Cm ControlPath | 280 | .Cm ControlPath |
281 | can not be opened, | 281 | cannot be opened, |
282 | .Nm ssh | 282 | ssh will continue without connecting to a master instance. |
283 | will continue without connecting to a master instance. | ||
284 | .Pp | 283 | .Pp |
285 | X11 and | 284 | X11 and |
286 | .Xr ssh-agent 1 | 285 | .Xr ssh-agent 1 |
@@ -306,16 +305,18 @@ section above or the string | |||
306 | .Dq none | 305 | .Dq none |
307 | to disable connection sharing. | 306 | to disable connection sharing. |
308 | In the path, | 307 | In the path, |
308 | .Ql %l | ||
309 | will be substituted by the local host name, | ||
309 | .Ql %h | 310 | .Ql %h |
310 | will be substituted by the target host name, | 311 | will be substituted by the target host name, |
311 | .Ql %p | 312 | .Ql %p |
312 | the port and | 313 | the port, and |
313 | .Ql %r | 314 | .Ql %r |
314 | by the remote login username. | 315 | by the remote login username. |
315 | It is recommended that any | 316 | It is recommended that any |
316 | .Cm ControlPath | 317 | .Cm ControlPath |
317 | used for opportunistic connection sharing include | 318 | used for opportunistic connection sharing include |
318 | all three of these escape sequences. | 319 | at least %h, %p, and %r. |
319 | This ensures that shared connections are uniquely identified. | 320 | This ensures that shared connections are uniquely identified. |
320 | .It Cm DynamicForward | 321 | .It Cm DynamicForward |
321 | Specifies that a TCP port on the local machine be forwarded | 322 | Specifies that a TCP port on the local machine be forwarded |
@@ -346,7 +347,7 @@ empty address or | |||
346 | indicates that the port should be available from all interfaces. | 347 | indicates that the port should be available from all interfaces. |
347 | .Pp | 348 | .Pp |
348 | Currently the SOCKS4 and SOCKS5 protocols are supported, and | 349 | Currently the SOCKS4 and SOCKS5 protocols are supported, and |
349 | .Nm ssh | 350 | .Xr ssh 1 |
350 | will act as a SOCKS server. | 351 | will act as a SOCKS server. |
351 | Multiple forwardings may be specified, and | 352 | Multiple forwardings may be specified, and |
352 | additional forwardings can be given on the command line. | 353 | additional forwardings can be given on the command line. |
@@ -382,6 +383,17 @@ followed by a letter, or | |||
382 | to disable the escape | 383 | to disable the escape |
383 | character entirely (making the connection transparent for binary | 384 | character entirely (making the connection transparent for binary |
384 | data). | 385 | data). |
386 | .It Cm ExitOnForwardFailure | ||
387 | Specifies whether | ||
388 | .Xr ssh 1 | ||
389 | should terminate the connection if it cannot set up all requested | ||
390 | dynamic, local, and remote port forwardings. | ||
391 | The argument must be | ||
392 | .Dq yes | ||
393 | or | ||
394 | .Dq no . | ||
395 | The default is | ||
396 | .Dq no . | ||
385 | .It Cm ForwardAgent | 397 | .It Cm ForwardAgent |
386 | Specifies whether the connection to the authentication agent (if any) | 398 | Specifies whether the connection to the authentication agent (if any) |
387 | will be forwarded to the remote machine. | 399 | will be forwarded to the remote machine. |
@@ -421,12 +433,12 @@ if the | |||
421 | option is also enabled. | 433 | option is also enabled. |
422 | .It Cm ForwardX11Trusted | 434 | .It Cm ForwardX11Trusted |
423 | If this option is set to | 435 | If this option is set to |
424 | .Dq yes | 436 | .Dq yes , |
425 | then remote X11 clients will have full access to the original X11 display. | 437 | remote X11 clients will have full access to the original X11 display. |
426 | .Pp | 438 | .Pp |
427 | If this option is set to | 439 | If this option is set to |
428 | .Dq no | 440 | .Dq no , |
429 | then remote X11 clients will be considered untrusted and prevented | 441 | remote X11 clients will be considered untrusted and prevented |
430 | from stealing or tampering with data belonging to trusted X11 | 442 | from stealing or tampering with data belonging to trusted X11 |
431 | clients. | 443 | clients. |
432 | Furthermore, the | 444 | Furthermore, the |
@@ -443,12 +455,11 @@ the restrictions imposed on untrusted clients. | |||
443 | Specifies whether remote hosts are allowed to connect to local | 455 | Specifies whether remote hosts are allowed to connect to local |
444 | forwarded ports. | 456 | forwarded ports. |
445 | By default, | 457 | By default, |
446 | .Nm ssh | 458 | .Xr ssh 1 |
447 | binds local port forwardings to the loopback address. | 459 | binds local port forwardings to the loopback address. |
448 | This prevents other remote hosts from connecting to forwarded ports. | 460 | This prevents other remote hosts from connecting to forwarded ports. |
449 | .Cm GatewayPorts | 461 | .Cm GatewayPorts |
450 | can be used to specify that | 462 | can be used to specify that ssh |
451 | .Nm ssh | ||
452 | should bind local port forwardings to the wildcard address, | 463 | should bind local port forwardings to the wildcard address, |
453 | thus allowing remote hosts to connect to forwarded ports. | 464 | thus allowing remote hosts to connect to forwarded ports. |
454 | The argument must be | 465 | The argument must be |
@@ -466,6 +477,12 @@ Specifies whether user authentication based on GSSAPI is allowed. | |||
466 | The default is | 477 | The default is |
467 | .Dq no . | 478 | .Dq no . |
468 | Note that this option applies to protocol version 2 only. | 479 | Note that this option applies to protocol version 2 only. |
480 | .It Cm GSSAPIKeyExchange | ||
481 | Specifies whether key exchange based on GSSAPI may be used. When using | ||
482 | GSSAPI key exchange the server need not have a host key. | ||
483 | The default is | ||
484 | .Dq no . | ||
485 | Note that this option applies to protocol version 2 only. | ||
469 | .It Cm GSSAPIDelegateCredentials | 486 | .It Cm GSSAPIDelegateCredentials |
470 | Forward (delegate) credentials to the server. | 487 | Forward (delegate) credentials to the server. |
471 | The default is | 488 | The default is |
@@ -473,29 +490,31 @@ The default is | |||
473 | Note that this option applies to protocol version 2 only. | 490 | Note that this option applies to protocol version 2 only. |
474 | .It Cm GSSAPITrustDns | 491 | .It Cm GSSAPITrustDns |
475 | Set to | 492 | Set to |
476 | .Dq yes to indicate that the DNS is trusted to securely canonicalize | 493 | .Dq yes |
494 | to indicate that the DNS is trusted to securely canonicalize | ||
477 | the name of the host being connected to. If | 495 | the name of the host being connected to. If |
478 | .Dq no, the hostname entered on the | 496 | .Dq no , |
497 | the hostname entered on the | ||
479 | command line will be passed untouched to the GSSAPI library. | 498 | command line will be passed untouched to the GSSAPI library. |
480 | The default is | 499 | The default is |
481 | .Dq no . | 500 | .Dq no . |
482 | This option only applies to protocol version 2 connections using GSSAPI | 501 | This option only applies to protocol version 2 connections using GSSAPI. |
483 | key exchange. | ||
484 | .It Cm HashKnownHosts | 502 | .It Cm HashKnownHosts |
485 | Indicates that | 503 | Indicates that |
486 | .Nm ssh | 504 | .Xr ssh 1 |
487 | should hash host names and addresses when they are added to | 505 | should hash host names and addresses when they are added to |
488 | .Pa ~/.ssh/known_hosts . | 506 | .Pa ~/.ssh/known_hosts . |
489 | These hashed names may be used normally by | 507 | These hashed names may be used normally by |
490 | .Nm ssh | 508 | .Xr ssh 1 |
491 | and | 509 | and |
492 | .Nm sshd , | 510 | .Xr sshd 8 , |
493 | but they do not reveal identifying information should the file's contents | 511 | but they do not reveal identifying information should the file's contents |
494 | be disclosed. | 512 | be disclosed. |
495 | The default is | 513 | The default is |
496 | .Dq no . | 514 | .Dq no . |
497 | Note that hashing of names and addresses will not be retrospectively applied | 515 | Note that existing names and addresses in known hosts files |
498 | to existing known hosts files, but these may be manually hashed using | 516 | will not be converted automatically, |
517 | but may be manually hashed using | ||
499 | .Xr ssh-keygen 1 . | 518 | .Xr ssh-keygen 1 . |
500 | .It Cm HostbasedAuthentication | 519 | .It Cm HostbasedAuthentication |
501 | Specifies whether to try rhosts based authentication with public key | 520 | Specifies whether to try rhosts based authentication with public key |
@@ -518,30 +537,29 @@ The default for this option is: | |||
518 | Specifies an alias that should be used instead of the | 537 | Specifies an alias that should be used instead of the |
519 | real host name when looking up or saving the host key | 538 | real host name when looking up or saving the host key |
520 | in the host key database files. | 539 | in the host key database files. |
521 | This option is useful for tunneling ssh connections | 540 | This option is useful for tunneling SSH connections |
522 | or for multiple servers running on a single host. | 541 | or for multiple servers running on a single host. |
523 | .It Cm HostName | 542 | .It Cm HostName |
524 | Specifies the real host name to log into. | 543 | Specifies the real host name to log into. |
525 | This can be used to specify nicknames or abbreviations for hosts. | 544 | This can be used to specify nicknames or abbreviations for hosts. |
526 | Default is the name given on the command line. | 545 | The default is the name given on the command line. |
527 | Numeric IP addresses are also permitted (both on the command line and in | 546 | Numeric IP addresses are also permitted (both on the command line and in |
528 | .Cm HostName | 547 | .Cm HostName |
529 | specifications). | 548 | specifications). |
530 | .It Cm IdentitiesOnly | 549 | .It Cm IdentitiesOnly |
531 | Specifies that | 550 | Specifies that |
532 | .Nm ssh | 551 | .Xr ssh 1 |
533 | should only use the authentication identity files configured in the | 552 | should only use the authentication identity files configured in the |
534 | .Nm | 553 | .Nm |
535 | files, | 554 | files, |
536 | even if the | 555 | even if |
537 | .Nm ssh-agent | 556 | .Xr ssh-agent 1 |
538 | offers more identities. | 557 | offers more identities. |
539 | The argument to this keyword must be | 558 | The argument to this keyword must be |
540 | .Dq yes | 559 | .Dq yes |
541 | or | 560 | or |
542 | .Dq no . | 561 | .Dq no . |
543 | This option is intended for situations where | 562 | This option is intended for situations where ssh-agent |
544 | .Nm ssh-agent | ||
545 | offers many different identities. | 563 | offers many different identities. |
546 | The default is | 564 | The default is |
547 | .Dq no . | 565 | .Dq no . |
@@ -557,8 +575,21 @@ and | |||
557 | for protocol version 2. | 575 | for protocol version 2. |
558 | Additionally, any identities represented by the authentication agent | 576 | Additionally, any identities represented by the authentication agent |
559 | will be used for authentication. | 577 | will be used for authentication. |
578 | .Pp | ||
560 | The file name may use the tilde | 579 | The file name may use the tilde |
561 | syntax to refer to a user's home directory. | 580 | syntax to refer to a user's home directory or one of the following |
581 | escape characters: | ||
582 | .Ql %d | ||
583 | (local user's home directory), | ||
584 | .Ql %u | ||
585 | (local user name), | ||
586 | .Ql %l | ||
587 | (local host name), | ||
588 | .Ql %h | ||
589 | (remote host name) or | ||
590 | .Ql %r | ||
591 | (remote user name). | ||
592 | .Pp | ||
562 | It is possible to have | 593 | It is possible to have |
563 | multiple identity files specified in configuration files; all these | 594 | multiple identity files specified in configuration files; all these |
564 | identities will be tried in sequence. | 595 | identities will be tried in sequence. |
@@ -566,6 +597,13 @@ identities will be tried in sequence. | |||
566 | Specifies the list of methods to use in keyboard-interactive authentication. | 597 | Specifies the list of methods to use in keyboard-interactive authentication. |
567 | Multiple method names must be comma-separated. | 598 | Multiple method names must be comma-separated. |
568 | The default is to use the server specified list. | 599 | The default is to use the server specified list. |
600 | The methods available vary depending on what the server supports. | ||
601 | For an OpenSSH server, | ||
602 | it may be zero or more of: | ||
603 | .Dq bsdauth , | ||
604 | .Dq pam , | ||
605 | and | ||
606 | .Dq skey . | ||
569 | .It Cm LocalCommand | 607 | .It Cm LocalCommand |
570 | Specifies a command to execute on the local machine after successfully | 608 | Specifies a command to execute on the local machine after successfully |
571 | connecting to the server. | 609 | connecting to the server. |
@@ -607,9 +645,9 @@ empty address or | |||
607 | indicates that the port should be available from all interfaces. | 645 | indicates that the port should be available from all interfaces. |
608 | .It Cm LogLevel | 646 | .It Cm LogLevel |
609 | Gives the verbosity level that is used when logging messages from | 647 | Gives the verbosity level that is used when logging messages from |
610 | .Nm ssh . | 648 | .Xr ssh 1 . |
611 | The possible values are: | 649 | The possible values are: |
612 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. | 650 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. |
613 | The default is INFO. | 651 | The default is INFO. |
614 | DEBUG and DEBUG1 are equivalent. | 652 | DEBUG and DEBUG1 are equivalent. |
615 | DEBUG2 and DEBUG3 each specify higher levels of verbose output. | 653 | DEBUG2 and DEBUG3 each specify higher levels of verbose output. |
@@ -619,7 +657,7 @@ in order of preference. | |||
619 | The MAC algorithm is used in protocol version 2 | 657 | The MAC algorithm is used in protocol version 2 |
620 | for data integrity protection. | 658 | for data integrity protection. |
621 | Multiple algorithms must be comma-separated. | 659 | Multiple algorithms must be comma-separated. |
622 | The default is | 660 | The default is: |
623 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . | 661 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . |
624 | .It Cm NoHostAuthenticationForLocalhost | 662 | .It Cm NoHostAuthenticationForLocalhost |
625 | This option can be used if the home directory is shared across machines. | 663 | This option can be used if the home directory is shared across machines. |
@@ -634,7 +672,7 @@ The default is to check the host key for localhost. | |||
634 | .It Cm NumberOfPasswordPrompts | 672 | .It Cm NumberOfPasswordPrompts |
635 | Specifies the number of password prompts before giving up. | 673 | Specifies the number of password prompts before giving up. |
636 | The argument to this keyword must be an integer. | 674 | The argument to this keyword must be an integer. |
637 | Default is 3. | 675 | The default is 3. |
638 | .It Cm PasswordAuthentication | 676 | .It Cm PasswordAuthentication |
639 | Specifies whether to use password authentication. | 677 | Specifies whether to use password authentication. |
640 | The argument to this keyword must be | 678 | The argument to this keyword must be |
@@ -658,7 +696,7 @@ The default is | |||
658 | .Dq no . | 696 | .Dq no . |
659 | .It Cm Port | 697 | .It Cm Port |
660 | Specifies the port number to connect on the remote host. | 698 | Specifies the port number to connect on the remote host. |
661 | Default is 22. | 699 | The default is 22. |
662 | .It Cm PreferredAuthentications | 700 | .It Cm PreferredAuthentications |
663 | Specifies the order in which the client should try protocol 2 | 701 | Specifies the order in which the client should try protocol 2 |
664 | authentication methods. | 702 | authentication methods. |
@@ -667,20 +705,24 @@ This allows a client to prefer one method (e.g.\& | |||
667 | over another method (e.g.\& | 705 | over another method (e.g.\& |
668 | .Cm password ) | 706 | .Cm password ) |
669 | The default for this option is: | 707 | The default for this option is: |
670 | .Dq hostbased,publickey,keyboard-interactive,password . | 708 | .Do gssapi-with-mic , |
709 | hostbased, | ||
710 | publickey, | ||
711 | keyboard-interactive, | ||
712 | password | ||
713 | .Dc . | ||
671 | .It Cm Protocol | 714 | .It Cm Protocol |
672 | Specifies the protocol versions | 715 | Specifies the protocol versions |
673 | .Nm ssh | 716 | .Xr ssh 1 |
674 | should support in order of preference. | 717 | should support in order of preference. |
675 | The possible values are | 718 | The possible values are |
676 | .Dq 1 | 719 | .Sq 1 |
677 | and | 720 | and |
678 | .Dq 2 . | 721 | .Sq 2 . |
679 | Multiple versions must be comma-separated. | 722 | Multiple versions must be comma-separated. |
680 | The default is | 723 | The default is |
681 | .Dq 2,1 . | 724 | .Dq 2,1 . |
682 | This means that | 725 | This means that ssh |
683 | .Nm ssh | ||
684 | tries version 2 and falls back to version 1 | 726 | tries version 2 and falls back to version 1 |
685 | if version 2 is not available. | 727 | if version 2 is not available. |
686 | .It Cm ProxyCommand | 728 | .It Cm ProxyCommand |
@@ -738,9 +780,9 @@ or | |||
738 | .Sq G | 780 | .Sq G |
739 | to indicate Kilobytes, Megabytes, or Gigabytes, respectively. | 781 | to indicate Kilobytes, Megabytes, or Gigabytes, respectively. |
740 | The default is between | 782 | The default is between |
741 | .Dq 1G | 783 | .Sq 1G |
742 | and | 784 | and |
743 | .Dq 4G , | 785 | .Sq 4G , |
744 | depending on the cipher. | 786 | depending on the cipher. |
745 | This option applies to protocol version 2 only. | 787 | This option applies to protocol version 2 only. |
746 | .It Cm RemoteForward | 788 | .It Cm RemoteForward |
@@ -786,7 +828,7 @@ or | |||
786 | The default is | 828 | The default is |
787 | .Dq no . | 829 | .Dq no . |
788 | This option applies to protocol version 1 only and requires | 830 | This option applies to protocol version 1 only and requires |
789 | .Nm ssh | 831 | .Xr ssh 1 |
790 | to be setuid root. | 832 | to be setuid root. |
791 | .It Cm RSAAuthentication | 833 | .It Cm RSAAuthentication |
792 | Specifies whether to try RSA authentication. | 834 | Specifies whether to try RSA authentication. |
@@ -804,31 +846,31 @@ Note that this option applies to protocol version 1 only. | |||
804 | Specifies what variables from the local | 846 | Specifies what variables from the local |
805 | .Xr environ 7 | 847 | .Xr environ 7 |
806 | should be sent to the server. | 848 | should be sent to the server. |
807 | Note that environment passing is only supported for protocol 2, the | 849 | Note that environment passing is only supported for protocol 2. |
808 | server must also support it, and the server must be configured to | 850 | The server must also support it, and the server must be configured to |
809 | accept these environment variables. | 851 | accept these environment variables. |
810 | Refer to | 852 | Refer to |
811 | .Cm AcceptEnv | 853 | .Cm AcceptEnv |
812 | in | 854 | in |
813 | .Xr sshd_config 5 | 855 | .Xr sshd_config 5 |
814 | for how to configure the server. | 856 | for how to configure the server. |
815 | Variables are specified by name, which may contain the wildcard characters | 857 | Variables are specified by name, which may contain wildcard characters. |
816 | .Ql \&* | ||
817 | and | ||
818 | .Ql \&? . | ||
819 | Multiple environment variables may be separated by whitespace or spread | 858 | Multiple environment variables may be separated by whitespace or spread |
820 | across multiple | 859 | across multiple |
821 | .Cm SendEnv | 860 | .Cm SendEnv |
822 | directives. | 861 | directives. |
823 | The default is not to send any environment variables. | 862 | The default is not to send any environment variables. |
863 | .Pp | ||
864 | See | ||
865 | .Sx PATTERNS | ||
866 | for more information on patterns. | ||
824 | .It Cm ServerAliveCountMax | 867 | .It Cm ServerAliveCountMax |
825 | Sets the number of server alive messages (see below) which may be | 868 | Sets the number of server alive messages (see below) which may be |
826 | sent without | 869 | sent without |
827 | .Nm ssh | 870 | .Xr ssh 1 |
828 | receiving any messages back from the server. | 871 | receiving any messages back from the server. |
829 | If this threshold is reached while server alive messages are being sent, | 872 | If this threshold is reached while server alive messages are being sent, |
830 | .Nm ssh | 873 | ssh will disconnect from the server, terminating the session. |
831 | will disconnect from the server, terminating the session. | ||
832 | It is important to note that the use of server alive messages is very | 874 | It is important to note that the use of server alive messages is very |
833 | different from | 875 | different from |
834 | .Cm TCPKeepAlive | 876 | .Cm TCPKeepAlive |
@@ -844,14 +886,15 @@ server depend on knowing when a connection has become inactive. | |||
844 | The default value is 3. | 886 | The default value is 3. |
845 | If, for example, | 887 | If, for example, |
846 | .Cm ServerAliveInterval | 888 | .Cm ServerAliveInterval |
847 | (see below) is set to 15, and | 889 | (see below) is set to 15 and |
848 | .Cm ServerAliveCountMax | 890 | .Cm ServerAliveCountMax |
849 | is left at the default, if the server becomes unresponsive ssh | 891 | is left at the default, if the server becomes unresponsive, |
850 | will disconnect after approximately 45 seconds. | 892 | ssh will disconnect after approximately 45 seconds. |
893 | This option applies to protocol version 2 only. | ||
851 | .It Cm ServerAliveInterval | 894 | .It Cm ServerAliveInterval |
852 | Sets a timeout interval in seconds after which if no data has been received | 895 | Sets a timeout interval in seconds after which if no data has been received |
853 | from the server, | 896 | from the server, |
854 | .Nm ssh | 897 | .Xr ssh 1 |
855 | will send a message through the encrypted | 898 | will send a message through the encrypted |
856 | channel to request a response from the server. | 899 | channel to request a response from the server. |
857 | The default | 900 | The default |
@@ -860,41 +903,39 @@ This option applies to protocol version 2 only. | |||
860 | .It Cm SmartcardDevice | 903 | .It Cm SmartcardDevice |
861 | Specifies which smartcard device to use. | 904 | Specifies which smartcard device to use. |
862 | The argument to this keyword is the device | 905 | The argument to this keyword is the device |
863 | .Nm ssh | 906 | .Xr ssh 1 |
864 | should use to communicate with a smartcard used for storing the user's | 907 | should use to communicate with a smartcard used for storing the user's |
865 | private RSA key. | 908 | private RSA key. |
866 | By default, no device is specified and smartcard support is not activated. | 909 | By default, no device is specified and smartcard support is not activated. |
867 | .It Cm StrictHostKeyChecking | 910 | .It Cm StrictHostKeyChecking |
868 | If this flag is set to | 911 | If this flag is set to |
869 | .Dq yes , | 912 | .Dq yes , |
870 | .Nm ssh | 913 | .Xr ssh 1 |
871 | will never automatically add host keys to the | 914 | will never automatically add host keys to the |
872 | .Pa ~/.ssh/known_hosts | 915 | .Pa ~/.ssh/known_hosts |
873 | file, and refuses to connect to hosts whose host key has changed. | 916 | file, and refuses to connect to hosts whose host key has changed. |
874 | This provides maximum protection against trojan horse attacks, | 917 | This provides maximum protection against trojan horse attacks, |
875 | however, can be annoying when the | 918 | though it can be annoying when the |
876 | .Pa /etc/ssh/ssh_known_hosts | 919 | .Pa /etc/ssh/ssh_known_hosts |
877 | file is poorly maintained, or connections to new hosts are | 920 | file is poorly maintained or when connections to new hosts are |
878 | frequently made. | 921 | frequently made. |
879 | This option forces the user to manually | 922 | This option forces the user to manually |
880 | add all new hosts. | 923 | add all new hosts. |
881 | If this flag is set to | 924 | If this flag is set to |
882 | .Dq no , | 925 | .Dq no , |
883 | .Nm ssh | 926 | ssh will automatically add new host keys to the |
884 | will automatically add new host keys to the | ||
885 | user known hosts files. | 927 | user known hosts files. |
886 | If this flag is set to | 928 | If this flag is set to |
887 | .Dq ask , | 929 | .Dq ask , |
888 | new host keys | 930 | new host keys |
889 | will be added to the user known host files only after the user | 931 | will be added to the user known host files only after the user |
890 | has confirmed that is what they really want to do, and | 932 | has confirmed that is what they really want to do, and |
891 | .Nm ssh | 933 | ssh will refuse to connect to hosts whose host key has changed. |
892 | will refuse to connect to hosts whose host key has changed. | ||
893 | The host keys of | 934 | The host keys of |
894 | known hosts will be verified automatically in all cases. | 935 | known hosts will be verified automatically in all cases. |
895 | The argument must be | 936 | The argument must be |
896 | .Dq yes , | 937 | .Dq yes , |
897 | .Dq no | 938 | .Dq no , |
898 | or | 939 | or |
899 | .Dq ask . | 940 | .Dq ask . |
900 | The default is | 941 | The default is |
@@ -917,24 +958,44 @@ This is important in scripts, and many users want it too. | |||
917 | To disable TCP keepalive messages, the value should be set to | 958 | To disable TCP keepalive messages, the value should be set to |
918 | .Dq no . | 959 | .Dq no . |
919 | .It Cm Tunnel | 960 | .It Cm Tunnel |
920 | Request starting | 961 | Request |
921 | .Xr tun 4 | 962 | .Xr tun 4 |
922 | device forwarding between the client and the server. | 963 | device forwarding between the client and the server. |
923 | This option also allows requesting layer 2 (ethernet) | ||
924 | instead of layer 3 (point-to-point) tunneling from the server. | ||
925 | The argument must be | 964 | The argument must be |
926 | .Dq yes , | 965 | .Dq yes , |
927 | .Dq point-to-point , | 966 | .Dq point-to-point |
967 | (layer 3), | ||
928 | .Dq ethernet | 968 | .Dq ethernet |
969 | (layer 2), | ||
929 | or | 970 | or |
930 | .Dq no . | 971 | .Dq no . |
972 | Specifying | ||
973 | .Dq yes | ||
974 | requests the default tunnel mode, which is | ||
975 | .Dq point-to-point . | ||
931 | The default is | 976 | The default is |
932 | .Dq no . | 977 | .Dq no . |
933 | .It Cm TunnelDevice | 978 | .It Cm TunnelDevice |
934 | Force a specified | 979 | Specifies the |
935 | .Xr tun 4 | 980 | .Xr tun 4 |
936 | device on the client. | 981 | devices to open on the client |
937 | Without this option, the next available device will be used. | 982 | .Pq Ar local_tun |
983 | and the server | ||
984 | .Pq Ar remote_tun . | ||
985 | .Pp | ||
986 | The argument must be | ||
987 | .Sm off | ||
988 | .Ar local_tun Op : Ar remote_tun . | ||
989 | .Sm on | ||
990 | The devices may be specified by numerical ID or the keyword | ||
991 | .Dq any , | ||
992 | which uses the next available tunnel device. | ||
993 | If | ||
994 | .Ar remote_tun | ||
995 | is not specified, it defaults to | ||
996 | .Dq any . | ||
997 | The default is | ||
998 | .Dq any:any . | ||
938 | .It Cm UsePrivilegedPort | 999 | .It Cm UsePrivilegedPort |
939 | Specifies whether to use a privileged port for outgoing connections. | 1000 | Specifies whether to use a privileged port for outgoing connections. |
940 | The argument must be | 1001 | The argument must be |
@@ -944,8 +1005,8 @@ or | |||
944 | The default is | 1005 | The default is |
945 | .Dq no . | 1006 | .Dq no . |
946 | If set to | 1007 | If set to |
947 | .Dq yes | 1008 | .Dq yes , |
948 | .Nm ssh | 1009 | .Xr ssh 1 |
949 | must be setuid root. | 1010 | must be setuid root. |
950 | Note that this option must be set to | 1011 | Note that this option must be set to |
951 | .Dq yes | 1012 | .Dq yes |
@@ -978,12 +1039,17 @@ need to confirm new host keys according to the | |||
978 | option. | 1039 | option. |
979 | The argument must be | 1040 | The argument must be |
980 | .Dq yes , | 1041 | .Dq yes , |
981 | .Dq no | 1042 | .Dq no , |
982 | or | 1043 | or |
983 | .Dq ask . | 1044 | .Dq ask . |
984 | The default is | 1045 | The default is |
985 | .Dq no . | 1046 | .Dq no . |
986 | Note that this option applies to protocol version 2 only. | 1047 | Note that this option applies to protocol version 2 only. |
1048 | .Pp | ||
1049 | See also | ||
1050 | .Sx VERIFYING HOST KEYS | ||
1051 | in | ||
1052 | .Xr ssh 1 . | ||
987 | .It Cm XAuthLocation | 1053 | .It Cm XAuthLocation |
988 | Specifies the full pathname of the | 1054 | Specifies the full pathname of the |
989 | .Xr xauth 1 | 1055 | .Xr xauth 1 |
@@ -991,14 +1057,47 @@ program. | |||
991 | The default is | 1057 | The default is |
992 | .Pa /usr/X11R6/bin/xauth . | 1058 | .Pa /usr/X11R6/bin/xauth . |
993 | .El | 1059 | .El |
1060 | .Sh PATTERNS | ||
1061 | A | ||
1062 | .Em pattern | ||
1063 | consists of zero or more non-whitespace characters, | ||
1064 | .Sq * | ||
1065 | (a wildcard that matches zero or more characters), | ||
1066 | or | ||
1067 | .Sq ?\& | ||
1068 | (a wildcard that matches exactly one character). | ||
1069 | For example, to specify a set of declarations for any host in the | ||
1070 | .Dq .co.uk | ||
1071 | set of domains, | ||
1072 | the following pattern could be used: | ||
1073 | .Pp | ||
1074 | .Dl Host *.co.uk | ||
1075 | .Pp | ||
1076 | The following pattern | ||
1077 | would match any host in the 192.168.0.[0-9] network range: | ||
1078 | .Pp | ||
1079 | .Dl Host 192.168.0.? | ||
1080 | .Pp | ||
1081 | A | ||
1082 | .Em pattern-list | ||
1083 | is a comma-separated list of patterns. | ||
1084 | Patterns within pattern-lists may be negated | ||
1085 | by preceding them with an exclamation mark | ||
1086 | .Pq Sq !\& . | ||
1087 | For example, | ||
1088 | to allow a key to be used from anywhere within an organisation | ||
1089 | except from the | ||
1090 | .Dq dialup | ||
1091 | pool, | ||
1092 | the following entry (in authorized_keys) could be used: | ||
1093 | .Pp | ||
1094 | .Dl from=\&"!*.dialup.example.com,*.example.com\&" | ||
994 | .Sh FILES | 1095 | .Sh FILES |
995 | .Bl -tag -width Ds | 1096 | .Bl -tag -width Ds |
996 | .It Pa ~/.ssh/config | 1097 | .It Pa ~/.ssh/config |
997 | This is the per-user configuration file. | 1098 | This is the per-user configuration file. |
998 | The format of this file is described above. | 1099 | The format of this file is described above. |
999 | This file is used by the | 1100 | This file is used by the SSH client. |
1000 | .Nm ssh | ||
1001 | client. | ||
1002 | Because of the potential for abuse, this file must have strict permissions: | 1101 | Because of the potential for abuse, this file must have strict permissions: |
1003 | read/write for the user, and not accessible by others. | 1102 | read/write for the user, and not accessible by others. |
1004 | .It Pa /etc/ssh/ssh_config | 1103 | .It Pa /etc/ssh/ssh_config |