3 .\" Author: Tatu Ylonen <ylo@cs.hut.fi>
4 .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 .\" All rights reserved
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".
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.
17 .\" Redistribution and use in source and binary forms, with or without
18 .\" modification, are permitted provided that the following conditions
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.
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.
37 .Dd September 25, 1999
42 .Nd OpenSSH secure shell client (remote login program)
45 .Op Fl l Ar login_name
46 .Op Ar hostname | user@hostname
50 .Op Fl afgknqtvxACNPTX246
51 .Op Fl c Ar cipher_spec
52 .Op Fl e Ar escape_char
53 .Op Fl i Ar identity_file
54 .Op Fl l Ar login_name
73 .Op Ar hostname | user@hostname
77 (Secure Shell) is a program for logging into a remote machine and for
78 executing commands on a remote machine.
79 It is intended to replace
80 rlogin and rsh, and provide secure encrypted communications between
81 two untrusted hosts over an insecure network.
83 arbitrary TCP/IP ports can also be forwarded over the secure channel.
86 connects and logs into the specified
89 his/her identity to the remote machine using one of several methods
90 depending on the protocol version used:
92 .Ss SSH protocol version 1
94 First, if the machine the user logs in from is listed in
98 on the remote machine, and the user names are
99 the same on both sides, the user is immediately permitted to log in.
104 exists in the user's home directory on the
105 remote machine and contains a line containing the name of the client
106 machine and the name of the user on that machine, the user is
108 This form of authentication alone is normally not
109 allowed by the server because it is not secure.
111 The second (and primary) authentication method is the
115 method combined with RSA-based host authentication.
116 It means that if the login would be permitted by
119 .Pa /etc/hosts.equiv ,
121 .Pa /etc/shosts.equiv ,
122 and if additionally the server can verify the client's
124 .Pa /etc/ssh_known_hosts
126 .Pa $HOME/.ssh/known_hosts
129 section), only then login is permitted.
130 This authentication method closes security holes due to IP
131 spoofing, DNS spoofing and routing spoofing.
132 [Note to the administrator:
133 .Pa /etc/hosts.equiv ,
135 and the rlogin/rsh protocol in general, are inherently insecure and should be
136 disabled if security is desired.]
138 As a third authentication method,
140 supports RSA based authentication.
141 The scheme is based on public-key cryptography: there are cryptosystems
142 where encryption and decryption are done using separate keys, and it
143 is not possible to derive the decryption key from the encryption key.
144 RSA is one such system.
145 The idea is that each user creates a public/private
146 key pair for authentication purposes.
147 The server knows the public key, and only the user knows the private key.
149 .Pa $HOME/.ssh/authorized_keys
150 lists the public keys that are permitted for logging
152 When the user logs in, the
154 program tells the server which key pair it would like to use for
156 The server checks if this key is permitted, and if
157 so, sends the user (actually the
159 program running on behalf of the user) a challenge, a random number,
160 encrypted by the user's public key.
161 The challenge can only be
162 decrypted using the proper private key.
163 The user's client then decrypts the
164 challenge using the private key, proving that he/she knows the private
165 key but without disclosing it to the server.
168 implements the RSA authentication protocol automatically.
169 The user creates his/her RSA key pair by running
171 This stores the private key in
172 .Pa $HOME/.ssh/identity
173 and the public key in
174 .Pa $HOME/.ssh/identity.pub
175 in the user's home directory.
176 The user should then copy the
179 .Pa $HOME/.ssh/authorized_keys
180 in his/her home directory on the remote machine (the
182 file corresponds to the conventional
184 file, and has one key
185 per line, though the lines can be very long).
186 After this, the user can log in without giving the password.
187 RSA authentication is much
188 more secure than rhosts authentication.
190 The most convenient way to use RSA authentication may be with an
191 authentication agent.
194 for more information.
196 If other authentication methods fail,
198 prompts the user for a password.
199 The password is sent to the remote
200 host for checking; however, since all communications are encrypted,
201 the password cannot be seen by someone listening on the network.
203 .Ss SSH protocol version 2
205 When a user connects using the protocol version 2
206 different authentication methods are available:
207 At first, the client attempts to authenticate using the public key method.
208 If this method fails password authentication is tried.
210 The public key method is similar to RSA authentication described
211 in the previous section except that the DSA algorithm is used
212 instead of the patented RSA algorithm.
213 The client uses his private DSA key
214 .Pa $HOME/.ssh/id_dsa
215 to sign the session identifier and sends the result to the server.
216 The server checks whether the matching public key is listed in
217 .Pa $HOME/.ssh/authorized_keys2
218 and grants access if both the key is found and the signature is correct.
219 The session identifier is derived from a shared Diffie-Hellman value
220 and is only known to the client and the server.
222 If public key authentication fails or is not available a password
223 can be sent encrypted to the remote host for proving the user's identity.
224 This protocol 2 implementation does not yet support Kerberos or
225 S/Key authentication.
227 Protocol 2 provides additional mechanisms for confidentiality
228 (the traffic is encrypted using 3DES, Blowfish, CAST128 or Arcfour)
229 and integrity (hmac-sha1, hmac-md5).
230 Note that protocol 1 lacks a strong mechanism for ensuring the
231 integrity of the connection.
233 .Ss Login session and remote execution
235 When the user's identity has been accepted by the server, the server
236 either executes the given command, or logs into the machine and gives
237 the user a normal shell on the remote machine.
238 All communication with
239 the remote command or shell will be automatically encrypted.
241 If a pseudo-terminal has been allocated (normal login session), the
242 user can disconnect with
248 All forwarded connections can be listed with
251 the session blocks waiting for forwarded X11 or TCP/IP
252 connections to terminate, it can be backgrounded with
254 (this should not be used while the user shell is active, as it can cause the
256 All available escapes can be listed with
259 A single tilde character can be sent as
261 (or by following the tilde by a character other than those described above).
262 The escape character must always follow a newline to be interpreted as
264 The escape character can be changed in configuration files
265 or on the command line.
267 If no pseudo tty has been allocated, the
268 session is transparent and can be used to reliably transfer binary
270 On most systems, setting the escape character to
272 will also make the session transparent even if a tty is used.
274 The session terminates when the command or shell in on the remote
275 machine exists and all X11 and TCP/IP connections have been closed.
276 The exit status of the remote program is returned as the exit status
280 .Ss X11 and TCP forwarding
282 If the user is using X11 (the
284 environment variable is set), the connection to the X11 display is
285 automatically forwarded to the remote side in such a way that any X11
286 programs started from the shell (or command) will go through the
287 encrypted channel, and the connection to the real X server will be made
288 from the local machine.
289 The user should not manually set
291 Forwarding of X11 connections can be
292 configured on the command line or in configuration files.
298 will point to the server machine, but with a display number greater
300 This is normal, and happens because
304 X server on the server machine for forwarding the
305 connections over the encrypted channel.
308 will also automatically set up Xauthority data on the server machine.
309 For this purpose, it will generate a random authorization cookie,
310 store it in Xauthority on the server, and verify that any forwarded
311 connections carry this cookie and replace it by the real cookie when
312 the connection is opened.
313 The real authentication cookie is never
314 sent to the server machine (and no cookies are sent in the plain).
316 If the user is using an authentication agent, the connection to the agent
317 is automatically forwarded to the remote side unless disabled on
318 command line or in a configuration file.
320 Forwarding of arbitrary TCP/IP connections over the secure channel can
321 be specified either on command line or in a configuration file.
322 One possible application of TCP/IP forwarding is a secure connection to an
323 electronic purse; another is going trough firewalls.
325 .Ss Server authentication
328 automatically maintains and checks a database containing
329 identifications for all hosts it has ever been used with.
330 RSA host keys are stored in
331 .Pa $HOME/.ssh/known_hosts
333 DSA host keys are stored in
334 .Pa $HOME/.ssh/known_hosts2
335 in the user's home directory.
336 Additionally, the files
337 .Pa /etc/ssh_known_hosts
339 .Pa /etc/ssh_known_hosts2
340 are automatically checked for known hosts.
341 Any new hosts are automatically added to the user's file.
342 If a host's identification
345 warns about this and disables password authentication to prevent a
346 trojan horse from getting the user's password.
348 this mechanism is to prevent man-in-the-middle attacks which could
349 otherwise be used to circumvent the encryption.
351 .Cm StrictHostKeyChecking
352 option (see below) can be used to prevent logins to machines whose
353 host key is not known or has changed.
357 Disables forwarding of the authentication agent connection.
359 Enables forwarding of the authentication agent connection.
360 This can also be specified on a per-host basis in a configuration file.
361 .It Fl c Ar blowfish|3des
362 Selects the cipher to use for encrypting the session.
365 It is believed to be secure.
367 (triple-des) is an encrypt-decrypt-encrypt triple with three different keys.
368 It is presumably more secure than the
370 cipher which is no longer supported in
373 is a fast block cipher, it appears very secure and is much faster than
375 .It Fl c Ar "3des-cbc,blowfish-cbc,arcfour,cast128-cbc"
376 Additionally, for protocol version 2 a comma-separated list of ciphers can
377 be specified in order of preference.
378 Protocol version 2 supports 3DES, Blowfish, and CAST128 in CBC mode
380 .It Fl e Ar ch|^ch|none
381 Sets the escape character for sessions with a pty (default:
383 The escape character is only recognized at the beginning of a line.
384 The escape character followed by a dot
386 closes the connection, followed
387 by control-Z suspends the connection, and followed by itself sends the
388 escape character once.
389 Setting the character to
391 disables any escapes and makes the session fully transparent.
395 to go to background just before command execution.
398 is going to ask for passwords or passphrases, but the user
399 wants it in the background.
402 The recommended way to start X11 programs at a remote site is with
404 .Ic ssh -f host xterm .
406 Allows remote hosts to connect to local forwarded ports.
407 .It Fl i Ar identity_file
408 Selects the file from which the identity (private key) for
409 RSA authentication is read.
411 .Pa $HOME/.ssh/identity
412 in the user's home directory.
413 Identity files may also be specified on
414 a per-host basis in the configuration file.
415 It is possible to have multiple
417 options (and multiple identities specified in
418 configuration files).
420 Disables forwarding of Kerberos tickets and AFS tokens.
421 This may also be specified on a per-host basis in the configuration file.
422 .It Fl l Ar login_name
423 Specifies the user to log in as on the remote machine.
424 This also may be specified on a per-host basis in the configuration file.
428 (actually, prevents reading from stdin).
429 This must be used when
431 is run in the background.
432 A common trick is to use this to run X11 programs on a remote machine.
434 .Ic ssh -n shadows.cs.hut.fi emacs &
435 will start an emacs on shadows.cs.hut.fi, and the X11
436 connection will be automatically forwarded over an encrypted channel.
439 program will be put in the background.
440 (This does not work if
442 needs to ask for a password or passphrase; see also the
446 Do not execute a remote command.
447 This is usefull if you just want to forward ports
448 (protocol version 2 only).
450 Can be used to give options in the format used in the config file.
451 This is useful for specifying options for which there is no separate
453 The option has the same format as a line in the configuration file.
455 Port to connect to on the remote host.
456 This can be specified on a
457 per-host basis in the configuration file.
459 Use a non-privileged port for outgoing connections.
460 This can be used if your firewall does
461 not permit connections from privileged ports.
462 Note that this option turns off
463 .Cm RhostsAuthentication
465 .Cm RhostsRSAAuthentication .
468 Causes all warning and diagnostic messages to be suppressed.
469 Only fatal errors are displayed.
471 Force pseudo-tty allocation.
472 This can be used to execute arbitrary
473 screen-based programs on a remote machine, which can be very useful,
474 e.g., when implementing menu services.
476 Disable pseudo-tty allocation (protocol version 2 only).
481 to print debugging messages about its progress.
483 debugging connection, authentication, and configuration problems.
484 The verbose mode is also used to display
486 challenges, if the user entered "s/key" as password.
487 Multiple -v options increases the verbosity.
490 Disables X11 forwarding.
492 Enables X11 forwarding.
493 This can also be specified on a per-host basis in a configuration file.
495 Requests compression of all data (including stdin, stdout, stderr, and
496 data for forwarded X11 and TCP/IP connections).
497 The compression algorithm is the same used by
501 can be controlled by the
504 Compression is desirable on modem lines and other
505 slow connections, but will only slow down things on fast networks.
506 The default value can be set on a host-by-host basis in the
507 configuration files; see the
510 .It Fl L Ar port:host:hostport
511 Specifies that the given port on the local (client) host is to be
512 forwarded to the given host and port on the remote side.
513 This works by allocating a socket to listen to
515 on the local side, and whenever a connection is made to this port, the
516 connection is forwarded over the secure channel, and a connection is
521 from the remote machine.
522 Port forwardings can also be specified in the configuration file.
523 Only root can forward privileged ports.
524 IPv6 addresses can be specified with an alternative syntax:
525 .Ar port/host/hostport
526 .It Fl R Ar port:host:hostport
527 Specifies that the given port on the remote (server) host is to be
528 forwarded to the given host and port on the local side.
529 This works by allocating a socket to listen to
531 on the remote side, and whenever a connection is made to this port, the
532 connection is forwarded over the secure channel, and a connection is
537 from the local machine.
538 Port forwardings can also be specified in the configuration file.
539 Privileged ports can be forwarded only when
540 logging in as root on the remote machine.
544 to try protocol version 2 only.
548 to use IPv4 addresses only.
552 to use IPv6 addresses only.
554 .Sh CONFIGURATION FILES
556 obtains configuration data from the following sources (in this order):
557 command line options, user's configuration file
558 .Pq Pa $HOME/.ssh/config ,
559 and system-wide configuration file
560 .Pq Pa /etc/ssh_config .
561 For each parameter, the first obtained value
563 The configuration files contain sections bracketed by
565 specifications, and that section is only applied for hosts that
566 match one of the patterns given in the specification.
567 The matched host name is the one given on the command line.
569 Since the first obtained value for each parameter is used, more
570 host-specific declarations should be given near the beginning of the
571 file, and general defaults at the end.
573 The configuration file has the following format:
575 Empty lines and lines starting with
579 Otherwise a line is of the format
580 .Dq keyword arguments .
582 keywords and their meanings are as follows (note that the
583 configuration files are case-sensitive):
586 Restricts the following declarations (up to the next
588 keyword) to be only for those hosts that match one of the patterns
589 given after the keyword.
593 can be used as wildcards in the
597 as a pattern can be used to provide global
598 defaults for all hosts.
601 argument given on the command line (i.e., the name is not converted to
602 a canonicalized host name before matching).
603 .It Cm AFSTokenPassing
604 Specifies whether to pass AFS tokens to remote host.
605 The argument to this keyword must be
612 passphrase/password querying will be disabled.
613 This option is useful in scripts and other batch jobs where you have no
614 user to supply the password.
620 If this flag is set to
622 ssh will additionally check the host ip address in the
625 This allows ssh to detect if a host key changed due to DNS spoofing.
626 If the option is set to
628 the check will not be executed.
630 Specifies the cipher to use for encrypting the session
631 in protocol version 1
640 Specifies the ciphers allowed for protocol version 2
641 in order of preference.
642 Multiple ciphers must be comma-separated.
644 .Dq 3des-cbc,blowfish-cbc,cast128-cbc,arcfour .
646 Specifies whether to use compression.
651 .It Cm CompressionLevel
652 Specifies the compression level to use if compression is enable.
653 The argument must be an integer from 1 (fast) to 9 (slow, best).
654 The default level is 6, which is good for most applications.
655 The meaning of the values is the same as in
657 .It Cm ConnectionAttempts
658 Specifies the number of tries (one per second) to make before falling
659 back to rsh or exiting.
660 The argument must be an integer.
661 This may be useful in scripts if the connection sometimes fails.
662 .It Cm DSAAuthentication
663 Specifies whether to try DSA authentication.
664 The argument to this keyword must be
668 DSA authentication will only be
669 attempted if a DSA identity file exists.
670 Note that this option applies to protocol version 2 only.
672 Sets the escape character (default:
674 The escape character can also
675 be set on the command line.
676 The argument should be a single character,
678 followed by a letter, or
680 to disable the escape
681 character entirely (making the connection transparent for binary
684 Specifies that if connecting via
686 fails due to a connection refused error (there is no
688 listening on the remote host),
690 should automatically be used instead (after a suitable warning about
691 the session being unencrypted).
697 Specifies whether the connection to the authentication agent (if any)
698 will be forwarded to the remote machine.
706 Specifies whether X11 connections will be automatically redirected
707 over the secure channel and
717 Specifies whether remote hosts are allowed to connect to local
725 .It Cm GlobalKnownHostsFile
726 Specifies a file to use instead of
727 .Pa /etc/ssh_known_hosts .
729 Specifies the real host name to log into.
730 This can be used to specify nicknames or abbreviations for hosts.
731 Default is the name given on the command line.
732 Numeric IP addresses are also permitted (both on the command line and in
736 Specifies the file from which the user's RSA authentication identity
738 .Pa $HOME/.ssh/identity
739 in the user's home directory).
740 Additionally, any identities represented by the authentication agent
741 will be used for authentication.
742 The file name may use the tilde
743 syntax to refer to a user's home directory.
744 It is possible to have
745 multiple identity files specified in configuration files; all these
746 identities will be tried in sequence.
748 Specifies the file from which the user's DSA authentication identity
750 .Pa $HOME/.ssh/id_dsa
751 in the user's home directory).
752 The file name may use the tilde
753 syntax to refer to a user's home directory.
754 It is possible to have
755 multiple identity files specified in configuration files; all these
756 identities will be tried in sequence.
758 Specifies whether the system should send keepalive messages to the
760 If they are sent, death of the connection or crash of one
761 of the machines will be properly noticed.
762 However, this means that
763 connections will die if the route is down temporarily, and some people
768 (to send keepalives), and the client will notice
769 if the network goes down or the remote host dies.
770 This is important in scripts, and many users want it too.
772 To disable keepalives, the value should be set to
774 in both the server and the client configuration files.
775 .It Cm KerberosAuthentication
776 Specifies whether Kerberos authentication will be used.
777 The argument to this keyword must be
781 .It Cm KerberosTgtPassing
782 Specifies whether a Kerberos TGT will be forwarded to the server.
783 This will only work if the Kerberos server is actually an AFS kaserver.
784 The argument to this keyword must be
789 Specifies that a TCP/IP port on the local machine be forwarded over
790 the secure channel to given host:port from the remote machine.
791 The first argument must be a port number, and the second must be
793 Multiple forwardings may be specified, and additional
794 forwardings can be given on the command line.
795 Only the superuser can forward privileged ports.
797 Gives the verbosity level that is used when logging messages from
799 The possible values are:
800 QUIET, FATAL, ERROR, INFO, VERBOSE and DEBUG.
802 .It Cm NumberOfPasswordPrompts
803 Specifies the number of password prompts before giving up.
804 The argument to this keyword must be an integer.
806 .It Cm PasswordAuthentication
807 Specifies whether to use password authentication.
808 The argument to this keyword must be
812 Note that this option applies to both protocol version 1 and 2.
814 Specifies the port number to connect on the remote host.
817 Specifies the protocol versions
819 should support in order of preference.
820 The possible values are
824 Multiple versions must be comma-separated.
829 tries version 1 and falls back to version 2
830 if version 1 is not available.
832 Specifies the command to use to connect to the server.
834 string extends to the end of the line, and is executed with
836 In the command string,
838 will be substituted by the host name to
842 The command can be basically anything,
843 and should read from its standard input and write to its standard output.
844 It should eventually connect an
846 server running on some machine, or execute
849 Host key management will be done using the
850 HostName of the host being connected (defaulting to the name typed by
854 is not available for connects with a proxy command.
857 Specifies that a TCP/IP port on the remote machine be forwarded over
858 the secure channel to given host:port from the local machine.
859 The first argument must be a port number, and the second must be
861 Multiple forwardings may be specified, and additional
862 forwardings can be given on the command line.
863 Only the superuser can forward privileged ports.
864 .It Cm RhostsAuthentication
865 Specifies whether to try rhosts based authentication.
867 declaration only affects the client side and has no effect whatsoever
869 Disabling rhosts authentication may reduce
870 authentication time on slow connections when rhosts authentication is
872 Most servers do not permit RhostsAuthentication because it
873 is not secure (see RhostsRSAAuthentication).
874 The argument to this keyword must be
878 .It Cm RhostsRSAAuthentication
879 Specifies whether to try rhosts based authentication with RSA host
881 This is the primary authentication method for most sites.
886 .It Cm RSAAuthentication
887 Specifies whether to try RSA authentication.
888 The argument to this keyword must be
892 RSA authentication will only be
893 attempted if the identity file exists, or an authentication agent is
895 Note that this option applies to protocol version 1 only.
896 .It Cm SkeyAuthentication
897 Specifies whether to use
900 The argument to this keyword must be
906 .It Cm StrictHostKeyChecking
907 If this flag is set to
910 ssh will never automatically add host keys to the
911 .Pa $HOME/.ssh/known_hosts
913 .Pa $HOME/.ssh/known_hosts2
914 files, and refuses to connect hosts whose host key has changed.
915 This provides maximum protection against trojan horse attacks.
916 However, it can be somewhat annoying if you don't have good
917 .Pa /etc/ssh_known_hosts
919 .Pa /etc/ssh_known_hosts2
920 files installed and frequently
922 Basically this option forces the user to manually
924 Normally this option is disabled, and new hosts
925 will automatically be added to the known host files.
927 known hosts will be verified automatically in either case.
932 .It Cm UsePrivilegedPort
933 Specifies whether to use a privileged port for outgoing connections.
940 Note that setting this option to
943 .Cm RhostsAuthentication
945 .Cm RhostsRSAAuthentication .
947 Specifies the user to log in as.
948 This can be useful if you have a different user name on different machines.
949 This saves the trouble of
950 having to remember to give the user name on the command line.
951 .It Cm UserKnownHostsFile
952 Specifies a file to use instead of
953 .Pa $HOME/.ssh/known_hosts .
955 Specifies that rlogin/rsh should be used for this host.
956 It is possible that the host does not at all support the
961 to immediately execute
963 All other options (except
965 are ignored if this has been specified.
971 Specifies the location of the
975 .Pa /usr/X11R6/bin/xauth .
979 will normally set the following environment variables:
984 variable indicates the location of the X11 server.
985 It is automatically set by
987 to point to a value of the form
989 where hostname indicates
990 the host where the shell runs, and n is an integer >= 1.
992 uses this special value to forward X11 connections over the secure
994 The user should normally not set DISPLAY explicitly, as that
995 will render the X11 connection insecure (and will require the user to
996 manually copy any required authorization cookies).
998 Set to the path of the user's home directory.
1002 set for compatibility with systems that use this variable.
1004 Set to point the user's mailbox.
1008 as specified when compiling
1010 .It Ev SSH_AUTH_SOCK
1011 indicates the path of a unix-domain socket used to communicate with the
1014 Identifies the client end of the connection.
1015 The variable contains
1016 three space-separated values: client ip-address, client port number,
1017 and server port number.
1019 This is set to the name of the tty (path to the device) associated
1020 with the current shell or command.
1021 If the current session has no tty,
1022 this variable is not set.
1024 The timezone variable is set to indicate the present timezone if it
1025 was set when the daemon was started (i.e., the daemon passes the value
1026 on to new connections).
1028 Set to the name of the user logging in.
1034 .Pa $HOME/.ssh/environment ,
1035 and adds lines of the format
1040 .It Pa $HOME/.ssh/known_hosts
1041 Records host keys for all hosts the user has logged into (that are not
1043 .Pa /etc/ssh_known_hosts ) .
1046 .It Pa $HOME/.ssh/identity, $HOME/.ssh/id_dsa
1047 Contains the RSA and the DSA authentication identity of the user.
1049 contain sensitive data and should be readable by the user but not
1050 accessible by others (read/write/execute).
1053 ignores a private key file if it is accessible by others.
1054 It is possible to specify a passphrase when
1055 generating the key; the passphrase will be used to encrypt the
1056 sensitive part of this file using 3DES.
1057 .It Pa $HOME/.ssh/identity.pub, $HOME/.ssh/id_dsa.pub
1058 Contains the public key for authentication (public part of the
1059 identity file in human-readable form).
1061 .Pa $HOME/.ssh/identity.pub
1062 file should be added to
1063 .Pa $HOME/.ssh/authorized_keys
1065 where you wish to log in using RSA authentication.
1067 .Pa $HOME/.ssh/id_dsa.pub
1068 file should be added to
1069 .Pa $HOME/.ssh/authorized_keys2
1071 where you wish to log in using DSA authentication.
1073 sensitive and can (but need not) be readable by anyone.
1075 never used automatically and are not necessary; they is only provided for
1076 the convenience of the user.
1077 .It Pa $HOME/.ssh/config
1078 This is the per-user configuration file.
1079 The format of this file is described above.
1080 This file is used by the
1083 This file does not usually contain any sensitive information,
1084 but the recommended permissions are read/write for the user, and not
1085 accessible by others.
1086 .It Pa $HOME/.ssh/authorized_keys
1087 Lists the RSA keys that can be used for logging in as this user.
1088 The format of this file is described in the
1091 In the simplest form the format is the same as the .pub
1092 identity files (that is, each line contains the number of bits in
1093 modulus, public exponent, modulus, and comment fields, separated by
1095 This file is not highly sensitive, but the recommended
1096 permissions are read/write for the user, and not accessible by others.
1097 .It Pa $HOME/.ssh/authorized_keys2
1098 Lists the DSA keys that can be used for logging in as this user.
1099 This file is not highly sensitive, but the recommended
1100 permissions are read/write for the user, and not accessible by others.
1101 .It Pa /etc/ssh_known_hosts, /etc/ssh_known_hosts2
1102 Systemwide list of known host keys.
1103 .Pa /etc/ssh_known_hosts
1105 .Pa /etc/ssh_known_hosts2
1107 These files should be prepared by the
1108 system administrator to contain the public host keys of all machines in the
1110 This file should be world-readable.
1112 public keys, one per line, in the following format (fields separated
1113 by spaces): system name, number of bits in modulus, public exponent,
1114 modulus, and optional comment field.
1115 When different names are used
1116 for the same machine, all such names should be listed, separated by
1118 The format is described on the
1122 The canonical system name (as returned by name servers) is used by
1124 to verify the client host when logging in; other names are needed because
1126 does not convert the user-supplied name to a canonical name before
1127 checking the key, because someone with access to the name servers
1128 would then be able to fool host authentication.
1129 .It Pa /etc/ssh_config
1130 Systemwide configuration file.
1131 This file provides defaults for those
1132 values that are not specified in the user's configuration file, and
1133 for those users who do not have a configuration file.
1134 This file must be world-readable.
1135 .It Pa $HOME/.rhosts
1136 This file is used in
1138 authentication to list the
1139 host/user pairs that are permitted to log in.
1140 (Note that this file is
1141 also used by rlogin and rsh, which makes using this file insecure.)
1142 Each line of the file contains a host name (in the canonical form
1143 returned by name servers), and then a user name on that host,
1144 separated by a space.
1145 One some machines this file may need to be
1146 world-readable if the user's home directory is on a NFS partition,
1150 Additionally, this file must be owned by the user,
1151 and must not have write permissions for anyone else.
1153 permission for most machines is read/write for the user, and not
1154 accessible by others.
1156 Note that by default
1158 will be installed so that it requires successful RSA host
1159 authentication before permitting \s+2.\s0rhosts authentication.
1160 If your server machine does not have the client's host key in
1161 .Pa /etc/ssh_known_hosts ,
1163 .Pa $HOME/.ssh/known_hosts .
1164 The easiest way to do this is to
1165 connect back to the client from the server machine using ssh; this
1166 will automatically add the host key to
1167 .Pa $HOME/.ssh/known_hosts .
1168 .It Pa $HOME/.shosts
1169 This file is used exactly the same way as
1172 having this file is to be able to use rhosts authentication with
1174 without permitting login with
1178 .It Pa /etc/hosts.equiv
1179 This file is used during
1180 .Pa \&.rhosts authentication.
1182 canonical hosts names, one per line (the full format is described on
1186 If the client host is found in this file, login is
1187 automatically permitted provided client and server user names are the
1189 Additionally, successful RSA host authentication is normally
1191 This file should only be writable by root.
1192 .It Pa /etc/shosts.equiv
1193 This file is processed exactly as
1194 .Pa /etc/hosts.equiv .
1195 This file may be useful to permit logins using
1197 but not using rsh/rlogin.
1199 Commands in this file are executed by
1201 when the user logs in just before the user's shell (or command) is started.
1204 manual page for more information.
1205 .It Pa $HOME/.ssh/rc
1206 Commands in this file are executed by
1208 when the user logs in just before the user's shell (or command) is
1212 manual page for more information.
1213 .It Pa $HOME/.ssh/environment
1214 Contains additional definitions for environment variables, see section
1217 .It Pa libcrypto.so.X.1
1218 A version of this library which includes support for the RSA algorithm
1219 is required for proper operation.
1223 is a derivative of the original (free) ssh 1.2.12 release by Tatu Ylonen,
1224 but with bugs removed and newer features re-added.
1226 1.2.12 release, newer versions of the original ssh bore successively
1227 more restrictive licenses, and thus demand for a free version was born.
1229 This version of OpenSSH
1232 has all components of a restrictive nature (i.e., patents, see
1234 directly removed from the source code; any licensed or patented components
1238 has been updated to support SSH protocol 1.5 and 2, making it compatible with
1239 all other SSH clients and servers.
1241 contains added support for
1243 authentication and ticket passing.
1245 supports one-time password authentication with
1249 OpenSSH has been created by Aaron Campbell, Bob Beck, Markus Friedl,
1250 Niels Provos, Theo de Raadt, and Dug Song.
1252 The support for SSH protocol 2 was written by Markus Friedl.