diff options
Diffstat (limited to 'other/openssh-2.1.1p4/ssh.1')
| -rw-r--r-- | other/openssh-2.1.1p4/ssh.1 | 1231 |
1 files changed, 0 insertions, 1231 deletions
diff --git a/other/openssh-2.1.1p4/ssh.1 b/other/openssh-2.1.1p4/ssh.1 deleted file mode 100644 index 905ebe0..0000000 --- a/other/openssh-2.1.1p4/ssh.1 +++ /dev/null | |||
| @@ -1,1231 +0,0 @@ | |||
| 1 | .\" -*- nroff -*- | ||
| 2 | .\" | ||
| 3 | .\" ssh.1.in | ||
| 4 | .\" | ||
| 5 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> | ||
| 6 | .\" | ||
| 7 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | ||
| 8 | .\" All rights reserved | ||
| 9 | .\" | ||
| 10 | .\" Created: Sat Apr 22 21:55:14 1995 ylo | ||
| 11 | .\" | ||
| 12 | .\" $Id: ssh.1,v 1.55 2000/05/31 06:36:40 markus Exp $ | ||
| 13 | .\" | ||
| 14 | .Dd September 25, 1999 | ||
| 15 | .Dt SSH 1 | ||
| 16 | .Os | ||
| 17 | .Sh NAME | ||
| 18 | .Nm ssh | ||
| 19 | .Nd OpenSSH secure shell client (remote login program) | ||
| 20 | .Sh SYNOPSIS | ||
| 21 | .Nm ssh | ||
| 22 | .Op Fl l Ar login_name | ||
| 23 | .Op Ar hostname | user@hostname | ||
| 24 | .Op Ar command | ||
| 25 | .Pp | ||
| 26 | .Nm ssh | ||
| 27 | .Op Fl afgknqtvxACNPTX246 | ||
| 28 | .Op Fl c Ar cipher_spec | ||
| 29 | .Op Fl e Ar escape_char | ||
| 30 | .Op Fl i Ar identity_file | ||
| 31 | .Op Fl l Ar login_name | ||
| 32 | .Op Fl o Ar option | ||
| 33 | .Op Fl p Ar port | ||
| 34 | .Oo Fl L Xo | ||
| 35 | .Sm off | ||
| 36 | .Ar port : | ||
| 37 | .Ar host : | ||
| 38 | .Ar hostport | ||
| 39 | .Sm on | ||
| 40 | .Xc | ||
| 41 | .Oc | ||
| 42 | .Oo Fl R Xo | ||
| 43 | .Sm off | ||
| 44 | .Ar port : | ||
| 45 | .Ar host : | ||
| 46 | .Ar hostport | ||
| 47 | .Sm on | ||
| 48 | .Xc | ||
| 49 | .Oc | ||
| 50 | .Op Ar hostname | user@hostname | ||
| 51 | .Op Ar command | ||
| 52 | .Sh DESCRIPTION | ||
| 53 | .Nm | ||
| 54 | (Secure Shell) is a program for logging into a remote machine and for | ||
| 55 | executing commands on a remote machine. | ||
| 56 | It is intended to replace | ||
| 57 | rlogin and rsh, and provide secure encrypted communications between | ||
| 58 | two untrusted hosts over an insecure network. | ||
| 59 | X11 connections and | ||
| 60 | arbitrary TCP/IP ports can also be forwarded over the secure channel. | ||
| 61 | .Pp | ||
| 62 | .Nm | ||
| 63 | connects and logs into the specified | ||
| 64 | .Ar hostname . | ||
| 65 | The user must prove | ||
| 66 | his/her identity to the remote machine using one of several methods | ||
| 67 | depending on the protocol version used: | ||
| 68 | .Pp | ||
| 69 | .Ss SSH protocol version 1 | ||
| 70 | .Pp | ||
| 71 | First, if the machine the user logs in from is listed in | ||
| 72 | .Pa /etc/hosts.equiv | ||
| 73 | or | ||
| 74 | .Pa /etc/shosts.equiv | ||
| 75 | on the remote machine, and the user names are | ||
| 76 | the same on both sides, the user is immediately permitted to log in. | ||
| 77 | Second, if | ||
| 78 | .Pa \&.rhosts | ||
| 79 | or | ||
| 80 | .Pa \&.shosts | ||
| 81 | exists in the user's home directory on the | ||
| 82 | remote machine and contains a line containing the name of the client | ||
| 83 | machine and the name of the user on that machine, the user is | ||
| 84 | permitted to log in. | ||
| 85 | This form of authentication alone is normally not | ||
| 86 | allowed by the server because it is not secure. | ||
| 87 | .Pp | ||
| 88 | The second (and primary) authentication method is the | ||
| 89 | .Pa rhosts | ||
| 90 | or | ||
| 91 | .Pa hosts.equiv | ||
| 92 | method combined with RSA-based host authentication. | ||
| 93 | It means that if the login would be permitted by | ||
| 94 | .Pa $HOME/.rhosts , | ||
| 95 | .Pa $HOME/.shosts , | ||
| 96 | .Pa /etc/hosts.equiv , | ||
| 97 | or | ||
| 98 | .Pa /etc/shosts.equiv , | ||
| 99 | and if additionally the server can verify the client's | ||
| 100 | host key (see | ||
| 101 | .Pa /etc/ssh_known_hosts | ||
| 102 | and | ||
| 103 | .Pa $HOME/.ssh/known_hosts | ||
| 104 | in the | ||
| 105 | .Sx FILES | ||
| 106 | section), only then login is permitted. | ||
| 107 | This authentication method closes security holes due to IP | ||
| 108 | spoofing, DNS spoofing and routing spoofing. | ||
| 109 | [Note to the administrator: | ||
| 110 | .Pa /etc/hosts.equiv , | ||
| 111 | .Pa $HOME/.rhosts , | ||
| 112 | and the rlogin/rsh protocol in general, are inherently insecure and should be | ||
| 113 | disabled if security is desired.] | ||
| 114 | .Pp | ||
| 115 | As a third authentication method, | ||
| 116 | .Nm | ||
| 117 | supports RSA based authentication. | ||
| 118 | The scheme is based on public-key cryptography: there are cryptosystems | ||
| 119 | where encryption and decryption are done using separate keys, and it | ||
| 120 | is not possible to derive the decryption key from the encryption key. | ||
| 121 | RSA is one such system. | ||
| 122 | The idea is that each user creates a public/private | ||
| 123 | key pair for authentication purposes. | ||
| 124 | The server knows the public key, and only the user knows the private key. | ||
| 125 | The file | ||
| 126 | .Pa $HOME/.ssh/authorized_keys | ||
| 127 | lists the public keys that are permitted for logging | ||
| 128 | in. | ||
| 129 | When the user logs in, the | ||
| 130 | .Nm | ||
| 131 | program tells the server which key pair it would like to use for | ||
| 132 | authentication. | ||
| 133 | The server checks if this key is permitted, and if | ||
| 134 | so, sends the user (actually the | ||
| 135 | .Nm | ||
| 136 | program running on behalf of the user) a challenge, a random number, | ||
| 137 | encrypted by the user's public key. | ||
| 138 | The challenge can only be | ||
| 139 | decrypted using the proper private key. | ||
| 140 | The user's client then decrypts the | ||
| 141 | challenge using the private key, proving that he/she knows the private | ||
| 142 | key but without disclosing it to the server. | ||
| 143 | .Pp | ||
| 144 | .Nm | ||
| 145 | implements the RSA authentication protocol automatically. | ||
| 146 | The user creates his/her RSA key pair by running | ||
| 147 | .Xr ssh-keygen 1 . | ||
| 148 | This stores the private key in | ||
| 149 | .Pa $HOME/.ssh/identity | ||
| 150 | and the public key in | ||
| 151 | .Pa $HOME/.ssh/identity.pub | ||
| 152 | in the user's home directory. | ||
| 153 | The user should then copy the | ||
| 154 | .Pa identity.pub | ||
| 155 | to | ||
| 156 | .Pa $HOME/.ssh/authorized_keys | ||
| 157 | in his/her home directory on the remote machine (the | ||
| 158 | .Pa authorized_keys | ||
| 159 | file corresponds to the conventional | ||
| 160 | .Pa $HOME/.rhosts | ||
| 161 | file, and has one key | ||
| 162 | per line, though the lines can be very long). | ||
| 163 | After this, the user can log in without giving the password. | ||
| 164 | RSA authentication is much | ||
| 165 | more secure than rhosts authentication. | ||
| 166 | .Pp | ||
| 167 | The most convenient way to use RSA authentication may be with an | ||
| 168 | authentication agent. | ||
| 169 | See | ||
| 170 | .Xr ssh-agent 1 | ||
| 171 | for more information. | ||
| 172 | .Pp | ||
| 173 | If other authentication methods fail, | ||
| 174 | .Nm | ||
| 175 | prompts the user for a password. | ||
| 176 | The password is sent to the remote | ||
| 177 | host for checking; however, since all communications are encrypted, | ||
| 178 | the password cannot be seen by someone listening on the network. | ||
| 179 | .Pp | ||
| 180 | .Ss SSH protocol version 2 | ||
| 181 | .Pp | ||
| 182 | When a user connects using the protocol version 2 | ||
| 183 | different authentication methods are available: | ||
| 184 | At first, the client attempts to authenticate using the public key method. | ||
| 185 | If this method fails password authentication is tried. | ||
| 186 | .Pp | ||
| 187 | The public key method is similar to RSA authentication described | ||
| 188 | in the previous section except that the DSA algorithm is used | ||
| 189 | instead of the patented RSA algorithm. | ||
| 190 | The client uses his private DSA key | ||
| 191 | .Pa $HOME/.ssh/id_dsa | ||
| 192 | to sign the session identifier and sends the result to the server. | ||
| 193 | The server checks whether the matching public key is listed in | ||
| 194 | .Pa $HOME/.ssh/authorized_keys2 | ||
| 195 | and grants access if both the key is found and the signature is correct. | ||
| 196 | The session identifier is derived from a shared Diffie-Hellman value | ||
| 197 | and is only known to the client and the server. | ||
| 198 | .Pp | ||
| 199 | If public key authentication fails or is not available a password | ||
| 200 | can be sent encrypted to the remote host for proving the user's identity. | ||
| 201 | This protocol 2 implementation does not yet support Kerberos or | ||
| 202 | S/Key authentication. | ||
| 203 | .Pp | ||
| 204 | Protocol 2 provides additional mechanisms for confidentiality | ||
| 205 | (the traffic is encrypted using 3DES, Blowfish, CAST128 or Arcfour) | ||
| 206 | and integrity (hmac-sha1, hmac-md5). | ||
| 207 | Note that protocol 1 lacks a strong mechanism for ensuring the | ||
| 208 | integrity of the connection. | ||
| 209 | .Pp | ||
| 210 | .Ss Login session and remote execution | ||
| 211 | .Pp | ||
| 212 | When the user's identity has been accepted by the server, the server | ||
| 213 | either executes the given command, or logs into the machine and gives | ||
| 214 | the user a normal shell on the remote machine. | ||
| 215 | All communication with | ||
| 216 | the remote command or shell will be automatically encrypted. | ||
| 217 | .Pp | ||
| 218 | If a pseudo-terminal has been allocated (normal login session), the | ||
| 219 | user can disconnect with | ||
| 220 | .Ic ~. , | ||
| 221 | and suspend | ||
| 222 | .Nm | ||
| 223 | with | ||
| 224 | .Ic ~^Z . | ||
| 225 | All forwarded connections can be listed with | ||
| 226 | .Ic ~# | ||
| 227 | and if | ||
| 228 | the session blocks waiting for forwarded X11 or TCP/IP | ||
| 229 | connections to terminate, it can be backgrounded with | ||
| 230 | .Ic ~& | ||
| 231 | (this should not be used while the user shell is active, as it can cause the | ||
| 232 | shell to hang). | ||
| 233 | All available escapes can be listed with | ||
| 234 | .Ic ~? . | ||
| 235 | .Pp | ||
| 236 | A single tilde character can be sent as | ||
| 237 | .Ic ~~ | ||
| 238 | (or by following the tilde by a character other than those described above). | ||
| 239 | The escape character must always follow a newline to be interpreted as | ||
| 240 | special. | ||
| 241 | The escape character can be changed in configuration files | ||
| 242 | or on the command line. | ||
| 243 | .Pp | ||
| 244 | If no pseudo tty has been allocated, the | ||
| 245 | session is transparent and can be used to reliably transfer binary | ||
| 246 | data. | ||
| 247 | On most systems, setting the escape character to | ||
| 248 | .Dq none | ||
| 249 | will also make the session transparent even if a tty is used. | ||
| 250 | .Pp | ||
| 251 | The session terminates when the command or shell in on the remote | ||
| 252 | machine exists and all X11 and TCP/IP connections have been closed. | ||
| 253 | The exit status of the remote program is returned as the exit status | ||
| 254 | of | ||
| 255 | .Nm ssh . | ||
| 256 | .Pp | ||
| 257 | .Ss X11 and TCP forwarding | ||
| 258 | .Pp | ||
| 259 | If the user is using X11 (the | ||
| 260 | .Ev DISPLAY | ||
| 261 | environment variable is set), the connection to the X11 display is | ||
| 262 | automatically forwarded to the remote side in such a way that any X11 | ||
| 263 | programs started from the shell (or command) will go through the | ||
| 264 | encrypted channel, and the connection to the real X server will be made | ||
| 265 | from the local machine. | ||
| 266 | The user should not manually set | ||
| 267 | .Ev DISPLAY . | ||
| 268 | Forwarding of X11 connections can be | ||
| 269 | configured on the command line or in configuration files. | ||
| 270 | .Pp | ||
| 271 | The | ||
| 272 | .Ev DISPLAY | ||
| 273 | value set by | ||
| 274 | .Nm | ||
| 275 | will point to the server machine, but with a display number greater | ||
| 276 | than zero. | ||
| 277 | This is normal, and happens because | ||
| 278 | .Nm | ||
| 279 | creates a | ||
| 280 | .Dq proxy | ||
| 281 | X server on the server machine for forwarding the | ||
| 282 | connections over the encrypted channel. | ||
| 283 | .Pp | ||
| 284 | .Nm | ||
| 285 | will also automatically set up Xauthority data on the server machine. | ||
| 286 | For this purpose, it will generate a random authorization cookie, | ||
| 287 | store it in Xauthority on the server, and verify that any forwarded | ||
| 288 | connections carry this cookie and replace it by the real cookie when | ||
| 289 | the connection is opened. | ||
| 290 | The real authentication cookie is never | ||
| 291 | sent to the server machine (and no cookies are sent in the plain). | ||
| 292 | .Pp | ||
| 293 | If the user is using an authentication agent, the connection to the agent | ||
| 294 | is automatically forwarded to the remote side unless disabled on | ||
| 295 | command line or in a configuration file. | ||
| 296 | .Pp | ||
| 297 | Forwarding of arbitrary TCP/IP connections over the secure channel can | ||
| 298 | be specified either on command line or in a configuration file. | ||
| 299 | One possible application of TCP/IP forwarding is a secure connection to an | ||
| 300 | electronic purse; another is going trough firewalls. | ||
| 301 | .Pp | ||
| 302 | .Ss Server authentication | ||
| 303 | .Pp | ||
| 304 | .Nm | ||
| 305 | automatically maintains and checks a database containing | ||
| 306 | identifications for all hosts it has ever been used with. | ||
| 307 | RSA host keys are stored in | ||
| 308 | .Pa $HOME/.ssh/known_hosts | ||
| 309 | and | ||
| 310 | DSA host keys are stored in | ||
| 311 | .Pa $HOME/.ssh/known_hosts2 | ||
| 312 | in the user's home directory. | ||
| 313 | Additionally, the files | ||
| 314 | .Pa /etc/ssh_known_hosts | ||
| 315 | and | ||
| 316 | .Pa /etc/ssh_known_hosts2 | ||
| 317 | are automatically checked for known hosts. | ||
| 318 | Any new hosts are automatically added to the user's file. | ||
| 319 | If a host's identification | ||
| 320 | ever changes, | ||
| 321 | .Nm | ||
| 322 | warns about this and disables password authentication to prevent a | ||
| 323 | trojan horse from getting the user's password. | ||
| 324 | Another purpose of | ||
| 325 | this mechanism is to prevent man-in-the-middle attacks which could | ||
| 326 | otherwise be used to circumvent the encryption. | ||
| 327 | The | ||
| 328 | .Cm StrictHostKeyChecking | ||
| 329 | option (see below) can be used to prevent logins to machines whose | ||
| 330 | host key is not known or has changed. | ||
| 331 | .Sh OPTIONS | ||
| 332 | .Bl -tag -width Ds | ||
| 333 | .It Fl a | ||
| 334 | Disables forwarding of the authentication agent connection. | ||
| 335 | .It Fl A | ||
| 336 | Enables forwarding of the authentication agent connection. | ||
| 337 | This can also be specified on a per-host basis in a configuration file. | ||
| 338 | .It Fl c Ar blowfish|3des | ||
| 339 | Selects the cipher to use for encrypting the session. | ||
| 340 | .Ar 3des | ||
| 341 | is used by default. | ||
| 342 | It is believed to be secure. | ||
| 343 | .Ar 3des | ||
| 344 | (triple-des) is an encrypt-decrypt-encrypt triple with three different keys. | ||
| 345 | It is presumably more secure than the | ||
| 346 | .Ar des | ||
| 347 | cipher which is no longer supported in | ||
| 348 | .Nm ssh . | ||
| 349 | .Ar blowfish | ||
| 350 | is a fast block cipher, it appears very secure and is much faster than | ||
| 351 | .Ar 3des . | ||
| 352 | .It Fl c Ar "3des-cbc,blowfish-cbc,arcfour,cast128-cbc" | ||
| 353 | Additionally, for protocol version 2 a comma-separated list of ciphers can | ||
| 354 | be specified in order of preference. Protocol version 2 supports | ||
| 355 | 3DES, Blowfish and CAST128 in CBC mode and Arcfour. | ||
| 356 | .It Fl e Ar ch|^ch|none | ||
| 357 | Sets the escape character for sessions with a pty (default: | ||
| 358 | .Ql ~ ) . | ||
| 359 | The escape character is only recognized at the beginning of a line. | ||
| 360 | The escape character followed by a dot | ||
| 361 | .Pq Ql \&. | ||
| 362 | closes the connection, followed | ||
| 363 | by control-Z suspends the connection, and followed by itself sends the | ||
| 364 | escape character once. | ||
| 365 | Setting the character to | ||
| 366 | .Dq none | ||
| 367 | disables any escapes and makes the session fully transparent. | ||
| 368 | .It Fl f | ||
| 369 | Requests | ||
| 370 | .Nm | ||
| 371 | to go to background just before command execution. | ||
| 372 | This is useful if | ||
| 373 | .Nm | ||
| 374 | is going to ask for passwords or passphrases, but the user | ||
| 375 | wants it in the background. | ||
| 376 | This implies | ||
| 377 | .Fl n . | ||
| 378 | The recommended way to start X11 programs at a remote site is with | ||
| 379 | something like | ||
| 380 | .Ic ssh -f host xterm . | ||
| 381 | .It Fl g | ||
| 382 | Allows remote hosts to connect to local forwarded ports. | ||
| 383 | .It Fl i Ar identity_file | ||
| 384 | Selects the file from which the identity (private key) for | ||
| 385 | RSA authentication is read. | ||
| 386 | Default is | ||
| 387 | .Pa $HOME/.ssh/identity | ||
| 388 | in the user's home directory. | ||
| 389 | Identity files may also be specified on | ||
| 390 | a per-host basis in the configuration file. | ||
| 391 | It is possible to have multiple | ||
| 392 | .Fl i | ||
| 393 | options (and multiple identities specified in | ||
| 394 | configuration files). | ||
| 395 | .It Fl k | ||
| 396 | Disables forwarding of Kerberos tickets and AFS tokens. | ||
| 397 | This may also be specified on a per-host basis in the configuration file. | ||
| 398 | .It Fl l Ar login_name | ||
| 399 | Specifies the user to log in as on the remote machine. | ||
| 400 | This also may be specified on a per-host basis in the configuration file. | ||
| 401 | .It Fl n | ||
| 402 | Redirects stdin from | ||
| 403 | .Pa /dev/null | ||
| 404 | (actually, prevents reading from stdin). | ||
| 405 | This must be used when | ||
| 406 | .Nm | ||
| 407 | is run in the background. | ||
| 408 | A common trick is to use this to run X11 programs on a remote machine. | ||
| 409 | For example, | ||
| 410 | .Ic ssh -n shadows.cs.hut.fi emacs & | ||
| 411 | will start an emacs on shadows.cs.hut.fi, and the X11 | ||
| 412 | connection will be automatically forwarded over an encrypted channel. | ||
| 413 | The | ||
| 414 | .Nm | ||
| 415 | program will be put in the background. | ||
| 416 | (This does not work if | ||
| 417 | .Nm | ||
| 418 | needs to ask for a password or passphrase; see also the | ||
| 419 | .Fl f | ||
| 420 | option.) | ||
| 421 | .It Fl N | ||
| 422 | Do not execute a remote command. | ||
| 423 | This is usefull if you just want to forward ports | ||
| 424 | (protocol version 2 only). | ||
| 425 | .It Fl o Ar option | ||
| 426 | Can be used to give options in the format used in the config file. | ||
| 427 | This is useful for specifying options for which there is no separate | ||
| 428 | command-line flag. | ||
| 429 | The option has the same format as a line in the configuration file. | ||
| 430 | .It Fl p Ar port | ||
| 431 | Port to connect to on the remote host. | ||
| 432 | This can be specified on a | ||
| 433 | per-host basis in the configuration file. | ||
| 434 | .It Fl P | ||
| 435 | Use a non-privileged port for outgoing connections. | ||
| 436 | This can be used if your firewall does | ||
| 437 | not permit connections from privileged ports. | ||
| 438 | Note that this option turns off | ||
| 439 | .Cm RhostsAuthentication | ||
| 440 | and | ||
| 441 | .Cm RhostsRSAAuthentication . | ||
| 442 | .It Fl q | ||
| 443 | Quiet mode. | ||
| 444 | Causes all warning and diagnostic messages to be suppressed. | ||
| 445 | Only fatal errors are displayed. | ||
| 446 | .It Fl t | ||
| 447 | Force pseudo-tty allocation. | ||
| 448 | This can be used to execute arbitrary | ||
| 449 | screen-based programs on a remote machine, which can be very useful, | ||
| 450 | e.g., when implementing menu services. | ||
| 451 | .It Fl T | ||
| 452 | Disable pseudo-tty allocation (protocol version 2 only). | ||
| 453 | .It Fl v | ||
| 454 | Verbose mode. | ||
| 455 | Causes | ||
| 456 | .Nm | ||
| 457 | to print debugging messages about its progress. | ||
| 458 | This is helpful in | ||
| 459 | debugging connection, authentication, and configuration problems. | ||
| 460 | The verbose mode is also used to display | ||
| 461 | .Xr skey 1 | ||
| 462 | challenges, if the user entered "s/key" as password. | ||
| 463 | .It Fl x | ||
| 464 | Disables X11 forwarding. | ||
| 465 | .It Fl X | ||
| 466 | Enables X11 forwarding. | ||
| 467 | This can also be specified on a per-host basis in a configuration file. | ||
| 468 | .It Fl C | ||
| 469 | Requests compression of all data (including stdin, stdout, stderr, and | ||
| 470 | data for forwarded X11 and TCP/IP connections). | ||
| 471 | The compression algorithm is the same used by | ||
| 472 | .Xr gzip 1 , | ||
| 473 | and the | ||
| 474 | .Dq level | ||
| 475 | can be controlled by the | ||
| 476 | .Cm CompressionLevel | ||
| 477 | option (see below). | ||
| 478 | Compression is desirable on modem lines and other | ||
| 479 | slow connections, but will only slow down things on fast networks. | ||
| 480 | The default value can be set on a host-by-host basis in the | ||
| 481 | configuration files; see the | ||
| 482 | .Cm Compress | ||
| 483 | option below. | ||
| 484 | .It Fl L Ar port:host:hostport | ||
| 485 | Specifies that the given port on the local (client) host is to be | ||
| 486 | forwarded to the given host and port on the remote side. | ||
| 487 | This works by allocating a socket to listen to | ||
| 488 | .Ar port | ||
| 489 | on the local side, and whenever a connection is made to this port, the | ||
| 490 | connection is forwarded over the secure channel, and a connection is | ||
| 491 | made to | ||
| 492 | .Ar host | ||
| 493 | port | ||
| 494 | .Ar hostport | ||
| 495 | from the remote machine. | ||
| 496 | Port forwardings can also be specified in the configuration file. | ||
| 497 | Only root can forward privileged ports. | ||
| 498 | IPv6 addresses can be specified with an alternative syntax: | ||
| 499 | .Ar port/host/hostport | ||
| 500 | .It Fl R Ar port:host:hostport | ||
| 501 | Specifies that the given port on the remote (server) host is to be | ||
| 502 | forwarded to the given host and port on the local side. | ||
| 503 | This works by allocating a socket to listen to | ||
| 504 | .Ar port | ||
| 505 | on the remote side, and whenever a connection is made to this port, the | ||
| 506 | connection is forwarded over the secure channel, and a connection is | ||
| 507 | made to | ||
| 508 | .Ar host | ||
| 509 | port | ||
| 510 | .Ar hostport | ||
| 511 | from the local machine. | ||
| 512 | Port forwardings can also be specified in the configuration file. | ||
| 513 | Privileged ports can be forwarded only when | ||
| 514 | logging in as root on the remote machine. | ||
| 515 | .It Fl 2 | ||
| 516 | Forces | ||
| 517 | .Nm | ||
| 518 | to try protocol version 2 only. | ||
| 519 | .It Fl 4 | ||
| 520 | Forces | ||
| 521 | .Nm | ||
| 522 | to use IPv4 addresses only. | ||
| 523 | .It Fl 6 | ||
| 524 | Forces | ||
| 525 | .Nm | ||
| 526 | to use IPv6 addresses only. | ||
| 527 | .El | ||
| 528 | .Sh CONFIGURATION FILES | ||
| 529 | .Nm | ||
| 530 | obtains configuration data from the following sources (in this order): | ||
| 531 | command line options, user's configuration file | ||
| 532 | .Pq Pa $HOME/.ssh/config , | ||
| 533 | and system-wide configuration file | ||
| 534 | .Pq Pa /etc/ssh_config . | ||
| 535 | For each parameter, the first obtained value | ||
| 536 | will be used. | ||
| 537 | The configuration files contain sections bracketed by | ||
| 538 | .Dq Host | ||
| 539 | specifications, and that section is only applied for hosts that | ||
| 540 | match one of the patterns given in the specification. | ||
| 541 | The matched host name is the one given on the command line. | ||
| 542 | .Pp | ||
| 543 | Since the first obtained value for each parameter is used, more | ||
| 544 | host-specific declarations should be given near the beginning of the | ||
| 545 | file, and general defaults at the end. | ||
| 546 | .Pp | ||
| 547 | The configuration file has the following format: | ||
| 548 | .Pp | ||
| 549 | Empty lines and lines starting with | ||
| 550 | .Ql # | ||
| 551 | are comments. | ||
| 552 | .Pp | ||
| 553 | Otherwise a line is of the format | ||
| 554 | .Dq keyword arguments . | ||
| 555 | The possible | ||
| 556 | keywords and their meanings are as follows (note that the | ||
| 557 | configuration files are case-sensitive): | ||
| 558 | .Bl -tag -width Ds | ||
| 559 | .It Cm Host | ||
| 560 | Restricts the following declarations (up to the next | ||
| 561 | .Cm Host | ||
| 562 | keyword) to be only for those hosts that match one of the patterns | ||
| 563 | given after the keyword. | ||
| 564 | .Ql \&* | ||
| 565 | and | ||
| 566 | .Ql ? | ||
| 567 | can be used as wildcards in the | ||
| 568 | patterns. | ||
| 569 | A single | ||
| 570 | .Ql \&* | ||
| 571 | as a pattern can be used to provide global | ||
| 572 | defaults for all hosts. | ||
| 573 | The host is the | ||
| 574 | .Ar hostname | ||
| 575 | argument given on the command line (i.e., the name is not converted to | ||
| 576 | a canonicalized host name before matching). | ||
| 577 | .It Cm AFSTokenPassing | ||
| 578 | Specifies whether to pass AFS tokens to remote host. | ||
| 579 | The argument to this keyword must be | ||
| 580 | .Dq yes | ||
| 581 | or | ||
| 582 | .Dq no . | ||
| 583 | .It Cm BatchMode | ||
| 584 | If set to | ||
| 585 | .Dq yes , | ||
| 586 | passphrase/password querying will be disabled. | ||
| 587 | This option is useful in scripts and other batch jobs where you have no | ||
| 588 | user to supply the password. | ||
| 589 | The argument must be | ||
| 590 | .Dq yes | ||
| 591 | or | ||
| 592 | .Dq no . | ||
| 593 | .It Cm CheckHostIP | ||
| 594 | If this flag is set to | ||
| 595 | .Dq yes , | ||
| 596 | ssh will additionally check the host ip address in the | ||
| 597 | .Pa known_hosts | ||
| 598 | file. | ||
| 599 | This allows ssh to detect if a host key changed due to DNS spoofing. | ||
| 600 | If the option is set to | ||
| 601 | .Dq no , | ||
| 602 | the check will not be executed. | ||
| 603 | .It Cm Cipher | ||
| 604 | Specifies the cipher to use for encrypting the session. | ||
| 605 | Currently, | ||
| 606 | .Dq blowfish , | ||
| 607 | and | ||
| 608 | .Dq 3des | ||
| 609 | are supported. | ||
| 610 | The default is | ||
| 611 | .Dq 3des . | ||
| 612 | .It Cm Ciphers | ||
| 613 | Specifies the ciphers allowed for protocol version 2 | ||
| 614 | in order of preference. | ||
| 615 | Multiple ciphers must be comma-separated. | ||
| 616 | The default is | ||
| 617 | .Dq 3des-cbc,blowfish-cbc,arcfour,cast128-cbc . | ||
| 618 | .It Cm Compression | ||
| 619 | Specifies whether to use compression. | ||
| 620 | The argument must be | ||
| 621 | .Dq yes | ||
| 622 | or | ||
| 623 | .Dq no . | ||
| 624 | .It Cm CompressionLevel | ||
| 625 | Specifies the compression level to use if compression is enable. | ||
| 626 | The argument must be an integer from 1 (fast) to 9 (slow, best). | ||
| 627 | The default level is 6, which is good for most applications. | ||
| 628 | The meaning of the values is the same as in | ||
| 629 | .Xr gzip 1 . | ||
| 630 | .It Cm ConnectionAttempts | ||
| 631 | Specifies the number of tries (one per second) to make before falling | ||
| 632 | back to rsh or exiting. | ||
| 633 | The argument must be an integer. | ||
| 634 | This may be useful in scripts if the connection sometimes fails. | ||
| 635 | .It Cm DSAAuthentication | ||
| 636 | Specifies whether to try DSA authentication. | ||
| 637 | The argument to this keyword must be | ||
| 638 | .Dq yes | ||
| 639 | or | ||
| 640 | .Dq no . | ||
| 641 | DSA authentication will only be | ||
| 642 | attempted if a DSA identity file exists. | ||
| 643 | Note that this option applies to protocol version 2 only. | ||
| 644 | .It Cm EscapeChar | ||
| 645 | Sets the escape character (default: | ||
| 646 | .Ql ~ ) . | ||
| 647 | The escape character can also | ||
| 648 | be set on the command line. | ||
| 649 | The argument should be a single character, | ||
| 650 | .Ql ^ | ||
| 651 | followed by a letter, or | ||
| 652 | .Dq none | ||
| 653 | to disable the escape | ||
| 654 | character entirely (making the connection transparent for binary | ||
| 655 | data). | ||
| 656 | .It Cm FallBackToRsh | ||
| 657 | Specifies that if connecting via | ||
| 658 | .Nm | ||
| 659 | fails due to a connection refused error (there is no | ||
| 660 | .Xr sshd 8 | ||
| 661 | listening on the remote host), | ||
| 662 | .Xr rsh 1 | ||
| 663 | should automatically be used instead (after a suitable warning about | ||
| 664 | the session being unencrypted). | ||
| 665 | The argument must be | ||
| 666 | .Dq yes | ||
| 667 | or | ||
| 668 | .Dq no . | ||
| 669 | .It Cm ForwardAgent | ||
| 670 | Specifies whether the connection to the authentication agent (if any) | ||
| 671 | will be forwarded to the remote machine. | ||
| 672 | The argument must be | ||
| 673 | .Dq yes | ||
| 674 | or | ||
| 675 | .Dq no . | ||
| 676 | The default is | ||
| 677 | .Dq no . | ||
| 678 | .It Cm ForwardX11 | ||
| 679 | Specifies whether X11 connections will be automatically redirected | ||
| 680 | over the secure channel and | ||
| 681 | .Ev DISPLAY | ||
| 682 | set. | ||
| 683 | The argument must be | ||
| 684 | .Dq yes | ||
| 685 | or | ||
| 686 | .Dq no . | ||
| 687 | The default is | ||
| 688 | .Dq no . | ||
| 689 | .It Cm GatewayPorts | ||
| 690 | Specifies whether remote hosts are allowed to connect to local | ||
| 691 | forwarded ports. | ||
| 692 | The argument must be | ||
| 693 | .Dq yes | ||
| 694 | or | ||
| 695 | .Dq no . | ||
| 696 | The default is | ||
| 697 | .Dq no . | ||
| 698 | .It Cm GlobalKnownHostsFile | ||
| 699 | Specifies a file to use instead of | ||
| 700 | .Pa /etc/ssh_known_hosts . | ||
| 701 | .It Cm HostName | ||
| 702 | Specifies the real host name to log into. | ||
| 703 | This can be used to specify nicknames or abbreviations for hosts. | ||
| 704 | Default is the name given on the command line. | ||
| 705 | Numeric IP addresses are also permitted (both on the command line and in | ||
| 706 | .Cm HostName | ||
| 707 | specifications). | ||
| 708 | .It Cm IdentityFile | ||
| 709 | Specifies the file from which the user's RSA authentication identity | ||
| 710 | is read (default | ||
| 711 | .Pa $HOME/.ssh/identity | ||
| 712 | in the user's home directory). | ||
| 713 | Additionally, any identities represented by the authentication agent | ||
| 714 | will be used for authentication. | ||
| 715 | The file name may use the tilde | ||
| 716 | syntax to refer to a user's home directory. | ||
| 717 | It is possible to have | ||
| 718 | multiple identity files specified in configuration files; all these | ||
| 719 | identities will be tried in sequence. | ||
| 720 | .It Cm IdentityFile2 | ||
| 721 | Specifies the file from which the user's DSA authentication identity | ||
| 722 | is read (default | ||
| 723 | .Pa $HOME/.ssh/id_dsa | ||
| 724 | in the user's home directory). | ||
| 725 | The file name may use the tilde | ||
| 726 | syntax to refer to a user's home directory. | ||
| 727 | It is possible to have | ||
| 728 | multiple identity files specified in configuration files; all these | ||
| 729 | identities will be tried in sequence. | ||
| 730 | .It Cm KeepAlive | ||
| 731 | Specifies whether the system should send keepalive messages to the | ||
| 732 | other side. | ||
| 733 | If they are sent, death of the connection or crash of one | ||
| 734 | of the machines will be properly noticed. | ||
| 735 | However, this means that | ||
| 736 | connections will die if the route is down temporarily, and some people | ||
| 737 | find it annoying. | ||
| 738 | .Pp | ||
| 739 | The default is | ||
| 740 | .Dq yes | ||
| 741 | (to send keepalives), and the client will notice | ||
| 742 | if the network goes down or the remote host dies. | ||
| 743 | This is important in scripts, and many users want it too. | ||
| 744 | .Pp | ||
| 745 | To disable keepalives, the value should be set to | ||
| 746 | .Dq no | ||
| 747 | in both the server and the client configuration files. | ||
| 748 | .It Cm KerberosAuthentication | ||
| 749 | Specifies whether Kerberos authentication will be used. | ||
| 750 | The argument to this keyword must be | ||
| 751 | .Dq yes | ||
| 752 | or | ||
| 753 | .Dq no . | ||
| 754 | .It Cm KerberosTgtPassing | ||
| 755 | Specifies whether a Kerberos TGT will be forwarded to the server. | ||
| 756 | This will only work if the Kerberos server is actually an AFS kaserver. | ||
| 757 | The argument to this keyword must be | ||
| 758 | .Dq yes | ||
| 759 | or | ||
| 760 | .Dq no . | ||
| 761 | .It Cm LocalForward | ||
| 762 | Specifies that a TCP/IP port on the local machine be forwarded over | ||
| 763 | the secure channel to given host:port from the remote machine. | ||
| 764 | The first argument must be a port number, and the second must be | ||
| 765 | host:port. | ||
| 766 | Multiple forwardings may be specified, and additional | ||
| 767 | forwardings can be given on the command line. | ||
| 768 | Only the superuser can forward privileged ports. | ||
| 769 | .It Cm LogLevel | ||
| 770 | Gives the verbosity level that is used when logging messages from | ||
| 771 | .Nm ssh . | ||
| 772 | The possible values are: | ||
| 773 | QUIET, FATAL, ERROR, INFO, VERBOSE and DEBUG. | ||
| 774 | The default is INFO. | ||
| 775 | .It Cm NumberOfPasswordPrompts | ||
| 776 | Specifies the number of password prompts before giving up. | ||
| 777 | The argument to this keyword must be an integer. | ||
| 778 | Default is 3. | ||
| 779 | .It Cm PasswordAuthentication | ||
| 780 | Specifies whether to use password authentication. | ||
| 781 | The argument to this keyword must be | ||
| 782 | .Dq yes | ||
| 783 | or | ||
| 784 | .Dq no . | ||
| 785 | Note that this option applies to both protocol version 1 and 2. | ||
| 786 | .It Cm Port | ||
| 787 | Specifies the port number to connect on the remote host. | ||
| 788 | Default is 22. | ||
| 789 | .It Cm Protocol | ||
| 790 | Specifies the protocol versions | ||
| 791 | .Nm | ||
| 792 | should support in order of preference. | ||
| 793 | The possible values are | ||
| 794 | .Dq 1 | ||
| 795 | and | ||
| 796 | .Dq 2 . | ||
| 797 | Multiple versions must be comma-separated. | ||
| 798 | The default is | ||
| 799 | .Dq 1,2 . | ||
| 800 | This means that | ||
| 801 | .Nm | ||
| 802 | tries version 1 and falls back to version 2 | ||
| 803 | if version 1 is not available. | ||
| 804 | .It Cm ProxyCommand | ||
| 805 | Specifies the command to use to connect to the server. | ||
| 806 | The command | ||
| 807 | string extends to the end of the line, and is executed with | ||
| 808 | .Pa /bin/sh . | ||
| 809 | In the command string, | ||
| 810 | .Ql %h | ||
| 811 | will be substituted by the host name to | ||
| 812 | connect and | ||
| 813 | .Ql %p | ||
| 814 | by the port. | ||
| 815 | The command can be basically anything, | ||
| 816 | and should read from its standard input and write to its standard output. | ||
| 817 | It should eventually connect an | ||
| 818 | .Xr sshd 8 | ||
| 819 | server running on some machine, or execute | ||
| 820 | .Ic sshd -i | ||
| 821 | somewhere. | ||
| 822 | Host key management will be done using the | ||
| 823 | HostName of the host being connected (defaulting to the name typed by | ||
| 824 | the user). | ||
| 825 | Note that | ||
| 826 | .Cm CheckHostIP | ||
| 827 | is not available for connects with a proxy command. | ||
| 828 | .Pp | ||
| 829 | .It Cm RemoteForward | ||
| 830 | Specifies that a TCP/IP port on the remote machine be forwarded over | ||
| 831 | the secure channel to given host:port from the local machine. | ||
| 832 | The first argument must be a port number, and the second must be | ||
| 833 | host:port. | ||
| 834 | Multiple forwardings may be specified, and additional | ||
| 835 | forwardings can be given on the command line. | ||
| 836 | Only the superuser can forward privileged ports. | ||
| 837 | .It Cm RhostsAuthentication | ||
| 838 | Specifies whether to try rhosts based authentication. | ||
| 839 | Note that this | ||
| 840 | declaration only affects the client side and has no effect whatsoever | ||
| 841 | on security. | ||
| 842 | Disabling rhosts authentication may reduce | ||
| 843 | authentication time on slow connections when rhosts authentication is | ||
| 844 | not used. | ||
| 845 | Most servers do not permit RhostsAuthentication because it | ||
| 846 | is not secure (see RhostsRSAAuthentication). | ||
| 847 | The argument to this keyword must be | ||
| 848 | .Dq yes | ||
| 849 | or | ||
| 850 | .Dq no . | ||
| 851 | .It Cm RhostsRSAAuthentication | ||
| 852 | Specifies whether to try rhosts based authentication with RSA host | ||
| 853 | authentication. | ||
| 854 | This is the primary authentication method for most sites. | ||
| 855 | The argument must be | ||
| 856 | .Dq yes | ||
| 857 | or | ||
| 858 | .Dq no . | ||
| 859 | .It Cm RSAAuthentication | ||
| 860 | Specifies whether to try RSA authentication. | ||
| 861 | The argument to this keyword must be | ||
| 862 | .Dq yes | ||
| 863 | or | ||
| 864 | .Dq no . | ||
| 865 | RSA authentication will only be | ||
| 866 | attempted if the identity file exists, or an authentication agent is | ||
| 867 | running. | ||
| 868 | Note that this option applies to protocol version 1 only. | ||
| 869 | .It Cm SkeyAuthentication | ||
| 870 | Specifies whether to use | ||
| 871 | .Xr skey 1 | ||
| 872 | authentication. | ||
| 873 | The argument to this keyword must be | ||
| 874 | .Dq yes | ||
| 875 | or | ||
| 876 | .Dq no . | ||
| 877 | The default is | ||
| 878 | .Dq no . | ||
| 879 | .It Cm StrictHostKeyChecking | ||
| 880 | If this flag is set to | ||
| 881 | .Dq yes , | ||
| 882 | .Nm | ||
| 883 | ssh will never automatically add host keys to the | ||
| 884 | .Pa $HOME/.ssh/known_hosts | ||
| 885 | and | ||
| 886 | .Pa $HOME/.ssh/known_hosts2 | ||
| 887 | files, and refuses to connect hosts whose host key has changed. | ||
| 888 | This provides maximum protection against trojan horse attacks. | ||
| 889 | However, it can be somewhat annoying if you don't have good | ||
| 890 | .Pa /etc/ssh_known_hosts | ||
| 891 | and | ||
| 892 | .Pa /etc/ssh_known_hosts2 | ||
| 893 | files installed and frequently | ||
| 894 | connect new hosts. | ||
| 895 | Basically this option forces the user to manually | ||
| 896 | add any new hosts. | ||
| 897 | Normally this option is disabled, and new hosts | ||
| 898 | will automatically be added to the known host files. | ||
| 899 | The host keys of | ||
| 900 | known hosts will be verified automatically in either case. | ||
| 901 | The argument must be | ||
| 902 | .Dq yes | ||
| 903 | or | ||
| 904 | .Dq no . | ||
| 905 | .It Cm UsePrivilegedPort | ||
| 906 | Specifies whether to use a privileged port for outgoing connections. | ||
| 907 | The argument must be | ||
| 908 | .Dq yes | ||
| 909 | or | ||
| 910 | .Dq no . | ||
| 911 | The default is | ||
| 912 | .Dq yes . | ||
| 913 | Note that setting this option to | ||
| 914 | .Dq no | ||
| 915 | turns off | ||
| 916 | .Cm RhostsAuthentication | ||
| 917 | and | ||
| 918 | .Cm RhostsRSAAuthentication . | ||
| 919 | .It Cm User | ||
| 920 | Specifies the user to log in as. | ||
| 921 | This can be useful if you have a different user name on different machines. | ||
| 922 | This saves the trouble of | ||
| 923 | having to remember to give the user name on the command line. | ||
| 924 | .It Cm UserKnownHostsFile | ||
| 925 | Specifies a file to use instead of | ||
| 926 | .Pa $HOME/.ssh/known_hosts . | ||
| 927 | .It Cm UseRsh | ||
| 928 | Specifies that rlogin/rsh should be used for this host. | ||
| 929 | It is possible that the host does not at all support the | ||
| 930 | .Nm | ||
| 931 | protocol. | ||
| 932 | This causes | ||
| 933 | .Nm | ||
| 934 | to immediately execute | ||
| 935 | .Xr rsh 1 . | ||
| 936 | All other options (except | ||
| 937 | .Cm HostName ) | ||
| 938 | are ignored if this has been specified. | ||
| 939 | The argument must be | ||
| 940 | .Dq yes | ||
| 941 | or | ||
| 942 | .Dq no . | ||
| 943 | .It Cm XAuthLocation | ||
| 944 | Specifies the location of the | ||
| 945 | .Xr xauth 1 | ||
| 946 | program. | ||
| 947 | The default is | ||
| 948 | .Pa /usr/X11R6/bin/xauth . | ||
| 949 | .Sh ENVIRONMENT | ||
| 950 | .Nm | ||
| 951 | will normally set the following environment variables: | ||
| 952 | .Bl -tag -width Ds | ||
| 953 | .It Ev DISPLAY | ||
| 954 | The | ||
| 955 | .Ev DISPLAY | ||
| 956 | variable indicates the location of the X11 server. | ||
| 957 | It is automatically set by | ||
| 958 | .Nm | ||
| 959 | to point to a value of the form | ||
| 960 | .Dq hostname:n | ||
| 961 | where hostname indicates | ||
| 962 | the host where the shell runs, and n is an integer >= 1. | ||
| 963 | .Nm | ||
| 964 | uses this special value to forward X11 connections over the secure | ||
| 965 | channel. | ||
| 966 | The user should normally not set DISPLAY explicitly, as that | ||
| 967 | will render the X11 connection insecure (and will require the user to | ||
| 968 | manually copy any required authorization cookies). | ||
| 969 | .It Ev HOME | ||
| 970 | Set to the path of the user's home directory. | ||
| 971 | .It Ev LOGNAME | ||
| 972 | Synonym for | ||
| 973 | .Ev USER ; | ||
| 974 | set for compatibility with systems that use this variable. | ||
| 975 | .It Ev MAIL | ||
| 976 | Set to point the user's mailbox. | ||
| 977 | .It Ev PATH | ||
| 978 | Set to the default | ||
| 979 | .Ev PATH , | ||
| 980 | as specified when compiling | ||
| 981 | .Nm ssh . | ||
| 982 | .It Ev SSH_AUTH_SOCK | ||
| 983 | indicates the path of a unix-domain socket used to communicate with the | ||
| 984 | agent. | ||
| 985 | .It Ev SSH_CLIENT | ||
| 986 | Identifies the client end of the connection. | ||
| 987 | The variable contains | ||
| 988 | three space-separated values: client ip-address, client port number, | ||
| 989 | and server port number. | ||
| 990 | .It Ev SSH_TTY | ||
| 991 | This is set to the name of the tty (path to the device) associated | ||
| 992 | with the current shell or command. | ||
| 993 | If the current session has no tty, | ||
| 994 | this variable is not set. | ||
| 995 | .It Ev TZ | ||
| 996 | The timezone variable is set to indicate the present timezone if it | ||
| 997 | was set when the daemon was started (e.i., the daemon passes the value | ||
| 998 | on to new connections). | ||
| 999 | .It Ev USER | ||
| 1000 | Set to the name of the user logging in. | ||
| 1001 | .El | ||
| 1002 | .Pp | ||
| 1003 | Additionally, | ||
| 1004 | .Nm | ||
| 1005 | reads | ||
| 1006 | .Pa $HOME/.ssh/environment , | ||
| 1007 | and adds lines of the format | ||
| 1008 | .Dq VARNAME=value | ||
| 1009 | to the environment. | ||
| 1010 | .Sh FILES | ||
| 1011 | .Bl -tag -width Ds | ||
| 1012 | .It Pa $HOME/.ssh/known_hosts | ||
| 1013 | Records host keys for all hosts the user has logged into (that are not | ||
| 1014 | in | ||
| 1015 | .Pa /etc/ssh_known_hosts ) . | ||
| 1016 | See | ||
| 1017 | .Xr sshd 8 . | ||
| 1018 | .It Pa $HOME/.ssh/identity, $HOME/.ssh/id_dsa | ||
| 1019 | Contains the RSA and the DSA authentication identity of the user. | ||
| 1020 | These files | ||
| 1021 | contain sensitive data and should be readable by the user but not | ||
| 1022 | accessible by others (read/write/execute). | ||
| 1023 | Note that | ||
| 1024 | .Nm | ||
| 1025 | ignores a private key file if it is accessible by others. | ||
| 1026 | It is possible to specify a passphrase when | ||
| 1027 | generating the key; the passphrase will be used to encrypt the | ||
| 1028 | sensitive part of this file using 3DES. | ||
| 1029 | .It Pa $HOME/.ssh/identity.pub, $HOME/.ssh/id_dsa.pub | ||
| 1030 | Contains the public key for authentication (public part of the | ||
| 1031 | identity file in human-readable form). | ||
| 1032 | The contents of the | ||
| 1033 | .Pa $HOME/.ssh/identity.pub | ||
| 1034 | file should be added to | ||
| 1035 | .Pa $HOME/.ssh/authorized_keys | ||
| 1036 | on all machines | ||
| 1037 | where you wish to log in using RSA authentication. | ||
| 1038 | The contents of the | ||
| 1039 | .Pa $HOME/.ssh/id_dsa.pub | ||
| 1040 | file should be added to | ||
| 1041 | .Pa $HOME/.ssh/authorized_keys2 | ||
| 1042 | on all machines | ||
| 1043 | where you wish to log in using DSA authentication. | ||
| 1044 | These files are not | ||
| 1045 | sensitive and can (but need not) be readable by anyone. | ||
| 1046 | These files are | ||
| 1047 | never used automatically and are not necessary; they is only provided for | ||
| 1048 | the convenience of the user. | ||
| 1049 | .It Pa $HOME/.ssh/config | ||
| 1050 | This is the per-user configuration file. | ||
| 1051 | The format of this file is described above. | ||
| 1052 | This file is used by the | ||
| 1053 | .Nm | ||
| 1054 | client. | ||
| 1055 | This file does not usually contain any sensitive information, | ||
| 1056 | but the recommended permissions are read/write for the user, and not | ||
| 1057 | accessible by others. | ||
| 1058 | .It Pa $HOME/.ssh/authorized_keys | ||
| 1059 | Lists the RSA keys that can be used for logging in as this user. | ||
| 1060 | The format of this file is described in the | ||
| 1061 | .Xr sshd 8 | ||
| 1062 | manual page. | ||
| 1063 | In the simplest form the format is the same as the .pub | ||
| 1064 | identity files (that is, each line contains the number of bits in | ||
| 1065 | modulus, public exponent, modulus, and comment fields, separated by | ||
| 1066 | spaces). | ||
| 1067 | This file is not highly sensitive, but the recommended | ||
| 1068 | permissions are read/write for the user, and not accessible by others. | ||
| 1069 | .It Pa $HOME/.ssh/authorized_keys2 | ||
| 1070 | Lists the DSA keys that can be used for logging in as this user. | ||
| 1071 | This file is not highly sensitive, but the recommended | ||
| 1072 | permissions are read/write for the user, and not accessible by others. | ||
| 1073 | .It Pa /etc/ssh_known_hosts, /etc/ssh_known_hosts2 | ||
| 1074 | Systemwide list of known host keys. | ||
| 1075 | .Pa /etc/ssh_known_hosts | ||
| 1076 | contains RSA and | ||
| 1077 | .Pa /etc/ssh_known_hosts2 | ||
| 1078 | contains DSA keys. | ||
| 1079 | These files should be prepared by the | ||
| 1080 | system administrator to contain the public host keys of all machines in the | ||
| 1081 | organization. | ||
| 1082 | This file should be world-readable. | ||
| 1083 | This file contains | ||
| 1084 | public keys, one per line, in the following format (fields separated | ||
| 1085 | by spaces): system name, number of bits in modulus, public exponent, | ||
| 1086 | modulus, and optional comment field. | ||
| 1087 | When different names are used | ||
| 1088 | for the same machine, all such names should be listed, separated by | ||
| 1089 | commas. | ||
| 1090 | The format is described on the | ||
| 1091 | .Xr sshd 8 | ||
| 1092 | manual page. | ||
| 1093 | .Pp | ||
| 1094 | The canonical system name (as returned by name servers) is used by | ||
| 1095 | .Xr sshd 8 | ||
| 1096 | to verify the client host when logging in; other names are needed because | ||
| 1097 | .Nm | ||
| 1098 | does not convert the user-supplied name to a canonical name before | ||
| 1099 | checking the key, because someone with access to the name servers | ||
| 1100 | would then be able to fool host authentication. | ||
| 1101 | .It Pa /etc/ssh_config | ||
| 1102 | Systemwide configuration file. | ||
| 1103 | This file provides defaults for those | ||
| 1104 | values that are not specified in the user's configuration file, and | ||
| 1105 | for those users who do not have a configuration file. | ||
| 1106 | This file must be world-readable. | ||
| 1107 | .It Pa $HOME/.rhosts | ||
| 1108 | This file is used in | ||
| 1109 | .Pa \&.rhosts | ||
| 1110 | authentication to list the | ||
| 1111 | host/user pairs that are permitted to log in. | ||
| 1112 | (Note that this file is | ||
| 1113 | also used by rlogin and rsh, which makes using this file insecure.) | ||
| 1114 | Each line of the file contains a host name (in the canonical form | ||
| 1115 | returned by name servers), and then a user name on that host, | ||
| 1116 | separated by a space. | ||
| 1117 | One some machines this file may need to be | ||
| 1118 | world-readable if the user's home directory is on a NFS partition, | ||
| 1119 | because | ||
| 1120 | .Xr sshd 8 | ||
| 1121 | reads it as root. | ||
| 1122 | Additionally, this file must be owned by the user, | ||
| 1123 | and must not have write permissions for anyone else. | ||
| 1124 | The recommended | ||
| 1125 | permission for most machines is read/write for the user, and not | ||
| 1126 | accessible by others. | ||
| 1127 | .Pp | ||
| 1128 | Note that by default | ||
| 1129 | .Xr sshd 8 | ||
| 1130 | will be installed so that it requires successful RSA host | ||
| 1131 | authentication before permitting \s+2.\s0rhosts authentication. | ||
| 1132 | If your server machine does not have the client's host key in | ||
| 1133 | .Pa /etc/ssh_known_hosts , | ||
| 1134 | you can store it in | ||
| 1135 | .Pa $HOME/.ssh/known_hosts . | ||
| 1136 | The easiest way to do this is to | ||
| 1137 | connect back to the client from the server machine using ssh; this | ||
| 1138 | will automatically add the host key to | ||
| 1139 | .Pa $HOME/.ssh/known_hosts . | ||
| 1140 | .It Pa $HOME/.shosts | ||
| 1141 | This file is used exactly the same way as | ||
| 1142 | .Pa \&.rhosts . | ||
| 1143 | The purpose for | ||
| 1144 | having this file is to be able to use rhosts authentication with | ||
| 1145 | .Nm | ||
| 1146 | without permitting login with | ||
| 1147 | .Xr rlogin 1 | ||
| 1148 | or | ||
| 1149 | .Xr rsh 1 . | ||
| 1150 | .It Pa /etc/hosts.equiv | ||
| 1151 | This file is used during | ||
| 1152 | .Pa \&.rhosts authentication. | ||
| 1153 | It contains | ||
| 1154 | canonical hosts names, one per line (the full format is described on | ||
| 1155 | the | ||
| 1156 | .Xr sshd 8 | ||
| 1157 | manual page). | ||
| 1158 | If the client host is found in this file, login is | ||
| 1159 | automatically permitted provided client and server user names are the | ||
| 1160 | same. | ||
| 1161 | Additionally, successful RSA host authentication is normally | ||
| 1162 | required. | ||
| 1163 | This file should only be writable by root. | ||
| 1164 | .It Pa /etc/shosts.equiv | ||
| 1165 | This file is processed exactly as | ||
| 1166 | .Pa /etc/hosts.equiv . | ||
| 1167 | This file may be useful to permit logins using | ||
| 1168 | .Nm | ||
| 1169 | but not using rsh/rlogin. | ||
| 1170 | .It Pa /etc/sshrc | ||
| 1171 | Commands in this file are executed by | ||
| 1172 | .Nm | ||
| 1173 | when the user logs in just before the user's shell (or command) is started. | ||
| 1174 | See the | ||
| 1175 | .Xr sshd 8 | ||
| 1176 | manual page for more information. | ||
| 1177 | .It Pa $HOME/.ssh/rc | ||
| 1178 | Commands in this file are executed by | ||
| 1179 | .Nm | ||
| 1180 | when the user logs in just before the user's shell (or command) is | ||
| 1181 | started. | ||
| 1182 | See the | ||
| 1183 | .Xr sshd 8 | ||
| 1184 | manual page for more information. | ||
| 1185 | .It Pa $HOME/.ssh/environment | ||
| 1186 | Contains additional definitions for environment variables, see section | ||
| 1187 | .Sx ENVIRONMENT | ||
| 1188 | above. | ||
| 1189 | .It Pa libcrypto.so.X.1 | ||
| 1190 | A version of this library which includes support for the RSA algorithm | ||
| 1191 | is required for proper operation. | ||
| 1192 | .Sh AUTHOR | ||
| 1193 | OpenSSH | ||
| 1194 | is a derivative of the original (free) ssh 1.2.12 release by Tatu Ylonen, | ||
| 1195 | but with bugs removed and newer features re-added. | ||
| 1196 | Rapidly after the | ||
| 1197 | 1.2.12 release, newer versions of the original ssh bore successively | ||
| 1198 | more restrictive licenses, and thus demand for a free version was born. | ||
| 1199 | .Pp | ||
| 1200 | This version of OpenSSH | ||
| 1201 | .Bl -bullet | ||
| 1202 | .It | ||
| 1203 | has all components of a restrictive nature (i.e., patents) | ||
| 1204 | directly removed from the source code; any licensed or patented components | ||
| 1205 | are chosen from | ||
| 1206 | external libraries. | ||
| 1207 | .It | ||
| 1208 | has been updated to support SSH protocol 1.5 and 2, making it compatible with | ||
| 1209 | all other SSH clients and servers. | ||
| 1210 | .It | ||
| 1211 | contains added support for | ||
| 1212 | .Xr kerberos 8 | ||
| 1213 | authentication and ticket passing. | ||
| 1214 | .It | ||
| 1215 | supports one-time password authentication with | ||
| 1216 | .Xr skey 1 . | ||
| 1217 | .El | ||
| 1218 | .Pp | ||
| 1219 | OpenSSH has been created by Aaron Campbell, Bob Beck, Markus Friedl, | ||
| 1220 | Niels Provos, Theo de Raadt, and Dug Song. | ||
| 1221 | .Pp | ||
| 1222 | The support for SSH protocol 2 was written by Markus Friedl. | ||
| 1223 | .Sh SEE ALSO | ||
| 1224 | .Xr rlogin 1 , | ||
| 1225 | .Xr rsh 1 , | ||
| 1226 | .Xr scp 1 , | ||
| 1227 | .Xr ssh-add 1 , | ||
| 1228 | .Xr ssh-agent 1 , | ||
| 1229 | .Xr ssh-keygen 1 , | ||
| 1230 | .Xr telnet 1 , | ||
| 1231 | .Xr sshd 8 , | ||
