Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 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 | .\" |
Damien Miller | 1faa713 | 2006-03-15 11:55:31 +1100 | [diff] [blame^] | 37 | .\" $OpenBSD: ssh_config.5,v 1.82 2006/02/24 20:22:16 jmc Exp $ |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 38 | .Dd September 25, 1999 |
| 39 | .Dt SSH_CONFIG 5 |
| 40 | .Os |
| 41 | .Sh NAME |
| 42 | .Nm ssh_config |
| 43 | .Nd OpenSSH SSH client configuration files |
| 44 | .Sh SYNOPSIS |
| 45 | .Bl -tag -width Ds -compact |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 46 | .It Pa ~/.ssh/config |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 47 | .It Pa /etc/ssh/ssh_config |
| 48 | .El |
| 49 | .Sh DESCRIPTION |
| 50 | .Nm ssh |
| 51 | obtains configuration data from the following sources in |
| 52 | the following order: |
Damien Miller | 5c853b5 | 2006-03-15 11:37:02 +1100 | [diff] [blame] | 53 | .Pp |
Ben Lindstrom | 479b476 | 2002-08-20 19:04:51 +0000 | [diff] [blame] | 54 | .Bl -enum -offset indent -compact |
| 55 | .It |
| 56 | command-line options |
| 57 | .It |
| 58 | user's configuration file |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 59 | .Pq Pa ~/.ssh/config |
Ben Lindstrom | 479b476 | 2002-08-20 19:04:51 +0000 | [diff] [blame] | 60 | .It |
| 61 | system-wide configuration file |
| 62 | .Pq Pa /etc/ssh/ssh_config |
| 63 | .El |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 64 | .Pp |
| 65 | For each parameter, the first obtained value |
| 66 | will be used. |
Darren Tucker | 43d8e28 | 2005-02-09 09:51:08 +1100 | [diff] [blame] | 67 | The configuration files contain sections separated by |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 68 | .Dq Host |
| 69 | specifications, and that section is only applied for hosts that |
| 70 | match one of the patterns given in the specification. |
| 71 | The matched host name is the one given on the command line. |
| 72 | .Pp |
| 73 | Since the first obtained value for each parameter is used, more |
| 74 | host-specific declarations should be given near the beginning of the |
| 75 | file, and general defaults at the end. |
Damien Miller | 6def551 | 2006-03-15 11:54:05 +1100 | [diff] [blame] | 76 | .Sh PATTERNS |
| 77 | A |
| 78 | .Em pattern |
| 79 | consists of zero or more non-whitespace characters, |
| 80 | .Sq * |
| 81 | (a wildcard that matches zero or more characters), |
| 82 | or |
| 83 | .Sq ?\& |
| 84 | (a wildcard that matches exactly one character). |
| 85 | For example, to specify a set of declarations for any host in the |
| 86 | .Dq .co.uk |
| 87 | set of domains, |
| 88 | the following pattern could be used: |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 89 | .Pp |
Damien Miller | 6def551 | 2006-03-15 11:54:05 +1100 | [diff] [blame] | 90 | .Dl Host *.co.uk |
| 91 | .Pp |
| 92 | The following pattern |
| 93 | would match any host in the 192.168.0.[0-9] network range: |
| 94 | .Pp |
| 95 | .Dl Host 192.168.0.? |
| 96 | .Pp |
| 97 | A |
| 98 | .Em pattern-list |
| 99 | is a comma-separated list of patterns. |
| 100 | Patterns within pattern-lists may be negated |
| 101 | by preceding them with an exclamation mark |
| 102 | .Pq Sq !\& . |
| 103 | For example, |
| 104 | to allow a key to be used from anywhere within an organisation |
| 105 | except from the |
| 106 | .Dq dialup |
| 107 | pool, |
| 108 | the following entry (in authorized_keys) could be used: |
| 109 | .Pp |
| 110 | .Dl from=\&"!*.dialup.example.com,*.example.com\&" |
| 111 | .Sh FILE FORMAT |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 112 | The configuration file has the following format: |
| 113 | .Pp |
| 114 | Empty lines and lines starting with |
| 115 | .Ql # |
| 116 | are comments. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 117 | Otherwise a line is of the format |
| 118 | .Dq keyword arguments . |
| 119 | Configuration options may be separated by whitespace or |
| 120 | optional whitespace and exactly one |
| 121 | .Ql = ; |
| 122 | the latter format is useful to avoid the need to quote whitespace |
| 123 | when specifying configuration options using the |
| 124 | .Nm ssh , |
| 125 | .Nm scp |
| 126 | and |
| 127 | .Nm sftp |
| 128 | .Fl o |
| 129 | option. |
| 130 | .Pp |
| 131 | The possible |
| 132 | keywords and their meanings are as follows (note that |
| 133 | keywords are case-insensitive and arguments are case-sensitive): |
| 134 | .Bl -tag -width Ds |
| 135 | .It Cm Host |
| 136 | Restricts the following declarations (up to the next |
| 137 | .Cm Host |
| 138 | keyword) to be only for those hosts that match one of the patterns |
| 139 | given after the keyword. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 140 | A single |
| 141 | .Ql \&* |
| 142 | as a pattern can be used to provide global |
| 143 | defaults for all hosts. |
| 144 | The host is the |
| 145 | .Ar hostname |
| 146 | argument given on the command line (i.e., the name is not converted to |
| 147 | a canonicalized host name before matching). |
Damien Miller | f54a4b9 | 2006-03-15 11:54:36 +1100 | [diff] [blame] | 148 | .Pp |
| 149 | See |
| 150 | .Sx PATTERNS |
| 151 | for more information on patterns. |
Damien Miller | 20a8f97 | 2003-05-18 20:50:30 +1000 | [diff] [blame] | 152 | .It Cm AddressFamily |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 153 | Specifies which address family to use when connecting. |
| 154 | Valid arguments are |
Damien Miller | 20a8f97 | 2003-05-18 20:50:30 +1000 | [diff] [blame] | 155 | .Dq any , |
| 156 | .Dq inet |
Darren Tucker | 79a7acf | 2005-02-09 09:48:57 +1100 | [diff] [blame] | 157 | (use IPv4 only) or |
Damien Miller | 20a8f97 | 2003-05-18 20:50:30 +1000 | [diff] [blame] | 158 | .Dq inet6 |
Darren Tucker | 79a7acf | 2005-02-09 09:48:57 +1100 | [diff] [blame] | 159 | (use IPv6 only). |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 160 | .It Cm BatchMode |
| 161 | If set to |
| 162 | .Dq yes , |
| 163 | passphrase/password querying will be disabled. |
| 164 | This option is useful in scripts and other batch jobs where no user |
| 165 | is present to supply the password. |
| 166 | The argument must be |
| 167 | .Dq yes |
| 168 | or |
| 169 | .Dq no . |
| 170 | The default is |
| 171 | .Dq no . |
| 172 | .It Cm BindAddress |
Darren Tucker | 89f4d47 | 2005-07-14 17:06:21 +1000 | [diff] [blame] | 173 | Use the specified address on the local machine as the source address of |
Darren Tucker | 6c71d20 | 2005-07-14 17:06:50 +1000 | [diff] [blame] | 174 | the connection. |
| 175 | Only useful on systems with more than one address. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 176 | Note that this option does not work if |
| 177 | .Cm UsePrivilegedPort |
| 178 | is set to |
| 179 | .Dq yes . |
| 180 | .It Cm ChallengeResponseAuthentication |
Damien Miller | 1faa713 | 2006-03-15 11:55:31 +1100 | [diff] [blame^] | 181 | Specifies whether to use challenge-response authentication. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 182 | The argument to this keyword must be |
| 183 | .Dq yes |
| 184 | or |
| 185 | .Dq no . |
| 186 | The default is |
| 187 | .Dq yes . |
| 188 | .It Cm CheckHostIP |
| 189 | If this flag is set to |
| 190 | .Dq yes , |
| 191 | ssh will additionally check the host IP address in the |
| 192 | .Pa known_hosts |
| 193 | file. |
| 194 | This allows ssh to detect if a host key changed due to DNS spoofing. |
| 195 | If the option is set to |
| 196 | .Dq no , |
| 197 | the check will not be executed. |
| 198 | The default is |
| 199 | .Dq yes . |
| 200 | .It Cm Cipher |
| 201 | Specifies the cipher to use for encrypting the session |
| 202 | in protocol version 1. |
| 203 | Currently, |
| 204 | .Dq blowfish , |
| 205 | .Dq 3des , |
| 206 | and |
| 207 | .Dq des |
| 208 | are supported. |
| 209 | .Ar des |
| 210 | is only supported in the |
| 211 | .Nm ssh |
| 212 | client for interoperability with legacy protocol 1 implementations |
| 213 | that do not support the |
| 214 | .Ar 3des |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 215 | cipher. |
| 216 | Its use is strongly discouraged due to cryptographic weaknesses. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 217 | The default is |
| 218 | .Dq 3des . |
| 219 | .It Cm Ciphers |
| 220 | Specifies the ciphers allowed for protocol version 2 |
| 221 | in order of preference. |
| 222 | Multiple ciphers must be comma-separated. |
Damien Miller | 05202ff | 2004-06-15 10:30:39 +1000 | [diff] [blame] | 223 | The supported ciphers are |
| 224 | .Dq 3des-cbc , |
| 225 | .Dq aes128-cbc , |
| 226 | .Dq aes192-cbc , |
| 227 | .Dq aes256-cbc , |
| 228 | .Dq aes128-ctr , |
| 229 | .Dq aes192-ctr , |
| 230 | .Dq aes256-ctr , |
Damien Miller | 3710f27 | 2005-05-26 12:19:17 +1000 | [diff] [blame] | 231 | .Dq arcfour128 , |
| 232 | .Dq arcfour256 , |
Damien Miller | 05202ff | 2004-06-15 10:30:39 +1000 | [diff] [blame] | 233 | .Dq arcfour , |
| 234 | .Dq blowfish-cbc , |
| 235 | and |
| 236 | .Dq cast128-cbc . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 237 | The default is |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 238 | .Bd -literal |
Damien Miller | 3710f27 | 2005-05-26 12:19:17 +1000 | [diff] [blame] | 239 | ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128, |
| 240 | arcfour256,arcfour,aes192-cbc,aes256-cbc,aes128-ctr, |
| 241 | aes192-ctr,aes256-ctr'' |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 242 | .Ed |
| 243 | .It Cm ClearAllForwardings |
| 244 | Specifies that all local, remote and dynamic port forwardings |
| 245 | specified in the configuration files or on the command line be |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 246 | cleared. |
| 247 | This option is primarily useful when used from the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 248 | .Nm ssh |
| 249 | command line to clear port forwardings set in |
| 250 | configuration files, and is automatically set by |
| 251 | .Xr scp 1 |
| 252 | and |
| 253 | .Xr sftp 1 . |
| 254 | The argument must be |
| 255 | .Dq yes |
| 256 | or |
| 257 | .Dq no . |
| 258 | The default is |
| 259 | .Dq no . |
| 260 | .It Cm Compression |
| 261 | Specifies whether to use compression. |
| 262 | The argument must be |
| 263 | .Dq yes |
| 264 | or |
| 265 | .Dq no . |
| 266 | The default is |
| 267 | .Dq no . |
| 268 | .It Cm CompressionLevel |
| 269 | Specifies the compression level to use if compression is enabled. |
| 270 | The argument must be an integer from 1 (fast) to 9 (slow, best). |
| 271 | The default level is 6, which is good for most applications. |
| 272 | The meaning of the values is the same as in |
| 273 | .Xr gzip 1 . |
| 274 | Note that this option applies to protocol version 1 only. |
| 275 | .It Cm ConnectionAttempts |
| 276 | Specifies the number of tries (one per second) to make before exiting. |
| 277 | The argument must be an integer. |
| 278 | This may be useful in scripts if the connection sometimes fails. |
| 279 | The default is 1. |
Damien Miller | b78d5eb | 2003-05-16 11:39:04 +1000 | [diff] [blame] | 280 | .It Cm ConnectTimeout |
| 281 | Specifies the timeout (in seconds) used when connecting to the ssh |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 282 | server, instead of using the default system TCP timeout. |
| 283 | This value is used only when the target is down or really unreachable, |
| 284 | not when it refuses the connection. |
Damien Miller | 0e220db | 2004-06-15 10:34:08 +1000 | [diff] [blame] | 285 | .It Cm ControlMaster |
| 286 | Enables the sharing of multiple sessions over a single network connection. |
| 287 | When set to |
| 288 | .Dq yes |
| 289 | .Nm ssh |
| 290 | will listen for connections on a control socket specified using the |
| 291 | .Cm ControlPath |
| 292 | argument. |
| 293 | Additional sessions can connect to this socket using the same |
| 294 | .Cm ControlPath |
| 295 | with |
| 296 | .Cm ControlMaster |
| 297 | set to |
| 298 | .Dq no |
Damien Miller | 2234bac | 2004-06-30 22:38:52 +1000 | [diff] [blame] | 299 | (the default). |
Damien Miller | 713de76 | 2005-11-05 15:13:49 +1100 | [diff] [blame] | 300 | These sessions will try to reuse the master instance's network connection |
Damien Miller | b3bfbb7 | 2005-11-05 15:11:48 +1100 | [diff] [blame] | 301 | rather than initiating new ones, but will fall back to connecting normally |
| 302 | if the control socket does not exist, or is not listening. |
| 303 | .Pp |
Damien Miller | 23f0770 | 2004-06-18 01:19:03 +1000 | [diff] [blame] | 304 | Setting this to |
| 305 | .Dq ask |
| 306 | will cause |
| 307 | .Nm ssh |
| 308 | to listen for control connections, but require confirmation using the |
| 309 | .Ev SSH_ASKPASS |
| 310 | program before they are accepted (see |
| 311 | .Xr ssh-add 1 |
Damien Miller | 2234bac | 2004-06-30 22:38:52 +1000 | [diff] [blame] | 312 | for details). |
Damien Miller | dadfd4d | 2005-05-26 12:07:13 +1000 | [diff] [blame] | 313 | If the |
| 314 | .Cm ControlPath |
| 315 | can not be opened, |
| 316 | .Nm ssh |
| 317 | will continue without connecting to a master instance. |
Damien Miller | d14b1e7 | 2005-06-16 13:19:41 +1000 | [diff] [blame] | 318 | .Pp |
Damien Miller | 1339002 | 2005-07-06 09:44:19 +1000 | [diff] [blame] | 319 | X11 and |
Damien Miller | fd94fba | 2005-07-06 09:44:59 +1000 | [diff] [blame] | 320 | .Xr ssh-agent 1 |
Damien Miller | 1339002 | 2005-07-06 09:44:19 +1000 | [diff] [blame] | 321 | forwarding is supported over these multiplexed connections, however the |
Darren Tucker | 6355187 | 2005-12-20 16:14:15 +1100 | [diff] [blame] | 322 | display and agent forwarded will be the one belonging to the master |
Damien Miller | fd94fba | 2005-07-06 09:44:59 +1000 | [diff] [blame] | 323 | connection i.e. it is not possible to forward multiple displays or agents. |
Damien Miller | 1339002 | 2005-07-06 09:44:19 +1000 | [diff] [blame] | 324 | .Pp |
Damien Miller | d14b1e7 | 2005-06-16 13:19:41 +1000 | [diff] [blame] | 325 | Two additional options allow for opportunistic multiplexing: try to use a |
| 326 | master connection but fall back to creating a new one if one does not already |
| 327 | exist. |
| 328 | These options are: |
| 329 | .Dq auto |
| 330 | and |
| 331 | .Dq autoask . |
| 332 | The latter requires confirmation like the |
| 333 | .Dq ask |
| 334 | option. |
Damien Miller | 0e220db | 2004-06-15 10:34:08 +1000 | [diff] [blame] | 335 | .It Cm ControlPath |
Damien Miller | 6476cad | 2005-06-16 13:18:34 +1000 | [diff] [blame] | 336 | Specify the path to the control socket used for connection sharing as described |
| 337 | in the |
Damien Miller | 0e220db | 2004-06-15 10:34:08 +1000 | [diff] [blame] | 338 | .Cm ControlMaster |
Damien Miller | 8f74c8f | 2005-06-26 08:56:03 +1000 | [diff] [blame] | 339 | section above or the string |
| 340 | .Dq none |
| 341 | to disable connection sharing. |
Damien Miller | 6476cad | 2005-06-16 13:18:34 +1000 | [diff] [blame] | 342 | In the path, |
Damien Miller | 3ec54c7 | 2006-03-15 11:30:13 +1100 | [diff] [blame] | 343 | .Ql %l |
| 344 | will be substituted by the local host name, |
Damien Miller | 6476cad | 2005-06-16 13:18:34 +1000 | [diff] [blame] | 345 | .Ql %h |
| 346 | will be substituted by the target host name, |
| 347 | .Ql %p |
| 348 | the port and |
| 349 | .Ql %r |
| 350 | by the remote login username. |
Damien Miller | d14b1e7 | 2005-06-16 13:19:41 +1000 | [diff] [blame] | 351 | It is recommended that any |
| 352 | .Cm ControlPath |
| 353 | used for opportunistic connection sharing include |
Damien Miller | 20c2ec4 | 2006-03-15 11:31:01 +1100 | [diff] [blame] | 354 | at least %h, %p, and %r. |
Damien Miller | d14b1e7 | 2005-06-16 13:19:41 +1000 | [diff] [blame] | 355 | This ensures that shared connections are uniquely identified. |
Damien Miller | 2234bac | 2004-06-30 22:38:52 +1000 | [diff] [blame] | 356 | .It Cm DynamicForward |
Damien Miller | e9d001e | 2006-01-14 10:10:17 +1100 | [diff] [blame] | 357 | Specifies that a TCP port on the local machine be forwarded |
Damien Miller | 2234bac | 2004-06-30 22:38:52 +1000 | [diff] [blame] | 358 | over the secure channel, and the application |
| 359 | protocol is then used to determine where to connect to from the |
| 360 | remote machine. |
Darren Tucker | c8d6421 | 2005-10-03 18:13:42 +1000 | [diff] [blame] | 361 | .Pp |
| 362 | The argument must be |
| 363 | .Sm off |
| 364 | .Oo Ar bind_address : Oc Ar port . |
| 365 | .Sm on |
| 366 | IPv6 addresses can be specified by enclosing addresses in square brackets or |
| 367 | by using an alternative syntax: |
| 368 | .Oo Ar bind_address Ns / Oc Ns Ar port . |
| 369 | By default, the local port is bound in accordance with the |
| 370 | .Cm GatewayPorts |
| 371 | setting. |
| 372 | However, an explicit |
| 373 | .Ar bind_address |
| 374 | may be used to bind the connection to a specific address. |
| 375 | The |
| 376 | .Ar bind_address |
| 377 | of |
| 378 | .Dq localhost |
| 379 | indicates that the listening port be bound for local use only, while an |
| 380 | empty address or |
| 381 | .Sq * |
| 382 | indicates that the port should be available from all interfaces. |
| 383 | .Pp |
Damien Miller | 2234bac | 2004-06-30 22:38:52 +1000 | [diff] [blame] | 384 | Currently the SOCKS4 and SOCKS5 protocols are supported, and |
| 385 | .Nm ssh |
| 386 | will act as a SOCKS server. |
| 387 | Multiple forwardings may be specified, and |
| 388 | additional forwardings can be given on the command line. |
| 389 | Only the superuser can forward privileged ports. |
Darren Tucker | 674f71d | 2003-06-28 12:33:12 +1000 | [diff] [blame] | 390 | .It Cm EnableSSHKeysign |
| 391 | Setting this option to |
| 392 | .Dq yes |
| 393 | in the global client configuration file |
| 394 | .Pa /etc/ssh/ssh_config |
| 395 | enables the use of the helper program |
| 396 | .Xr ssh-keysign 8 |
| 397 | during |
| 398 | .Cm HostbasedAuthentication . |
| 399 | The argument must be |
| 400 | .Dq yes |
| 401 | or |
| 402 | .Dq no . |
| 403 | The default is |
| 404 | .Dq no . |
Darren Tucker | f132c67 | 2003-10-15 15:58:18 +1000 | [diff] [blame] | 405 | This option should be placed in the non-hostspecific section. |
Darren Tucker | 674f71d | 2003-06-28 12:33:12 +1000 | [diff] [blame] | 406 | See |
| 407 | .Xr ssh-keysign 8 |
| 408 | for more information. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 409 | .It Cm EscapeChar |
| 410 | Sets the escape character (default: |
| 411 | .Ql ~ ) . |
| 412 | The escape character can also |
| 413 | be set on the command line. |
| 414 | The argument should be a single character, |
| 415 | .Ql ^ |
| 416 | followed by a letter, or |
| 417 | .Dq none |
| 418 | to disable the escape |
| 419 | character entirely (making the connection transparent for binary |
| 420 | data). |
| 421 | .It Cm ForwardAgent |
| 422 | Specifies whether the connection to the authentication agent (if any) |
| 423 | will be forwarded to the remote machine. |
| 424 | The argument must be |
| 425 | .Dq yes |
| 426 | or |
| 427 | .Dq no . |
| 428 | The default is |
| 429 | .Dq no . |
Damien Miller | af65304 | 2002-09-04 16:40:37 +1000 | [diff] [blame] | 430 | .Pp |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 431 | Agent forwarding should be enabled with caution. |
| 432 | Users with the ability to bypass file permissions on the remote host |
| 433 | (for the agent's Unix-domain socket) |
| 434 | can access the local agent through the forwarded connection. |
| 435 | An attacker cannot obtain key material from the agent, |
Damien Miller | af65304 | 2002-09-04 16:40:37 +1000 | [diff] [blame] | 436 | however they can perform operations on the keys that enable them to |
| 437 | authenticate using the identities loaded into the agent. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 438 | .It Cm ForwardX11 |
| 439 | Specifies whether X11 connections will be automatically redirected |
| 440 | over the secure channel and |
| 441 | .Ev DISPLAY |
| 442 | set. |
| 443 | The argument must be |
| 444 | .Dq yes |
| 445 | or |
| 446 | .Dq no . |
| 447 | The default is |
| 448 | .Dq no . |
Damien Miller | af65304 | 2002-09-04 16:40:37 +1000 | [diff] [blame] | 449 | .Pp |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 450 | X11 forwarding should be enabled with caution. |
| 451 | Users with the ability to bypass file permissions on the remote host |
Darren Tucker | 0a118da | 2003-10-15 15:54:32 +1000 | [diff] [blame] | 452 | (for the user's X11 authorization database) |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 453 | can access the local X11 display through the forwarded connection. |
Darren Tucker | 0a118da | 2003-10-15 15:54:32 +1000 | [diff] [blame] | 454 | An attacker may then be able to perform activities such as keystroke monitoring |
| 455 | if the |
| 456 | .Cm ForwardX11Trusted |
| 457 | option is also enabled. |
| 458 | .It Cm ForwardX11Trusted |
Darren Tucker | dcf6ec4 | 2004-05-13 13:03:56 +1000 | [diff] [blame] | 459 | If this option is set to |
Darren Tucker | 0a118da | 2003-10-15 15:54:32 +1000 | [diff] [blame] | 460 | .Dq yes |
| 461 | then remote X11 clients will have full access to the original X11 display. |
Damien Miller | 1717fd4 | 2005-03-01 21:17:31 +1100 | [diff] [blame] | 462 | .Pp |
Darren Tucker | 0a118da | 2003-10-15 15:54:32 +1000 | [diff] [blame] | 463 | If this option is set to |
| 464 | .Dq no |
| 465 | then remote X11 clients will be considered untrusted and prevented |
| 466 | from stealing or tampering with data belonging to trusted X11 |
| 467 | clients. |
Damien Miller | 1717fd4 | 2005-03-01 21:17:31 +1100 | [diff] [blame] | 468 | Furthermore, the |
| 469 | .Xr xauth 1 |
| 470 | token used for the session will be set to expire after 20 minutes. |
| 471 | Remote clients will be refused access after this time. |
Darren Tucker | 0a118da | 2003-10-15 15:54:32 +1000 | [diff] [blame] | 472 | .Pp |
| 473 | The default is |
| 474 | .Dq no . |
| 475 | .Pp |
| 476 | See the X11 SECURITY extension specification for full details on |
| 477 | the restrictions imposed on untrusted clients. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 478 | .It Cm GatewayPorts |
| 479 | Specifies whether remote hosts are allowed to connect to local |
| 480 | forwarded ports. |
| 481 | By default, |
| 482 | .Nm ssh |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 483 | binds local port forwardings to the loopback address. |
| 484 | This prevents other remote hosts from connecting to forwarded ports. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 485 | .Cm GatewayPorts |
| 486 | can be used to specify that |
| 487 | .Nm ssh |
| 488 | should bind local port forwardings to the wildcard address, |
| 489 | thus allowing remote hosts to connect to forwarded ports. |
| 490 | The argument must be |
| 491 | .Dq yes |
| 492 | or |
| 493 | .Dq no . |
| 494 | The default is |
| 495 | .Dq no . |
| 496 | .It Cm GlobalKnownHostsFile |
| 497 | Specifies a file to use for the global |
| 498 | host key database instead of |
| 499 | .Pa /etc/ssh/ssh_known_hosts . |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 500 | .It Cm GSSAPIAuthentication |
Damien Miller | baafb98 | 2003-12-17 16:32:23 +1100 | [diff] [blame] | 501 | Specifies whether user authentication based on GSSAPI is allowed. |
Damien Miller | c2b9827 | 2003-09-03 12:13:30 +1000 | [diff] [blame] | 502 | The default is |
Darren Tucker | a044f47 | 2003-10-15 15:52:03 +1000 | [diff] [blame] | 503 | .Dq no . |
Darren Tucker | 0efd155 | 2003-08-26 11:49:55 +1000 | [diff] [blame] | 504 | Note that this option applies to protocol version 2 only. |
| 505 | .It Cm GSSAPIDelegateCredentials |
| 506 | Forward (delegate) credentials to the server. |
| 507 | The default is |
| 508 | .Dq no . |
| 509 | Note that this option applies to protocol version 2 only. |
Damien Miller | e177615 | 2005-03-01 21:47:37 +1100 | [diff] [blame] | 510 | .It Cm HashKnownHosts |
| 511 | Indicates that |
| 512 | .Nm ssh |
| 513 | should hash host names and addresses when they are added to |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 514 | .Pa ~/.ssh/known_hosts . |
Damien Miller | e177615 | 2005-03-01 21:47:37 +1100 | [diff] [blame] | 515 | These hashed names may be used normally by |
| 516 | .Nm ssh |
| 517 | and |
| 518 | .Nm sshd , |
| 519 | but they do not reveal identifying information should the file's contents |
| 520 | be disclosed. |
| 521 | The default is |
| 522 | .Dq no . |
Damien Miller | f8c5546 | 2005-03-02 12:03:05 +1100 | [diff] [blame] | 523 | Note that hashing of names and addresses will not be retrospectively applied |
Damien Miller | 4b42d7f | 2005-03-01 21:48:35 +1100 | [diff] [blame] | 524 | to existing known hosts files, but these may be manually hashed using |
| 525 | .Xr ssh-keygen 1 . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 526 | .It Cm HostbasedAuthentication |
| 527 | Specifies whether to try rhosts based authentication with public key |
| 528 | authentication. |
| 529 | The argument must be |
| 530 | .Dq yes |
| 531 | or |
| 532 | .Dq no . |
| 533 | The default is |
| 534 | .Dq no . |
| 535 | This option applies to protocol version 2 only and |
| 536 | is similar to |
| 537 | .Cm RhostsRSAAuthentication . |
| 538 | .It Cm HostKeyAlgorithms |
| 539 | Specifies the protocol version 2 host key algorithms |
| 540 | that the client wants to use in order of preference. |
| 541 | The default for this option is: |
| 542 | .Dq ssh-rsa,ssh-dss . |
| 543 | .It Cm HostKeyAlias |
| 544 | Specifies an alias that should be used instead of the |
| 545 | real host name when looking up or saving the host key |
| 546 | in the host key database files. |
| 547 | This option is useful for tunneling ssh connections |
| 548 | or for multiple servers running on a single host. |
| 549 | .It Cm HostName |
| 550 | Specifies the real host name to log into. |
| 551 | This can be used to specify nicknames or abbreviations for hosts. |
| 552 | Default is the name given on the command line. |
| 553 | Numeric IP addresses are also permitted (both on the command line and in |
| 554 | .Cm HostName |
| 555 | specifications). |
Damien Miller | bd394c3 | 2004-03-08 23:12:36 +1100 | [diff] [blame] | 556 | .It Cm IdentitiesOnly |
| 557 | Specifies that |
| 558 | .Nm ssh |
| 559 | should only use the authentication identity files configured in the |
Damien Miller | 1a81258 | 2004-04-20 20:13:32 +1000 | [diff] [blame] | 560 | .Nm |
Damien Miller | bd394c3 | 2004-03-08 23:12:36 +1100 | [diff] [blame] | 561 | files, |
| 562 | even if the |
| 563 | .Nm ssh-agent |
| 564 | offers more identities. |
| 565 | The argument to this keyword must be |
| 566 | .Dq yes |
| 567 | or |
| 568 | .Dq no . |
Darren Tucker | 7eba820 | 2005-12-20 16:15:14 +1100 | [diff] [blame] | 569 | This option is intended for situations where |
Damien Miller | bd394c3 | 2004-03-08 23:12:36 +1100 | [diff] [blame] | 570 | .Nm ssh-agent |
| 571 | offers many different identities. |
| 572 | The default is |
| 573 | .Dq no . |
Damien Miller | 957d4e4 | 2005-12-13 19:30:45 +1100 | [diff] [blame] | 574 | .It Cm IdentityFile |
| 575 | Specifies a file from which the user's RSA or DSA authentication identity |
| 576 | is read. |
| 577 | The default is |
| 578 | .Pa ~/.ssh/identity |
| 579 | for protocol version 1, and |
| 580 | .Pa ~/.ssh/id_rsa |
| 581 | and |
| 582 | .Pa ~/.ssh/id_dsa |
| 583 | for protocol version 2. |
| 584 | Additionally, any identities represented by the authentication agent |
| 585 | will be used for authentication. |
| 586 | The file name may use the tilde |
| 587 | syntax to refer to a user's home directory. |
| 588 | It is possible to have |
| 589 | multiple identity files specified in configuration files; all these |
| 590 | identities will be tried in sequence. |
Darren Tucker | 636ca90 | 2004-11-05 20:22:00 +1100 | [diff] [blame] | 591 | .It Cm KbdInteractiveDevices |
| 592 | Specifies the list of methods to use in keyboard-interactive authentication. |
| 593 | Multiple method names must be comma-separated. |
| 594 | The default is to use the server specified list. |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 595 | .It Cm LocalCommand |
| 596 | Specifies a command to execute on the local machine after successfully |
| 597 | connecting to the server. |
| 598 | The command string extends to the end of the line, and is executed with |
| 599 | .Pa /bin/sh . |
| 600 | This directive is ignored unless |
| 601 | .Cm PermitLocalCommand |
| 602 | has been enabled. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 603 | .It Cm LocalForward |
Damien Miller | e9d001e | 2006-01-14 10:10:17 +1100 | [diff] [blame] | 604 | Specifies that a TCP port on the local machine be forwarded over |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 605 | the secure channel to the specified host and port from the remote machine. |
Darren Tucker | 5ede2ad | 2005-03-31 21:31:10 +1000 | [diff] [blame] | 606 | The first argument must be |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 607 | .Sm off |
Darren Tucker | 5ede2ad | 2005-03-31 21:31:10 +1000 | [diff] [blame] | 608 | .Oo Ar bind_address : Oc Ar port |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 609 | .Sm on |
Darren Tucker | 5ede2ad | 2005-03-31 21:31:10 +1000 | [diff] [blame] | 610 | and the second argument must be |
| 611 | .Ar host : Ns Ar hostport . |
Damien Miller | f8c5546 | 2005-03-02 12:03:05 +1100 | [diff] [blame] | 612 | IPv6 addresses can be specified by enclosing addresses in square brackets or |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 613 | by using an alternative syntax: |
Darren Tucker | 5ede2ad | 2005-03-31 21:31:10 +1000 | [diff] [blame] | 614 | .Oo Ar bind_address Ns / Oc Ns Ar port |
| 615 | and |
| 616 | .Ar host Ns / Ns Ar hostport . |
Damien Miller | f8c5546 | 2005-03-02 12:03:05 +1100 | [diff] [blame] | 617 | Multiple forwardings may be specified, and additional forwardings can be |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 618 | given on the command line. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 619 | Only the superuser can forward privileged ports. |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 620 | By default, the local port is bound in accordance with the |
| 621 | .Cm GatewayPorts |
| 622 | setting. |
| 623 | However, an explicit |
| 624 | .Ar bind_address |
| 625 | may be used to bind the connection to a specific address. |
| 626 | The |
| 627 | .Ar bind_address |
| 628 | of |
| 629 | .Dq localhost |
Damien Miller | f8c5546 | 2005-03-02 12:03:05 +1100 | [diff] [blame] | 630 | indicates that the listening port be bound for local use only, while an |
| 631 | empty address or |
| 632 | .Sq * |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 633 | indicates that the port should be available from all interfaces. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 634 | .It Cm LogLevel |
| 635 | Gives the verbosity level that is used when logging messages from |
| 636 | .Nm ssh . |
| 637 | The possible values are: |
| 638 | QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 639 | The default is INFO. |
| 640 | DEBUG and DEBUG1 are equivalent. |
| 641 | DEBUG2 and DEBUG3 each specify higher levels of verbose output. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 642 | .It Cm MACs |
| 643 | Specifies the MAC (message authentication code) algorithms |
| 644 | in order of preference. |
| 645 | The MAC algorithm is used in protocol version 2 |
| 646 | for data integrity protection. |
| 647 | Multiple algorithms must be comma-separated. |
| 648 | The default is |
| 649 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . |
| 650 | .It Cm NoHostAuthenticationForLocalhost |
| 651 | This option can be used if the home directory is shared across machines. |
| 652 | In this case localhost will refer to a different machine on each of |
| 653 | the machines and the user will get many warnings about changed host keys. |
| 654 | However, this option disables host authentication for localhost. |
| 655 | The argument to this keyword must be |
| 656 | .Dq yes |
| 657 | or |
| 658 | .Dq no . |
| 659 | The default is to check the host key for localhost. |
| 660 | .It Cm NumberOfPasswordPrompts |
| 661 | Specifies the number of password prompts before giving up. |
| 662 | The argument to this keyword must be an integer. |
| 663 | Default is 3. |
| 664 | .It Cm PasswordAuthentication |
| 665 | Specifies whether to use password authentication. |
| 666 | The argument to this keyword must be |
| 667 | .Dq yes |
| 668 | or |
| 669 | .Dq no . |
| 670 | The default is |
| 671 | .Dq yes . |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 672 | .It Cm PermitLocalCommand |
| 673 | Allow local command execution via the |
| 674 | .Ic LocalCommand |
| 675 | option or using the |
Damien Miller | 4b2319f | 2005-12-13 19:30:27 +1100 | [diff] [blame] | 676 | .Ic !\& Ns Ar command |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 677 | escape sequence in |
| 678 | .Xr ssh 1 . |
| 679 | The argument must be |
| 680 | .Dq yes |
| 681 | or |
| 682 | .Dq no . |
| 683 | The default is |
| 684 | .Dq no . |
Damien Miller | 957d4e4 | 2005-12-13 19:30:45 +1100 | [diff] [blame] | 685 | .It Cm Port |
| 686 | Specifies the port number to connect on the remote host. |
| 687 | Default is 22. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 688 | .It Cm PreferredAuthentications |
| 689 | Specifies the order in which the client should try protocol 2 |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 690 | authentication methods. |
Darren Tucker | 1adc2bd | 2005-03-14 23:14:20 +1100 | [diff] [blame] | 691 | This allows a client to prefer one method (e.g.\& |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 692 | .Cm keyboard-interactive ) |
Darren Tucker | 1adc2bd | 2005-03-14 23:14:20 +1100 | [diff] [blame] | 693 | over another method (e.g.\& |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 694 | .Cm password ) |
| 695 | The default for this option is: |
| 696 | .Dq hostbased,publickey,keyboard-interactive,password . |
| 697 | .It Cm Protocol |
| 698 | Specifies the protocol versions |
| 699 | .Nm ssh |
| 700 | should support in order of preference. |
| 701 | The possible values are |
| 702 | .Dq 1 |
| 703 | and |
| 704 | .Dq 2 . |
| 705 | Multiple versions must be comma-separated. |
| 706 | The default is |
| 707 | .Dq 2,1 . |
| 708 | This means that |
| 709 | .Nm ssh |
| 710 | tries version 2 and falls back to version 1 |
| 711 | if version 2 is not available. |
| 712 | .It Cm ProxyCommand |
| 713 | Specifies the command to use to connect to the server. |
| 714 | The command |
| 715 | string extends to the end of the line, and is executed with |
| 716 | .Pa /bin/sh . |
| 717 | In the command string, |
| 718 | .Ql %h |
| 719 | will be substituted by the host name to |
| 720 | connect and |
| 721 | .Ql %p |
| 722 | by the port. |
| 723 | The command can be basically anything, |
| 724 | and should read from its standard input and write to its standard output. |
| 725 | It should eventually connect an |
| 726 | .Xr sshd 8 |
| 727 | server running on some machine, or execute |
| 728 | .Ic sshd -i |
| 729 | somewhere. |
| 730 | Host key management will be done using the |
| 731 | HostName of the host being connected (defaulting to the name typed by |
| 732 | the user). |
Damien Miller | 495dca3 | 2003-04-01 21:42:14 +1000 | [diff] [blame] | 733 | Setting the command to |
| 734 | .Dq none |
Damien Miller | 9f1e33a | 2003-02-24 11:57:32 +1100 | [diff] [blame] | 735 | disables this option entirely. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 736 | Note that |
| 737 | .Cm CheckHostIP |
| 738 | is not available for connects with a proxy command. |
| 739 | .Pp |
Damien Miller | ebcfedc | 2005-05-26 12:13:56 +1000 | [diff] [blame] | 740 | This directive is useful in conjunction with |
| 741 | .Xr nc 1 |
| 742 | and its proxy support. |
Damien Miller | dfec294 | 2005-05-26 12:14:32 +1000 | [diff] [blame] | 743 | For example, the following directive would connect via an HTTP proxy at |
Damien Miller | ebcfedc | 2005-05-26 12:13:56 +1000 | [diff] [blame] | 744 | 192.0.2.0: |
| 745 | .Bd -literal -offset 3n |
| 746 | ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p |
| 747 | .Ed |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 748 | .It Cm PubkeyAuthentication |
| 749 | Specifies whether to try public key authentication. |
| 750 | The argument to this keyword must be |
| 751 | .Dq yes |
| 752 | or |
| 753 | .Dq no . |
| 754 | The default is |
| 755 | .Dq yes . |
| 756 | This option applies to protocol version 2 only. |
Darren Tucker | 62388b2 | 2006-01-20 11:31:47 +1100 | [diff] [blame] | 757 | .It Cm RekeyLimit |
| 758 | Specifies the maximum amount of data that may be transmitted before the |
Damien Miller | ddfddf1 | 2006-01-31 21:39:03 +1100 | [diff] [blame] | 759 | session key is renegotiated. |
Darren Tucker | 62388b2 | 2006-01-20 11:31:47 +1100 | [diff] [blame] | 760 | The argument is the number of bytes, with an optional suffix of |
Damien Miller | ddfddf1 | 2006-01-31 21:39:03 +1100 | [diff] [blame] | 761 | .Sq K , |
| 762 | .Sq M , |
Darren Tucker | 62388b2 | 2006-01-20 11:31:47 +1100 | [diff] [blame] | 763 | or |
Damien Miller | ddfddf1 | 2006-01-31 21:39:03 +1100 | [diff] [blame] | 764 | .Sq G |
Darren Tucker | 62388b2 | 2006-01-20 11:31:47 +1100 | [diff] [blame] | 765 | to indicate Kilobytes, Megabytes, or Gigabytes, respectively. |
| 766 | The default is between |
| 767 | .Dq 1G |
| 768 | and |
| 769 | .Dq 4G , |
| 770 | depending on the cipher. |
Damien Miller | ddfddf1 | 2006-01-31 21:39:03 +1100 | [diff] [blame] | 771 | This option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 772 | .It Cm RemoteForward |
Damien Miller | e9d001e | 2006-01-14 10:10:17 +1100 | [diff] [blame] | 773 | Specifies that a TCP port on the remote machine be forwarded over |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 774 | the secure channel to the specified host and port from the local machine. |
Darren Tucker | 5ede2ad | 2005-03-31 21:31:10 +1000 | [diff] [blame] | 775 | The first argument must be |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 776 | .Sm off |
Darren Tucker | 5ede2ad | 2005-03-31 21:31:10 +1000 | [diff] [blame] | 777 | .Oo Ar bind_address : Oc Ar port |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 778 | .Sm on |
Darren Tucker | 5ede2ad | 2005-03-31 21:31:10 +1000 | [diff] [blame] | 779 | and the second argument must be |
| 780 | .Ar host : Ns Ar hostport . |
| 781 | IPv6 addresses can be specified by enclosing addresses in square brackets |
| 782 | or by using an alternative syntax: |
| 783 | .Oo Ar bind_address Ns / Oc Ns Ar port |
| 784 | and |
| 785 | .Ar host Ns / Ns Ar hostport . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 786 | Multiple forwardings may be specified, and additional |
| 787 | forwardings can be given on the command line. |
| 788 | Only the superuser can forward privileged ports. |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 789 | .Pp |
| 790 | If the |
| 791 | .Ar bind_address |
| 792 | is not specified, the default is to only bind to loopback addresses. |
| 793 | If the |
| 794 | .Ar bind_address |
| 795 | is |
| 796 | .Ql * |
| 797 | or an empty string, then the forwarding is requested to listen on all |
| 798 | interfaces. |
| 799 | Specifying a remote |
| 800 | .Ar bind_address |
Damien Miller | f8c5546 | 2005-03-02 12:03:05 +1100 | [diff] [blame] | 801 | will only succeed if the server's |
| 802 | .Cm GatewayPorts |
Damien Miller | f91ee4c | 2005-03-01 21:24:33 +1100 | [diff] [blame] | 803 | option is enabled (see |
Damien Miller | f8c5546 | 2005-03-02 12:03:05 +1100 | [diff] [blame] | 804 | .Xr sshd_config 5 ) . |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 805 | .It Cm RhostsRSAAuthentication |
| 806 | Specifies whether to try rhosts based authentication with RSA host |
| 807 | authentication. |
| 808 | The argument must be |
| 809 | .Dq yes |
| 810 | or |
| 811 | .Dq no . |
| 812 | The default is |
| 813 | .Dq no . |
| 814 | This option applies to protocol version 1 only and requires |
| 815 | .Nm ssh |
| 816 | to be setuid root. |
| 817 | .It Cm RSAAuthentication |
| 818 | Specifies whether to try RSA authentication. |
| 819 | The argument to this keyword must be |
| 820 | .Dq yes |
| 821 | or |
| 822 | .Dq no . |
| 823 | RSA authentication will only be |
| 824 | attempted if the identity file exists, or an authentication agent is |
| 825 | running. |
| 826 | The default is |
| 827 | .Dq yes . |
| 828 | Note that this option applies to protocol version 1 only. |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 829 | .It Cm SendEnv |
| 830 | Specifies what variables from the local |
| 831 | .Xr environ 7 |
| 832 | should be sent to the server. |
| 833 | Note that environment passing is only supported for protocol 2, the |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 834 | server must also support it, and the server must be configured to |
| 835 | accept these environment variables. |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 836 | Refer to |
| 837 | .Cm AcceptEnv |
| 838 | in |
| 839 | .Xr sshd_config 5 |
| 840 | for how to configure the server. |
Damien Miller | 6def551 | 2006-03-15 11:54:05 +1100 | [diff] [blame] | 841 | Variables are specified by name, which may contain wildcard characters. |
Darren Tucker | 1e0c9bf | 2004-05-02 22:12:48 +1000 | [diff] [blame] | 842 | Multiple environment variables may be separated by whitespace or spread |
Darren Tucker | 46bc075 | 2004-05-02 22:11:30 +1000 | [diff] [blame] | 843 | across multiple |
| 844 | .Cm SendEnv |
| 845 | directives. |
| 846 | The default is not to send any environment variables. |
Damien Miller | f54a4b9 | 2006-03-15 11:54:36 +1100 | [diff] [blame] | 847 | .Pp |
| 848 | See |
| 849 | .Sx PATTERNS |
| 850 | for more information on patterns. |
Damien Miller | 509b010 | 2003-12-17 16:33:10 +1100 | [diff] [blame] | 851 | .It Cm ServerAliveCountMax |
Damien Miller | b797770 | 2006-01-03 18:47:31 +1100 | [diff] [blame] | 852 | Sets the number of server alive messages (see below) which may be |
Damien Miller | 509b010 | 2003-12-17 16:33:10 +1100 | [diff] [blame] | 853 | sent without |
| 854 | .Nm ssh |
| 855 | receiving any messages back from the server. |
| 856 | If this threshold is reached while server alive messages are being sent, |
| 857 | .Nm ssh |
| 858 | will disconnect from the server, terminating the session. |
| 859 | It is important to note that the use of server alive messages is very |
| 860 | different from |
| 861 | .Cm TCPKeepAlive |
| 862 | (below). |
| 863 | The server alive messages are sent through the encrypted channel |
| 864 | and therefore will not be spoofable. |
| 865 | The TCP keepalive option enabled by |
| 866 | .Cm TCPKeepAlive |
| 867 | is spoofable. |
| 868 | The server alive mechanism is valuable when the client or |
| 869 | server depend on knowing when a connection has become inactive. |
| 870 | .Pp |
| 871 | The default value is 3. |
| 872 | If, for example, |
| 873 | .Cm ServerAliveInterval |
Damien Miller | b797770 | 2006-01-03 18:47:31 +1100 | [diff] [blame] | 874 | (see below) is set to 15, and |
Damien Miller | 509b010 | 2003-12-17 16:33:10 +1100 | [diff] [blame] | 875 | .Cm ServerAliveCountMax |
| 876 | is left at the default, if the server becomes unresponsive ssh |
| 877 | will disconnect after approximately 45 seconds. |
Damien Miller | 957d4e4 | 2005-12-13 19:30:45 +1100 | [diff] [blame] | 878 | .It Cm ServerAliveInterval |
| 879 | Sets a timeout interval in seconds after which if no data has been received |
| 880 | from the server, |
| 881 | .Nm ssh |
| 882 | will send a message through the encrypted |
| 883 | channel to request a response from the server. |
| 884 | The default |
| 885 | is 0, indicating that these messages will not be sent to the server. |
| 886 | This option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 887 | .It Cm SmartcardDevice |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 888 | Specifies which smartcard device to use. |
| 889 | The argument to this keyword is the device |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 890 | .Nm ssh |
| 891 | should use to communicate with a smartcard used for storing the user's |
Damien Miller | fbf486b | 2003-05-23 18:44:23 +1000 | [diff] [blame] | 892 | private RSA key. |
| 893 | By default, no device is specified and smartcard support is not activated. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 894 | .It Cm StrictHostKeyChecking |
| 895 | If this flag is set to |
| 896 | .Dq yes , |
| 897 | .Nm ssh |
| 898 | will never automatically add host keys to the |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 899 | .Pa ~/.ssh/known_hosts |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 900 | file, and refuses to connect to hosts whose host key has changed. |
| 901 | This provides maximum protection against trojan horse attacks, |
| 902 | however, can be annoying when the |
| 903 | .Pa /etc/ssh/ssh_known_hosts |
| 904 | file is poorly maintained, or connections to new hosts are |
| 905 | frequently made. |
| 906 | This option forces the user to manually |
| 907 | add all new hosts. |
| 908 | If this flag is set to |
| 909 | .Dq no , |
| 910 | .Nm ssh |
| 911 | will automatically add new host keys to the |
| 912 | user known hosts files. |
| 913 | If this flag is set to |
| 914 | .Dq ask , |
| 915 | new host keys |
| 916 | will be added to the user known host files only after the user |
| 917 | has confirmed that is what they really want to do, and |
| 918 | .Nm ssh |
| 919 | will refuse to connect to hosts whose host key has changed. |
| 920 | The host keys of |
| 921 | known hosts will be verified automatically in all cases. |
| 922 | The argument must be |
| 923 | .Dq yes , |
| 924 | .Dq no |
| 925 | or |
| 926 | .Dq ask . |
| 927 | The default is |
| 928 | .Dq ask . |
Damien Miller | 12c150e | 2003-12-17 16:31:10 +1100 | [diff] [blame] | 929 | .It Cm TCPKeepAlive |
| 930 | Specifies whether the system should send TCP keepalive messages to the |
| 931 | other side. |
| 932 | If they are sent, death of the connection or crash of one |
| 933 | of the machines will be properly noticed. |
| 934 | However, this means that |
| 935 | connections will die if the route is down temporarily, and some people |
| 936 | find it annoying. |
| 937 | .Pp |
| 938 | The default is |
| 939 | .Dq yes |
| 940 | (to send TCP keepalive messages), and the client will notice |
| 941 | if the network goes down or the remote host dies. |
| 942 | This is important in scripts, and many users want it too. |
| 943 | .Pp |
| 944 | To disable TCP keepalive messages, the value should be set to |
| 945 | .Dq no . |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 946 | .It Cm Tunnel |
| 947 | Request starting |
| 948 | .Xr tun 4 |
Damien Miller | 7746c39 | 2005-12-13 19:33:37 +1100 | [diff] [blame] | 949 | device forwarding between the client and the server. |
| 950 | This option also allows requesting layer 2 (ethernet) |
| 951 | instead of layer 3 (point-to-point) tunneling from the server. |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 952 | The argument must be |
Damien Miller | 7b58e80 | 2005-12-13 19:33:19 +1100 | [diff] [blame] | 953 | .Dq yes , |
| 954 | .Dq point-to-point , |
| 955 | .Dq ethernet |
Damien Miller | d27b947 | 2005-12-13 19:29:02 +1100 | [diff] [blame] | 956 | or |
| 957 | .Dq no . |
| 958 | The default is |
| 959 | .Dq no . |
| 960 | .It Cm TunnelDevice |
| 961 | Force a specified |
| 962 | .Xr tun 4 |
| 963 | device on the client. |
| 964 | Without this option, the next available device will be used. |
Damien Miller | e8cd741 | 2005-12-24 14:55:47 +1100 | [diff] [blame] | 965 | .It Cm UsePrivilegedPort |
| 966 | Specifies whether to use a privileged port for outgoing connections. |
| 967 | The argument must be |
| 968 | .Dq yes |
| 969 | or |
| 970 | .Dq no . |
| 971 | The default is |
| 972 | .Dq no . |
| 973 | If set to |
| 974 | .Dq yes |
| 975 | .Nm ssh |
| 976 | must be setuid root. |
| 977 | Note that this option must be set to |
| 978 | .Dq yes |
| 979 | for |
| 980 | .Cm RhostsRSAAuthentication |
| 981 | with older servers. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 982 | .It Cm User |
| 983 | Specifies the user to log in as. |
| 984 | This can be useful when a different user name is used on different machines. |
| 985 | This saves the trouble of |
| 986 | having to remember to give the user name on the command line. |
| 987 | .It Cm UserKnownHostsFile |
| 988 | Specifies a file to use for the user |
| 989 | host key database instead of |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 990 | .Pa ~/.ssh/known_hosts . |
Damien Miller | 37876e9 | 2003-05-15 10:19:46 +1000 | [diff] [blame] | 991 | .It Cm VerifyHostKeyDNS |
| 992 | Specifies whether to verify the remote key using DNS and SSHFP resource |
| 993 | records. |
Damien Miller | 150b557 | 2003-11-17 21:19:29 +1100 | [diff] [blame] | 994 | If this option is set to |
| 995 | .Dq yes , |
Damien Miller | fe44847 | 2003-11-17 21:19:49 +1100 | [diff] [blame] | 996 | the client will implicitly trust keys that match a secure fingerprint |
Damien Miller | 150b557 | 2003-11-17 21:19:29 +1100 | [diff] [blame] | 997 | from DNS. |
| 998 | Insecure fingerprints will be handled as if this option was set to |
| 999 | .Dq ask . |
| 1000 | If this option is set to |
| 1001 | .Dq ask , |
| 1002 | information on fingerprint match will be displayed, but the user will still |
| 1003 | need to confirm new host keys according to the |
| 1004 | .Cm StrictHostKeyChecking |
| 1005 | option. |
| 1006 | The argument must be |
| 1007 | .Dq yes , |
| 1008 | .Dq no |
Damien Miller | fe44847 | 2003-11-17 21:19:49 +1100 | [diff] [blame] | 1009 | or |
| 1010 | .Dq ask . |
Damien Miller | 37876e9 | 2003-05-15 10:19:46 +1000 | [diff] [blame] | 1011 | The default is |
| 1012 | .Dq no . |
Damien Miller | eacbb4f | 2003-06-02 19:10:41 +1000 | [diff] [blame] | 1013 | Note that this option applies to protocol version 2 only. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1014 | .It Cm XAuthLocation |
Damien Miller | 05913ba | 2002-09-04 16:51:03 +1000 | [diff] [blame] | 1015 | Specifies the full pathname of the |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1016 | .Xr xauth 1 |
| 1017 | program. |
| 1018 | The default is |
| 1019 | .Pa /usr/X11R6/bin/xauth . |
| 1020 | .El |
| 1021 | .Sh FILES |
| 1022 | .Bl -tag -width Ds |
Damien Miller | 167ea5d | 2005-05-26 12:04:02 +1000 | [diff] [blame] | 1023 | .It Pa ~/.ssh/config |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1024 | This is the per-user configuration file. |
| 1025 | The format of this file is described above. |
| 1026 | This file is used by the |
| 1027 | .Nm ssh |
| 1028 | client. |
Damien Miller | c970cb9 | 2004-04-20 20:12:53 +1000 | [diff] [blame] | 1029 | Because of the potential for abuse, this file must have strict permissions: |
| 1030 | read/write for the user, and not accessible by others. |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1031 | .It Pa /etc/ssh/ssh_config |
| 1032 | Systemwide configuration file. |
| 1033 | This file provides defaults for those |
| 1034 | values that are not specified in the user's configuration file, and |
| 1035 | for those users who do not have a configuration file. |
| 1036 | This file must be world-readable. |
| 1037 | .El |
Damien Miller | f1ce505 | 2003-06-11 22:04:39 +1000 | [diff] [blame] | 1038 | .Sh SEE ALSO |
| 1039 | .Xr ssh 1 |
Ben Lindstrom | 9f04903 | 2002-06-21 00:59:05 +0000 | [diff] [blame] | 1040 | .Sh AUTHORS |
| 1041 | OpenSSH is a derivative of the original and free |
| 1042 | ssh 1.2.12 release by Tatu Ylonen. |
| 1043 | Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, |
| 1044 | Theo de Raadt and Dug Song |
| 1045 | removed many bugs, re-added newer features and |
| 1046 | created OpenSSH. |
| 1047 | Markus Friedl contributed the support for SSH |
| 1048 | protocol versions 1.5 and 2.0. |