[BACK]Return to ssh.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Annotation of src/usr.bin/ssh/ssh.1, Revision 1.49

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