blob: 4757a12d7e37ead0ba7b3e1a62ccc17e053aabfc [file] [log] [blame]
Damien Miller32aa1441999-10-29 09:15:49 +10001.\" -*- nroff -*-
2.\"
Damien Miller32aa1441999-10-29 09:15:49 +10003.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
Damien Miller32aa1441999-10-29 09:15:49 +10004.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5.\" All rights reserved
6.\"
Damien Millere4340be2000-09-16 13:29:08 +11007.\" 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".
Damien Miller32aa1441999-10-29 09:15:49 +100012.\"
Ben Lindstrom92a2e382001-03-05 06:59:27 +000013.\" 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.
Damien Millere4340be2000-09-16 13:29:08 +110016.\"
17.\" Redistribution and use in source and binary forms, with or without
18.\" modification, are permitted provided that the following conditions
19.\" are met:
20.\" 1. Redistributions of source code must retain the above copyright
21.\" notice, this list of conditions and the following disclaimer.
22.\" 2. Redistributions in binary form must reproduce the above copyright
23.\" notice, this list of conditions and the following disclaimer in the
24.\" documentation and/or other materials provided with the distribution.
25.\"
26.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Damien Miller32aa1441999-10-29 09:15:49 +100036.\"
Ben Lindstrom160ec622001-04-22 17:17:46 +000037.\" $OpenBSD: ssh.1,v 1.106 2001/04/22 13:32:27 markus Exp $
Damien Miller32aa1441999-10-29 09:15:49 +100038.Dd September 25, 1999
39.Dt SSH 1
40.Os
41.Sh NAME
42.Nm ssh
Ben Lindstromd58eb5f2001-03-07 06:07:22 +000043.Nd OpenSSH SSH client (remote login program)
Damien Miller32aa1441999-10-29 09:15:49 +100044.Sh SYNOPSIS
45.Nm ssh
46.Op Fl l Ar login_name
47.Op Ar hostname | user@hostname
48.Op Ar command
49.Pp
50.Nm ssh
Ben Lindstrom5ab6ae12001-02-10 22:08:03 +000051.Op Fl afgknqstvxACNPTX1246
Damien Miller30c3d422000-05-09 11:02:59 +100052.Op Fl c Ar cipher_spec
Damien Miller32aa1441999-10-29 09:15:49 +100053.Op Fl e Ar escape_char
54.Op Fl i Ar identity_file
55.Op Fl l Ar login_name
Ben Lindstrom06b33aa2001-02-15 03:01:59 +000056.Op Fl m Ar mac_spec
Damien Miller32aa1441999-10-29 09:15:49 +100057.Op Fl o Ar option
58.Op Fl p Ar port
59.Oo Fl L Xo
60.Sm off
Damien Miller32aa1441999-10-29 09:15:49 +100061.Ar port :
Damien Miller396691a2000-01-20 22:44:08 +110062.Ar host :
Damien Miller32aa1441999-10-29 09:15:49 +100063.Ar hostport
64.Sm on
65.Xc
66.Oc
67.Oo Fl R Xo
68.Sm off
Damien Miller32aa1441999-10-29 09:15:49 +100069.Ar port :
Damien Miller396691a2000-01-20 22:44:08 +110070.Ar host :
Damien Miller32aa1441999-10-29 09:15:49 +100071.Ar hostport
72.Sm on
73.Xc
74.Oc
75.Op Ar hostname | user@hostname
76.Op Ar command
Damien Miller22c77262000-04-13 12:26:34 +100077.Sh DESCRIPTION
Damien Miller32aa1441999-10-29 09:15:49 +100078.Nm
Ben Lindstromd58eb5f2001-03-07 06:07:22 +000079(SSH client) is a program for logging into a remote machine and for
Damien Miller7684ee12000-03-17 23:40:15 +110080executing commands on a remote machine.
81It is intended to replace
Damien Miller32aa1441999-10-29 09:15:49 +100082rlogin and rsh, and provide secure encrypted communications between
Damien Miller7684ee12000-03-17 23:40:15 +110083two untrusted hosts over an insecure network.
84X11 connections and
Damien Miller32aa1441999-10-29 09:15:49 +100085arbitrary TCP/IP ports can also be forwarded over the secure channel.
86.Pp
87.Nm
Damien Miller22c77262000-04-13 12:26:34 +100088connects and logs into the specified
Damien Miller32aa1441999-10-29 09:15:49 +100089.Ar hostname .
90The user must prove
Damien Millere247cc42000-05-07 12:03:14 +100091his/her identity to the remote machine using one of several methods
92depending on the protocol version used:
93.Pp
94.Ss SSH protocol version 1
Damien Miller32aa1441999-10-29 09:15:49 +100095.Pp
96First, if the machine the user logs in from is listed in
97.Pa /etc/hosts.equiv
98or
Damien Miller886c63a2000-01-20 23:13:36 +110099.Pa /etc/shosts.equiv
Damien Miller32aa1441999-10-29 09:15:49 +1000100on the remote machine, and the user names are
101the same on both sides, the user is immediately permitted to log in.
Damien Miller22c77262000-04-13 12:26:34 +1000102Second, if
Damien Miller32aa1441999-10-29 09:15:49 +1000103.Pa \&.rhosts
104or
105.Pa \&.shosts
106exists in the user's home directory on the
107remote machine and contains a line containing the name of the client
108machine and the name of the user on that machine, the user is
Damien Miller7684ee12000-03-17 23:40:15 +1100109permitted to log in.
110This form of authentication alone is normally not
Damien Miller32aa1441999-10-29 09:15:49 +1000111allowed by the server because it is not secure.
112.Pp
113The second (and primary) authentication method is the
114.Pa rhosts
115or
116.Pa hosts.equiv
Damien Miller7684ee12000-03-17 23:40:15 +1100117method combined with RSA-based host authentication.
118It means that if the login would be permitted by
Damien Millere247cc42000-05-07 12:03:14 +1000119.Pa $HOME/.rhosts ,
120.Pa $HOME/.shosts ,
Damien Miller32aa1441999-10-29 09:15:49 +1000121.Pa /etc/hosts.equiv ,
122or
Damien Miller886c63a2000-01-20 23:13:36 +1100123.Pa /etc/shosts.equiv ,
Damien Miller32aa1441999-10-29 09:15:49 +1000124and if additionally the server can verify the client's
Damien Miller22c77262000-04-13 12:26:34 +1000125host key (see
Damien Miller886c63a2000-01-20 23:13:36 +1100126.Pa /etc/ssh_known_hosts
Damien Miller33e511e1999-11-11 11:43:13 +1100127and
128.Pa $HOME/.ssh/known_hosts
Damien Miller32aa1441999-10-29 09:15:49 +1000129in the
130.Sx FILES
Damien Miller7684ee12000-03-17 23:40:15 +1100131section), only then login is permitted.
132This authentication method closes security holes due to IP
133spoofing, DNS spoofing and routing spoofing.
134[Note to the administrator:
Damien Miller32aa1441999-10-29 09:15:49 +1000135.Pa /etc/hosts.equiv ,
Damien Millere247cc42000-05-07 12:03:14 +1000136.Pa $HOME/.rhosts ,
Damien Miller32aa1441999-10-29 09:15:49 +1000137and the rlogin/rsh protocol in general, are inherently insecure and should be
138disabled if security is desired.]
139.Pp
Damien Miller22c77262000-04-13 12:26:34 +1000140As a third authentication method,
Damien Miller32aa1441999-10-29 09:15:49 +1000141.Nm
142supports RSA based authentication.
143The scheme is based on public-key cryptography: there are cryptosystems
144where encryption and decryption are done using separate keys, and it
145is not possible to derive the decryption key from the encryption key.
Damien Miller7684ee12000-03-17 23:40:15 +1100146RSA is one such system.
Damien Miller22c77262000-04-13 12:26:34 +1000147The idea is that each user creates a public/private
Damien Miller7684ee12000-03-17 23:40:15 +1100148key pair for authentication purposes.
149The server knows the public key, and only the user knows the private key.
Damien Miller22c77262000-04-13 12:26:34 +1000150The file
Damien Miller32aa1441999-10-29 09:15:49 +1000151.Pa $HOME/.ssh/authorized_keys
152lists the public keys that are permitted for logging
Damien Miller7684ee12000-03-17 23:40:15 +1100153in.
154When the user logs in, the
Damien Miller32aa1441999-10-29 09:15:49 +1000155.Nm
156program tells the server which key pair it would like to use for
Damien Miller7684ee12000-03-17 23:40:15 +1100157authentication.
158The server checks if this key is permitted, and if
Damien Miller32aa1441999-10-29 09:15:49 +1000159so, sends the user (actually the
160.Nm
161program running on behalf of the user) a challenge, a random number,
Damien Miller7684ee12000-03-17 23:40:15 +1100162encrypted by the user's public key.
163The challenge can only be
164decrypted using the proper private key.
165The user's client then decrypts the
Damien Miller32aa1441999-10-29 09:15:49 +1000166challenge using the private key, proving that he/she knows the private
167key but without disclosing it to the server.
168.Pp
169.Nm
Damien Miller7684ee12000-03-17 23:40:15 +1100170implements the RSA authentication protocol automatically.
171The user creates his/her RSA key pair by running
Damien Miller32aa1441999-10-29 09:15:49 +1000172.Xr ssh-keygen 1 .
Damien Miller22c77262000-04-13 12:26:34 +1000173This stores the private key in
Damien Millere247cc42000-05-07 12:03:14 +1000174.Pa $HOME/.ssh/identity
Damien Miller32aa1441999-10-29 09:15:49 +1000175and the public key in
Damien Millere247cc42000-05-07 12:03:14 +1000176.Pa $HOME/.ssh/identity.pub
Damien Miller7684ee12000-03-17 23:40:15 +1100177in the user's home directory.
178The user should then copy the
Damien Miller32aa1441999-10-29 09:15:49 +1000179.Pa identity.pub
Damien Miller22c77262000-04-13 12:26:34 +1000180to
Damien Millere247cc42000-05-07 12:03:14 +1000181.Pa $HOME/.ssh/authorized_keys
Damien Miller22c77262000-04-13 12:26:34 +1000182in his/her home directory on the remote machine (the
Damien Miller32aa1441999-10-29 09:15:49 +1000183.Pa authorized_keys
Damien Miller22c77262000-04-13 12:26:34 +1000184file corresponds to the conventional
Damien Millere247cc42000-05-07 12:03:14 +1000185.Pa $HOME/.rhosts
Damien Miller32aa1441999-10-29 09:15:49 +1000186file, and has one key
Damien Miller7684ee12000-03-17 23:40:15 +1100187per line, though the lines can be very long).
188After this, the user can log in without giving the password.
189RSA authentication is much
Damien Miller32aa1441999-10-29 09:15:49 +1000190more secure than rhosts authentication.
191.Pp
192The most convenient way to use RSA authentication may be with an
Damien Miller7684ee12000-03-17 23:40:15 +1100193authentication agent.
194See
Damien Miller32aa1441999-10-29 09:15:49 +1000195.Xr ssh-agent 1
196for more information.
197.Pp
Damien Miller22c77262000-04-13 12:26:34 +1000198If other authentication methods fail,
Damien Miller32aa1441999-10-29 09:15:49 +1000199.Nm
Damien Miller7684ee12000-03-17 23:40:15 +1100200prompts the user for a password.
201The password is sent to the remote
Damien Miller32aa1441999-10-29 09:15:49 +1000202host for checking; however, since all communications are encrypted,
203the password cannot be seen by someone listening on the network.
204.Pp
Damien Millere247cc42000-05-07 12:03:14 +1000205.Ss SSH protocol version 2
206.Pp
207When a user connects using the protocol version 2
208different authentication methods are available:
209At first, the client attempts to authenticate using the public key method.
210If this method fails password authentication is tried.
211.Pp
212The public key method is similar to RSA authentication described
Damien Miller0bc1bd82000-11-13 22:57:25 +1100213in the previous section except that the DSA or RSA algorithm is used
214instead.
Ben Lindstrom18a82ac2001-04-11 15:59:35 +0000215The client uses his private key,
Damien Millere247cc42000-05-07 12:03:14 +1000216.Pa $HOME/.ssh/id_dsa
Ben Lindstrom18a82ac2001-04-11 15:59:35 +0000217or
218.Pa $HOME/.ssh/id_rsa ,
Damien Millere247cc42000-05-07 12:03:14 +1000219to sign the session identifier and sends the result to the server.
220The server checks whether the matching public key is listed in
221.Pa $HOME/.ssh/authorized_keys2
222and grants access if both the key is found and the signature is correct.
223The session identifier is derived from a shared Diffie-Hellman value
224and is only known to the client and the server.
225.Pp
226If public key authentication fails or is not available a password
227can be sent encrypted to the remote host for proving the user's identity.
228This protocol 2 implementation does not yet support Kerberos or
229S/Key authentication.
230.Pp
231Protocol 2 provides additional mechanisms for confidentiality
Damien Miller30c3d422000-05-09 11:02:59 +1000232(the traffic is encrypted using 3DES, Blowfish, CAST128 or Arcfour)
Ben Lindstromec26fb12001-03-06 01:05:23 +0000233and integrity (hmac-md5, hmac-sha1).
Damien Millere247cc42000-05-07 12:03:14 +1000234Note that protocol 1 lacks a strong mechanism for ensuring the
235integrity of the connection.
236.Pp
237.Ss Login session and remote execution
238.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000239When the user's identity has been accepted by the server, the server
240either executes the given command, or logs into the machine and gives
Damien Miller7684ee12000-03-17 23:40:15 +1100241the user a normal shell on the remote machine.
242All communication with
Damien Miller32aa1441999-10-29 09:15:49 +1000243the remote command or shell will be automatically encrypted.
244.Pp
245If a pseudo-terminal has been allocated (normal login session), the
Ben Lindstrom9ffdcb52001-04-20 12:50:51 +0000246user may use the escape characters noted below.
Damien Miller32aa1441999-10-29 09:15:49 +1000247.Pp
248If no pseudo tty has been allocated, the
249session is transparent and can be used to reliably transfer binary
Damien Miller7684ee12000-03-17 23:40:15 +1100250data.
251On most systems, setting the escape character to
Damien Miller32aa1441999-10-29 09:15:49 +1000252.Dq none
253will also make the session transparent even if a tty is used.
254.Pp
Ben Lindstroma6885612000-12-09 03:45:32 +0000255The session terminates when the command or shell on the remote
Ben Lindstromebd888d2001-03-05 05:49:29 +0000256machine exits and all X11 and TCP/IP connections have been closed.
Damien Miller32aa1441999-10-29 09:15:49 +1000257The exit status of the remote program is returned as the exit status
258of
259.Nm ssh .
260.Pp
Ben Lindstrom9ffdcb52001-04-20 12:50:51 +0000261.Ss Escape Characters
262.Pp
263When a pseudo terminal has been requested, ssh supports a number of functions
Ben Lindstromf8d24572001-04-22 17:11:56 +0000264through the use of an escape character.
Ben Lindstrom9ffdcb52001-04-20 12:50:51 +0000265.Pp
266A single tilde character can be sent as
267.Ic ~~
268(or by following the tilde by a character other than those described above).
269The escape character must always follow a newline to be interpreted as
270special.
271The escape character can be changed in configuration files using the
272.Cm EscapeChar
273configuration directive or on the command line by the
274.Fl e
275option.
276.Pp
277The supported escapes (assuming the default
278.Ql ~ )
279are:
280.Bl -tag -width Ds
281.It Cm ~.
282Disconnect
283.It Cm ~^Z
284Background ssh
285.It Cm ~#
286List forwarded connections
287.It Cm ~&
288Background ssh at logout when waiting for forwarded connection / X11 sessions
289to terminate (this does not currently work for SSH protocol version 2)
290.It Cm ~?
291Display a list of escape characters
292.It Cm ~R
Ben Lindstromf8d24572001-04-22 17:11:56 +0000293Request rekeying of the connection (only useful for SSH protocol version 2
294and if the peer supports it)
Ben Lindstrom9ffdcb52001-04-20 12:50:51 +0000295.El
296.Pp
Damien Millere247cc42000-05-07 12:03:14 +1000297.Ss X11 and TCP forwarding
298.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000299If the user is using X11 (the
300.Ev DISPLAY
301environment variable is set), the connection to the X11 display is
302automatically forwarded to the remote side in such a way that any X11
303programs started from the shell (or command) will go through the
304encrypted channel, and the connection to the real X server will be made
Damien Miller7684ee12000-03-17 23:40:15 +1100305from the local machine.
306The user should not manually set
Damien Miller32aa1441999-10-29 09:15:49 +1000307.Ev DISPLAY .
308Forwarding of X11 connections can be
309configured on the command line or in configuration files.
310.Pp
311The
Damien Miller22c77262000-04-13 12:26:34 +1000312.Ev DISPLAY
Damien Miller32aa1441999-10-29 09:15:49 +1000313value set by
314.Nm
315will point to the server machine, but with a display number greater
Damien Miller7684ee12000-03-17 23:40:15 +1100316than zero.
317This is normal, and happens because
Damien Miller32aa1441999-10-29 09:15:49 +1000318.Nm
319creates a
320.Dq proxy
321X server on the server machine for forwarding the
322connections over the encrypted channel.
323.Pp
324.Nm
325will also automatically set up Xauthority data on the server machine.
326For this purpose, it will generate a random authorization cookie,
327store it in Xauthority on the server, and verify that any forwarded
328connections carry this cookie and replace it by the real cookie when
Damien Miller7684ee12000-03-17 23:40:15 +1100329the connection is opened.
330The real authentication cookie is never
Damien Miller32aa1441999-10-29 09:15:49 +1000331sent to the server machine (and no cookies are sent in the plain).
332.Pp
333If the user is using an authentication agent, the connection to the agent
334is automatically forwarded to the remote side unless disabled on
335command line or in a configuration file.
336.Pp
337Forwarding of arbitrary TCP/IP connections over the secure channel can
Damien Miller7684ee12000-03-17 23:40:15 +1100338be specified either on command line or in a configuration file.
339One possible application of TCP/IP forwarding is a secure connection to an
Ben Lindstromebd888d2001-03-05 05:49:29 +0000340electronic purse; another is going through firewalls.
Damien Miller32aa1441999-10-29 09:15:49 +1000341.Pp
Damien Millere247cc42000-05-07 12:03:14 +1000342.Ss Server authentication
343.Pp
Damien Miller32aa1441999-10-29 09:15:49 +1000344.Nm
Damien Millere247cc42000-05-07 12:03:14 +1000345automatically maintains and checks a database containing
Damien Miller7684ee12000-03-17 23:40:15 +1100346identifications for all hosts it has ever been used with.
Damien Millere247cc42000-05-07 12:03:14 +1000347RSA host keys are stored in
348.Pa $HOME/.ssh/known_hosts
349and
Damien Miller0bc1bd82000-11-13 22:57:25 +1100350host keys used in the protocol version 2 are stored in
Damien Millere247cc42000-05-07 12:03:14 +1000351.Pa $HOME/.ssh/known_hosts2
Damien Miller7684ee12000-03-17 23:40:15 +1100352in the user's home directory.
Damien Millere247cc42000-05-07 12:03:14 +1000353Additionally, the files
Damien Miller886c63a2000-01-20 23:13:36 +1100354.Pa /etc/ssh_known_hosts
Damien Millere247cc42000-05-07 12:03:14 +1000355and
356.Pa /etc/ssh_known_hosts2
357are automatically checked for known hosts.
Damien Miller7684ee12000-03-17 23:40:15 +1100358Any new hosts are automatically added to the user's file.
359If a host's identification
Damien Miller32aa1441999-10-29 09:15:49 +1000360ever changes,
361.Nm
362warns about this and disables password authentication to prevent a
Damien Miller7684ee12000-03-17 23:40:15 +1100363trojan horse from getting the user's password.
364Another purpose of
Damien Miller32aa1441999-10-29 09:15:49 +1000365this mechanism is to prevent man-in-the-middle attacks which could
Damien Miller7684ee12000-03-17 23:40:15 +1100366otherwise be used to circumvent the encryption.
367The
Damien Miller32aa1441999-10-29 09:15:49 +1000368.Cm StrictHostKeyChecking
369option (see below) can be used to prevent logins to machines whose
370host key is not known or has changed.
Damien Miller0bc1bd82000-11-13 22:57:25 +1100371.Pp
372The options are as follows:
Damien Miller32aa1441999-10-29 09:15:49 +1000373.Bl -tag -width Ds
374.It Fl a
Damien Miller450a7a12000-03-26 13:04:51 +1000375Disables forwarding of the authentication agent connection.
Damien Millerb1715dc2000-05-30 13:44:51 +1000376.It Fl A
377Enables forwarding of the authentication agent connection.
378This can also be specified on a per-host basis in a configuration file.
Damien Miller32aa1441999-10-29 09:15:49 +1000379.It Fl c Ar blowfish|3des
Damien Miller22c77262000-04-13 12:26:34 +1000380Selects the cipher to use for encrypting the session.
Damien Miller32aa1441999-10-29 09:15:49 +1000381.Ar 3des
Damien Miller7684ee12000-03-17 23:40:15 +1100382is used by default.
Damien Miller22c77262000-04-13 12:26:34 +1000383It is believed to be secure.
Damien Miller32aa1441999-10-29 09:15:49 +1000384.Ar 3des
385(triple-des) is an encrypt-decrypt-encrypt triple with three different keys.
386It is presumably more secure than the
387.Ar des
Damien Miller69b69aa2000-10-28 14:19:58 +1100388cipher which is no longer fully supported in
Damien Miller30c3d422000-05-09 11:02:59 +1000389.Nm ssh .
Damien Miller32aa1441999-10-29 09:15:49 +1000390.Ar blowfish
391is a fast block cipher, it appears very secure and is much faster than
Damien Miller7684ee12000-03-17 23:40:15 +1100392.Ar 3des .
Ben Lindstrom5ab6ae12001-02-10 22:08:03 +0000393.It Fl c Ar cipher_spec
Damien Miller30c3d422000-05-09 11:02:59 +1000394Additionally, for protocol version 2 a comma-separated list of ciphers can
Damien Miller874d77b2000-10-14 16:23:11 +1100395be specified in order of preference.
Ben Lindstrom5ab6ae12001-02-10 22:08:03 +0000396See
397.Cm Ciphers
398for more information.
Damien Miller32aa1441999-10-29 09:15:49 +1000399.It Fl e Ar ch|^ch|none
400Sets the escape character for sessions with a pty (default:
401.Ql ~ ) .
Damien Miller7684ee12000-03-17 23:40:15 +1100402The escape character is only recognized at the beginning of a line.
403The escape character followed by a dot
Damien Miller32aa1441999-10-29 09:15:49 +1000404.Pq Ql \&.
405closes the connection, followed
406by control-Z suspends the connection, and followed by itself sends the
Damien Miller7684ee12000-03-17 23:40:15 +1100407escape character once.
408Setting the character to
Damien Miller32aa1441999-10-29 09:15:49 +1000409.Dq none
410disables any escapes and makes the session fully transparent.
411.It Fl f
412Requests
413.Nm
Damien Miller7684ee12000-03-17 23:40:15 +1100414to go to background just before command execution.
415This is useful if
Damien Miller32aa1441999-10-29 09:15:49 +1000416.Nm
417is going to ask for passwords or passphrases, but the user
Damien Miller7684ee12000-03-17 23:40:15 +1100418wants it in the background.
Damien Miller22c77262000-04-13 12:26:34 +1000419This implies
Damien Miller32aa1441999-10-29 09:15:49 +1000420.Fl n .
421The recommended way to start X11 programs at a remote site is with
422something like
423.Ic ssh -f host xterm .
Damien Miller396691a2000-01-20 22:44:08 +1100424.It Fl g
425Allows remote hosts to connect to local forwarded ports.
Damien Miller32aa1441999-10-29 09:15:49 +1000426.It Fl i Ar identity_file
Damien Miller22c77262000-04-13 12:26:34 +1000427Selects the file from which the identity (private key) for
Damien Miller0bc1bd82000-11-13 22:57:25 +1100428RSA or DSA authentication is read.
Damien Miller22c77262000-04-13 12:26:34 +1000429Default is
Damien Millere247cc42000-05-07 12:03:14 +1000430.Pa $HOME/.ssh/identity
Damien Miller7684ee12000-03-17 23:40:15 +1100431in the user's home directory.
432Identity files may also be specified on
433a per-host basis in the configuration file.
434It is possible to have multiple
Damien Miller32aa1441999-10-29 09:15:49 +1000435.Fl i
436options (and multiple identities specified in
437configuration files).
Damien Miller32aa1441999-10-29 09:15:49 +1000438.It Fl k
Damien Miller450a7a12000-03-26 13:04:51 +1000439Disables forwarding of Kerberos tickets and AFS tokens.
440This may also be specified on a per-host basis in the configuration file.
Damien Miller32aa1441999-10-29 09:15:49 +1000441.It Fl l Ar login_name
Damien Miller7684ee12000-03-17 23:40:15 +1100442Specifies the user to log in as on the remote machine.
443This also may be specified on a per-host basis in the configuration file.
Ben Lindstrom06b33aa2001-02-15 03:01:59 +0000444.It Fl m Ar mac_spec
445Additionally, for protocol version 2 a comma-separated list of MAC
446(message authentication code) algorithms can
447be specified in order of preference.
448See the
449.Cm MACs
450keyword for more information.
Damien Miller32aa1441999-10-29 09:15:49 +1000451.It Fl n
452Redirects stdin from
453.Pa /dev/null
454(actually, prevents reading from stdin).
455This must be used when
456.Nm
Damien Miller7684ee12000-03-17 23:40:15 +1100457is run in the background.
458A common trick is to use this to run X11 programs on a remote machine.
459For example,
Damien Miller32aa1441999-10-29 09:15:49 +1000460.Ic ssh -n shadows.cs.hut.fi emacs &
461will start an emacs on shadows.cs.hut.fi, and the X11
462connection will be automatically forwarded over an encrypted channel.
463The
464.Nm
465program will be put in the background.
466(This does not work if
467.Nm
468needs to ask for a password or passphrase; see also the
469.Fl f
470option.)
Damien Millerdcb6ecd2000-05-17 22:34:22 +1000471.It Fl N
472Do not execute a remote command.
Ben Lindstromc72745a2000-12-02 19:03:54 +0000473This is useful if you just want to forward ports
Damien Millerdcb6ecd2000-05-17 22:34:22 +1000474(protocol version 2 only).
Damien Miller32aa1441999-10-29 09:15:49 +1000475.It Fl o Ar option
476Can be used to give options in the format used in the config file.
477This is useful for specifying options for which there is no separate
Damien Miller7684ee12000-03-17 23:40:15 +1100478command-line flag.
479The option has the same format as a line in the configuration file.
Damien Miller32aa1441999-10-29 09:15:49 +1000480.It Fl p Ar port
Damien Miller7684ee12000-03-17 23:40:15 +1100481Port to connect to on the remote host.
482This can be specified on a
Damien Miller32aa1441999-10-29 09:15:49 +1000483per-host basis in the configuration file.
484.It Fl P
485Use a non-privileged port for outgoing connections.
486This can be used if your firewall does
487not permit connections from privileged ports.
Damien Millera34a28b1999-12-14 10:47:15 +1100488Note that this option turns off
Damien Miller32aa1441999-10-29 09:15:49 +1000489.Cm RhostsAuthentication
490and
Kevin Stevesfcec7f82000-12-15 19:55:48 +0000491.Cm RhostsRSAAuthentication
492for older servers.
Damien Miller32aa1441999-10-29 09:15:49 +1000493.It Fl q
Damien Miller7684ee12000-03-17 23:40:15 +1100494Quiet mode.
495Causes all warning and diagnostic messages to be suppressed.
496Only fatal errors are displayed.
Damien Miller832562e2001-01-30 09:30:01 +1100497.It Fl s
498May be used to request invocation of a subsystem on the remote system. Subsystems are a feature of the SSH2 protocol which facilitate the use
499of SSH as a secure transport for other application (eg. sftp). The
500subsystem is specified as the remote command.
Damien Miller32aa1441999-10-29 09:15:49 +1000501.It Fl t
Damien Miller7684ee12000-03-17 23:40:15 +1100502Force pseudo-tty allocation.
Damien Miller450a7a12000-03-26 13:04:51 +1000503This can be used to execute arbitrary
Damien Miller7684ee12000-03-17 23:40:15 +1100504screen-based programs on a remote machine, which can be very useful,
505e.g., when implementing menu services.
Ben Lindstrom4dccfa52000-12-28 16:40:05 +0000506Multiple
507.Fl t
508options force tty allocation, even if
509.Nm
510has no local tty.
Damien Millerdcb6ecd2000-05-17 22:34:22 +1000511.It Fl T
Ben Lindstromc72745a2000-12-02 19:03:54 +0000512Disable pseudo-tty allocation.
Damien Miller32aa1441999-10-29 09:15:49 +1000513.It Fl v
Damien Miller7684ee12000-03-17 23:40:15 +1100514Verbose mode.
515Causes
Damien Miller32aa1441999-10-29 09:15:49 +1000516.Nm
Damien Miller7684ee12000-03-17 23:40:15 +1100517to print debugging messages about its progress.
518This is helpful in
Damien Miller32aa1441999-10-29 09:15:49 +1000519debugging connection, authentication, and configuration problems.
Ben Lindstrom4dccfa52000-12-28 16:40:05 +0000520Multiple
521.Fl v
522options increases the verbosity.
Damien Miller874d77b2000-10-14 16:23:11 +1100523Maximum is 3.
Damien Miller32aa1441999-10-29 09:15:49 +1000524.It Fl x
Damien Miller7684ee12000-03-17 23:40:15 +1100525Disables X11 forwarding.
Damien Miller32aa1441999-10-29 09:15:49 +1000526.It Fl X
527Enables X11 forwarding.
Damien Millerb1715dc2000-05-30 13:44:51 +1000528This can also be specified on a per-host basis in a configuration file.
Damien Miller32aa1441999-10-29 09:15:49 +1000529.It Fl C
530Requests compression of all data (including stdin, stdout, stderr, and
Damien Miller7684ee12000-03-17 23:40:15 +1100531data for forwarded X11 and TCP/IP connections).
532The compression algorithm is the same used by
Damien Miller396691a2000-01-20 22:44:08 +1100533.Xr gzip 1 ,
534and the
Damien Miller32aa1441999-10-29 09:15:49 +1000535.Dq level
536can be controlled by the
537.Cm CompressionLevel
Damien Miller7684ee12000-03-17 23:40:15 +1100538option (see below).
539Compression is desirable on modem lines and other
Damien Miller32aa1441999-10-29 09:15:49 +1000540slow connections, but will only slow down things on fast networks.
541The default value can be set on a host-by-host basis in the
542configuration files; see the
543.Cm Compress
544option below.
545.It Fl L Ar port:host:hostport
546Specifies that the given port on the local (client) host is to be
Damien Miller7684ee12000-03-17 23:40:15 +1100547forwarded to the given host and port on the remote side.
548This works by allocating a socket to listen to
Damien Miller32aa1441999-10-29 09:15:49 +1000549.Ar port
550on the local side, and whenever a connection is made to this port, the
551connection is forwarded over the secure channel, and a connection is
552made to
Damien Miller34132e52000-01-14 15:45:46 +1100553.Ar host
554port
555.Ar hostport
Damien Miller7684ee12000-03-17 23:40:15 +1100556from the remote machine.
557Port forwardings can also be specified in the configuration file.
558Only root can forward privileged ports.
Damien Miller34132e52000-01-14 15:45:46 +1100559IPv6 addresses can be specified with an alternative syntax:
560.Ar port/host/hostport
Damien Miller32aa1441999-10-29 09:15:49 +1000561.It Fl R Ar port:host:hostport
562Specifies that the given port on the remote (server) host is to be
Damien Miller7684ee12000-03-17 23:40:15 +1100563forwarded to the given host and port on the local side.
564This works by allocating a socket to listen to
Damien Miller32aa1441999-10-29 09:15:49 +1000565.Ar port
566on the remote side, and whenever a connection is made to this port, the
567connection is forwarded over the secure channel, and a connection is
568made to
Damien Miller34132e52000-01-14 15:45:46 +1100569.Ar host
570port
571.Ar hostport
Damien Miller7684ee12000-03-17 23:40:15 +1100572from the local machine.
573Port forwardings can also be specified in the configuration file.
574Privileged ports can be forwarded only when
Damien Miller32aa1441999-10-29 09:15:49 +1000575logging in as root on the remote machine.
Ben Lindstrom5ab6ae12001-02-10 22:08:03 +0000576.It Fl 1
577Forces
578.Nm
579to try protocol version 1 only.
Damien Miller4af51302000-04-16 11:18:38 +1000580.It Fl 2
581Forces
582.Nm
Damien Millere247cc42000-05-07 12:03:14 +1000583to try protocol version 2 only.
Damien Miller34132e52000-01-14 15:45:46 +1100584.It Fl 4
585Forces
586.Nm
587to use IPv4 addresses only.
588.It Fl 6
589Forces
590.Nm
591to use IPv6 addresses only.
Damien Miller32aa1441999-10-29 09:15:49 +1000592.El
593.Sh CONFIGURATION FILES
594.Nm
595obtains configuration data from the following sources (in this order):
596command line options, user's configuration file
597.Pq Pa $HOME/.ssh/config ,
598and system-wide configuration file
Damien Miller886c63a2000-01-20 23:13:36 +1100599.Pq Pa /etc/ssh_config .
Damien Miller32aa1441999-10-29 09:15:49 +1000600For each parameter, the first obtained value
Damien Miller7684ee12000-03-17 23:40:15 +1100601will be used.
602The configuration files contain sections bracketed by
603.Dq Host
604specifications, and that section is only applied for hosts that
605match one of the patterns given in the specification.
606The matched host name is the one given on the command line.
Damien Miller32aa1441999-10-29 09:15:49 +1000607.Pp
608Since the first obtained value for each parameter is used, more
609host-specific declarations should be given near the beginning of the
610file, and general defaults at the end.
611.Pp
612The configuration file has the following format:
613.Pp
614Empty lines and lines starting with
615.Ql #
616are comments.
617.Pp
618Otherwise a line is of the format
619.Dq keyword arguments .
620The possible
621keywords and their meanings are as follows (note that the
622configuration files are case-sensitive):
623.Bl -tag -width Ds
624.It Cm Host
625Restricts the following declarations (up to the next
626.Cm Host
627keyword) to be only for those hosts that match one of the patterns
628given after the keyword.
629.Ql \&*
630and
631.Ql ?
632can be used as wildcards in the
Damien Miller7684ee12000-03-17 23:40:15 +1100633patterns.
634A single
Damien Miller32aa1441999-10-29 09:15:49 +1000635.Ql \&*
636as a pattern can be used to provide global
Damien Miller7684ee12000-03-17 23:40:15 +1100637defaults for all hosts.
638The host is the
Damien Miller32aa1441999-10-29 09:15:49 +1000639.Ar hostname
640argument given on the command line (i.e., the name is not converted to
641a canonicalized host name before matching).
642.It Cm AFSTokenPassing
Damien Miller450a7a12000-03-26 13:04:51 +1000643Specifies whether to pass AFS tokens to remote host.
644The argument to this keyword must be
Damien Miller32aa1441999-10-29 09:15:49 +1000645.Dq yes
646or
647.Dq no .
648.It Cm BatchMode
649If set to
650.Dq yes ,
Damien Miller7684ee12000-03-17 23:40:15 +1100651passphrase/password querying will be disabled.
652This option is useful in scripts and other batch jobs where you have no
653user to supply the password.
654The argument must be
Damien Miller32aa1441999-10-29 09:15:49 +1000655.Dq yes
656or
657.Dq no .
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000658The default is
659.Dq no .
Damien Miller396691a2000-01-20 22:44:08 +1100660.It Cm CheckHostIP
661If this flag is set to
662.Dq yes ,
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000663ssh will additionally check the host IP address in the
Damien Miller396691a2000-01-20 22:44:08 +1100664.Pa known_hosts
Damien Miller450a7a12000-03-26 13:04:51 +1000665file.
666This allows ssh to detect if a host key changed due to DNS spoofing.
Damien Miller396691a2000-01-20 22:44:08 +1100667If the option is set to
668.Dq no ,
669the check will not be executed.
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000670The default is
671.Dq yes .
Damien Miller32aa1441999-10-29 09:15:49 +1000672.It Cm Cipher
Damien Miller50a41ed2000-10-16 12:14:42 +1100673Specifies the cipher to use for encrypting the session
Damien Miller69b69aa2000-10-28 14:19:58 +1100674in protocol version 1.
Damien Miller7684ee12000-03-17 23:40:15 +1100675Currently,
Damien Miller69b69aa2000-10-28 14:19:58 +1100676.Dq blowfish
Damien Miller32aa1441999-10-29 09:15:49 +1000677and
678.Dq 3des
Damien Miller7684ee12000-03-17 23:40:15 +1100679are supported.
680The default is
Damien Miller32aa1441999-10-29 09:15:49 +1000681.Dq 3des .
Damien Miller22c77262000-04-13 12:26:34 +1000682.It Cm Ciphers
683Specifies the ciphers allowed for protocol version 2
684in order of preference.
685Multiple ciphers must be comma-separated.
686The default is
Ben Lindstrom5ab6ae12001-02-10 22:08:03 +0000687.Pp
688.Bd -literal
Ben Lindstromec26fb12001-03-06 01:05:23 +0000689 ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
Ben Lindstrom5ab6ae12001-02-10 22:08:03 +0000690 aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,
691 rijndael256-cbc,rijndael-cbc@lysator.liu.se''
692.Ed
Damien Miller32aa1441999-10-29 09:15:49 +1000693.It Cm Compression
Damien Miller7684ee12000-03-17 23:40:15 +1100694Specifies whether to use compression.
695The argument must be
Damien Miller32aa1441999-10-29 09:15:49 +1000696.Dq yes
697or
698.Dq no .
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000699The default is
700.Dq no .
Damien Miller32aa1441999-10-29 09:15:49 +1000701.It Cm CompressionLevel
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000702Specifies the compression level to use if compression is enabled.
Damien Miller7684ee12000-03-17 23:40:15 +1100703The argument must be an integer from 1 (fast) to 9 (slow, best).
704The default level is 6, which is good for most applications.
705The meaning of the values is the same as in
Damien Miller396691a2000-01-20 22:44:08 +1100706.Xr gzip 1 .
Damien Miller32aa1441999-10-29 09:15:49 +1000707.It Cm ConnectionAttempts
708Specifies the number of tries (one per second) to make before falling
Damien Miller7684ee12000-03-17 23:40:15 +1100709back to rsh or exiting.
710The argument must be an integer.
711This may be useful in scripts if the connection sometimes fails.
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000712The default is 4.
Damien Miller0bc1bd82000-11-13 22:57:25 +1100713.It Cm PubkeyAuthentication
714Specifies whether to try public key authentication.
Damien Millere247cc42000-05-07 12:03:14 +1000715The argument to this keyword must be
716.Dq yes
717or
718.Dq no .
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000719The default is
720.Dq yes .
Damien Millere247cc42000-05-07 12:03:14 +1000721Note that this option applies to protocol version 2 only.
Damien Miller32aa1441999-10-29 09:15:49 +1000722.It Cm EscapeChar
723Sets the escape character (default:
724.Ql ~ ) .
725The escape character can also
Damien Miller7684ee12000-03-17 23:40:15 +1100726be set on the command line.
727The argument should be a single character,
Damien Miller32aa1441999-10-29 09:15:49 +1000728.Ql ^
729followed by a letter, or
730.Dq none
731to disable the escape
732character entirely (making the connection transparent for binary
733data).
Damien Miller22c77262000-04-13 12:26:34 +1000734.It Cm FallBackToRsh
Damien Miller32aa1441999-10-29 09:15:49 +1000735Specifies that if connecting via
736.Nm
737fails due to a connection refused error (there is no
738.Xr sshd 8
Damien Miller22c77262000-04-13 12:26:34 +1000739listening on the remote host),
Damien Miller32aa1441999-10-29 09:15:49 +1000740.Xr rsh 1
741should automatically be used instead (after a suitable warning about
Damien Miller7684ee12000-03-17 23:40:15 +1100742the session being unencrypted).
743The argument must be
Damien Miller32aa1441999-10-29 09:15:49 +1000744.Dq yes
745or
746.Dq no .
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000747The default is
748.Dq no .
Damien Miller32aa1441999-10-29 09:15:49 +1000749.It Cm ForwardAgent
750Specifies whether the connection to the authentication agent (if any)
Damien Miller7684ee12000-03-17 23:40:15 +1100751will be forwarded to the remote machine.
752The argument must be
Damien Miller32aa1441999-10-29 09:15:49 +1000753.Dq yes
754or
755.Dq no .
Damien Millerb1715dc2000-05-30 13:44:51 +1000756The default is
757.Dq no .
Damien Miller32aa1441999-10-29 09:15:49 +1000758.It Cm ForwardX11
759Specifies whether X11 connections will be automatically redirected
Damien Miller22c77262000-04-13 12:26:34 +1000760over the secure channel and
Damien Miller32aa1441999-10-29 09:15:49 +1000761.Ev DISPLAY
Damien Miller7684ee12000-03-17 23:40:15 +1100762set.
Damien Miller22c77262000-04-13 12:26:34 +1000763The argument must be
Damien Miller32aa1441999-10-29 09:15:49 +1000764.Dq yes
765or
766.Dq no .
Damien Miller98c7ad62000-03-09 21:27:49 +1100767The default is
768.Dq no .
Damien Miller32aa1441999-10-29 09:15:49 +1000769.It Cm GatewayPorts
770Specifies whether remote hosts are allowed to connect to local
771forwarded ports.
772The argument must be
773.Dq yes
774or
775.Dq no .
776The default is
777.Dq no .
778.It Cm GlobalKnownHostsFile
Ben Lindstrom1e621742001-03-06 01:10:53 +0000779Specifies a file to use for the protocol version 1 global
780host key database instead of
Damien Miller886c63a2000-01-20 23:13:36 +1100781.Pa /etc/ssh_known_hosts .
Ben Lindstrom1e621742001-03-06 01:10:53 +0000782.It Cm GlobalKnownHostsFile2
783Specifies a file to use for the protocol version 2 global
784host key database instead of
785.Pa /etc/ssh_known_hosts2 .
Ben Lindstrom4dccfa52000-12-28 16:40:05 +0000786.It Cm HostKeyAlias
787Specifies an alias that should be used instead of the
788real host name when looking up or saving the host key
Damien Miller33804262001-02-04 23:20:18 +1100789in the known_hosts files.
790This option is useful for tunneling ssh connections
Ben Lindstrom4dccfa52000-12-28 16:40:05 +0000791or if you have multiple servers running on a single host.
Ben Lindstrom982dbbc2001-04-17 18:11:36 +0000792.It Cm HostKeyAlgorithms
793Specfies the protocol version 2 host key algorithms
794that the client wants to use in order of preference.
795The default for this option is:
796.Dq ssh-rsa,ssh-dss
Damien Miller32aa1441999-10-29 09:15:49 +1000797.It Cm HostName
Damien Miller7684ee12000-03-17 23:40:15 +1100798Specifies the real host name to log into.
799This can be used to specify nicknames or abbreviations for hosts.
800Default is the name given on the command line.
801Numeric IP addresses are also permitted (both on the command line and in
Damien Miller32aa1441999-10-29 09:15:49 +1000802.Cm HostName
803specifications).
804.It Cm IdentityFile
805Specifies the file from which the user's RSA authentication identity
806is read (default
Damien Millere247cc42000-05-07 12:03:14 +1000807.Pa $HOME/.ssh/identity
Damien Miller32aa1441999-10-29 09:15:49 +1000808in the user's home directory).
809Additionally, any identities represented by the authentication agent
Damien Miller7684ee12000-03-17 23:40:15 +1100810will be used for authentication.
811The file name may use the tilde
812syntax to refer to a user's home directory.
813It is possible to have
Damien Miller32aa1441999-10-29 09:15:49 +1000814multiple identity files specified in configuration files; all these
815identities will be tried in sequence.
816.It Cm KeepAlive
817Specifies whether the system should send keepalive messages to the
Damien Miller7684ee12000-03-17 23:40:15 +1100818other side.
819If they are sent, death of the connection or crash of one
820of the machines will be properly noticed.
821However, this means that
Damien Miller32aa1441999-10-29 09:15:49 +1000822connections will die if the route is down temporarily, and some people
Damien Miller450a7a12000-03-26 13:04:51 +1000823find it annoying.
Damien Miller32aa1441999-10-29 09:15:49 +1000824.Pp
825The default is
826.Dq yes
827(to send keepalives), and the client will notice
Damien Miller7684ee12000-03-17 23:40:15 +1100828if the network goes down or the remote host dies.
829This is important in scripts, and many users want it too.
Damien Miller32aa1441999-10-29 09:15:49 +1000830.Pp
831To disable keepalives, the value should be set to
832.Dq no
833in both the server and the client configuration files.
834.It Cm KerberosAuthentication
Damien Miller450a7a12000-03-26 13:04:51 +1000835Specifies whether Kerberos authentication will be used.
836The argument to this keyword must be
Damien Miller32aa1441999-10-29 09:15:49 +1000837.Dq yes
838or
839.Dq no .
840.It Cm KerberosTgtPassing
Damien Miller450a7a12000-03-26 13:04:51 +1000841Specifies whether a Kerberos TGT will be forwarded to the server.
842This will only work if the Kerberos server is actually an AFS kaserver.
843The argument to this keyword must be
Damien Miller32aa1441999-10-29 09:15:49 +1000844.Dq yes
845or
846.Dq no .
847.It Cm LocalForward
848Specifies that a TCP/IP port on the local machine be forwarded over
Damien Miller7684ee12000-03-17 23:40:15 +1100849the secure channel to given host:port from the remote machine.
850The first argument must be a port number, and the second must be
851host:port.
852Multiple forwardings may be specified, and additional
853forwardings can be given on the command line.
854Only the superuser can forward privileged ports.
Damien Miller5ce662a1999-11-11 17:57:39 +1100855.It Cm LogLevel
856Gives the verbosity level that is used when logging messages from
857.Nm ssh .
858The possible values are:
Ben Lindstromdb65e8f2001-01-19 04:26:52 +0000859QUIET, FATAL, ERROR, INFO, VERBOSE and DEBUG.
860The default is INFO.
Ben Lindstrom06b33aa2001-02-15 03:01:59 +0000861.It Cm MACs
862Specifies the MAC (message authentication code) algorithms
863in order of preference.
864The MAC algorithm is used in protocol version 2
865for data integrity protection.
866Multiple algorithms must be comma-separated.
867The default is
868.Pp
869.Bd -literal
Ben Lindstromec26fb12001-03-06 01:05:23 +0000870 ``hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,
Ben Lindstrom06b33aa2001-02-15 03:01:59 +0000871 hmac-sha1-96,hmac-md5-96''
872.Ed
Damien Miller32aa1441999-10-29 09:15:49 +1000873.It Cm NumberOfPasswordPrompts
Damien Miller450a7a12000-03-26 13:04:51 +1000874Specifies the number of password prompts before giving up.
875The argument to this keyword must be an integer.
876Default is 3.
Damien Miller396691a2000-01-20 22:44:08 +1100877.It Cm PasswordAuthentication
Damien Miller7684ee12000-03-17 23:40:15 +1100878Specifies whether to use password authentication.
879The argument to this keyword must be
Damien Miller396691a2000-01-20 22:44:08 +1100880.Dq yes
881or
882.Dq no .
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000883The default is
884.Dq yes .
Damien Millere247cc42000-05-07 12:03:14 +1000885Note that this option applies to both protocol version 1 and 2.
Damien Miller32aa1441999-10-29 09:15:49 +1000886.It Cm Port
Damien Miller7684ee12000-03-17 23:40:15 +1100887Specifies the port number to connect on the remote host.
888Default is 22.
Damien Miller1e42f302001-03-19 23:59:11 +1100889.It Cm PreferredAuthentications
890Specifies the order in which the client should try protocol 2
891authentication methods. This allows a client to prefer one method (e.g.
892.Cm keyboard-interactive )
893over another method (e.g.
894.Cm password )
895The default for this option is:
896.Dq publickey, password, keyboard-interactive
Damien Miller22c77262000-04-13 12:26:34 +1000897.It Cm Protocol
898Specifies the protocol versions
899.Nm
900should support in order of preference.
901The possible values are
902.Dq 1
903and
904.Dq 2 .
905Multiple versions must be comma-separated.
906The default is
Ben Lindstromf3272352001-04-05 23:29:59 +0000907.Dq 2,1 .
Damien Millere247cc42000-05-07 12:03:14 +1000908This means that
909.Nm
Ben Lindstromf3272352001-04-05 23:29:59 +0000910tries version 2 and falls back to version 1
911if version 2 is not available.
Damien Miller32aa1441999-10-29 09:15:49 +1000912.It Cm ProxyCommand
Damien Miller7684ee12000-03-17 23:40:15 +1100913Specifies the command to use to connect to the server.
914The command
915string extends to the end of the line, and is executed with
916.Pa /bin/sh .
917In the command string,
918.Ql %h
919will be substituted by the host name to
920connect and
921.Ql %p
922by the port.
923The command can be basically anything,
924and should read from its standard input and write to its standard output.
925It should eventually connect an
Damien Miller32aa1441999-10-29 09:15:49 +1000926.Xr sshd 8
927server running on some machine, or execute
928.Ic sshd -i
Damien Miller7684ee12000-03-17 23:40:15 +1100929somewhere.
930Host key management will be done using the
Damien Miller32aa1441999-10-29 09:15:49 +1000931HostName of the host being connected (defaulting to the name typed by
932the user).
Damien Milleraae6c611999-12-06 11:47:28 +1100933Note that
934.Cm CheckHostIP
935is not available for connects with a proxy command.
Damien Miller32aa1441999-10-29 09:15:49 +1000936.Pp
937.It Cm RemoteForward
938Specifies that a TCP/IP port on the remote machine be forwarded over
Damien Miller7684ee12000-03-17 23:40:15 +1100939the secure channel to given host:port from the local machine.
940The first argument must be a port number, and the second must be
941host:port.
942Multiple forwardings may be specified, and additional
943forwardings can be given on the command line.
944Only the superuser can forward privileged ports.
Damien Miller32aa1441999-10-29 09:15:49 +1000945.It Cm RhostsAuthentication
Damien Miller7684ee12000-03-17 23:40:15 +1100946Specifies whether to try rhosts based authentication.
947Note that this
Damien Miller32aa1441999-10-29 09:15:49 +1000948declaration only affects the client side and has no effect whatsoever
Damien Miller7684ee12000-03-17 23:40:15 +1100949on security.
950Disabling rhosts authentication may reduce
Damien Miller32aa1441999-10-29 09:15:49 +1000951authentication time on slow connections when rhosts authentication is
Damien Miller7684ee12000-03-17 23:40:15 +1100952not used.
953Most servers do not permit RhostsAuthentication because it
954is not secure (see RhostsRSAAuthentication).
955The argument to this keyword must be
Damien Miller32aa1441999-10-29 09:15:49 +1000956.Dq yes
957or
958.Dq no .
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000959The default is
960.Dq yes .
Damien Miller32aa1441999-10-29 09:15:49 +1000961.It Cm RhostsRSAAuthentication
962Specifies whether to try rhosts based authentication with RSA host
Damien Miller7684ee12000-03-17 23:40:15 +1100963authentication.
Damien Miller7684ee12000-03-17 23:40:15 +1100964The argument must be
Damien Miller32aa1441999-10-29 09:15:49 +1000965.Dq yes
966or
967.Dq no .
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000968The default is
969.Dq yes .
Damien Miller32aa1441999-10-29 09:15:49 +1000970.It Cm RSAAuthentication
Damien Miller7684ee12000-03-17 23:40:15 +1100971Specifies whether to try RSA authentication.
972The argument to this keyword must be
Damien Miller32aa1441999-10-29 09:15:49 +1000973.Dq yes
974or
975.Dq no .
976RSA authentication will only be
977attempted if the identity file exists, or an authentication agent is
978running.
Ben Lindstrom89b0bd62001-03-29 00:27:11 +0000979The default is
980.Dq yes .
Damien Millere247cc42000-05-07 12:03:14 +1000981Note that this option applies to protocol version 1 only.
Damien Miller33804262001-02-04 23:20:18 +1100982.It Cm ChallengeResponseAuthentication
983Specifies whether to use challenge response authentication.
984Currently there is only support for
Damien Miller95def091999-11-25 00:26:21 +1100985.Xr skey 1
Damien Miller7684ee12000-03-17 23:40:15 +1100986authentication.
987The argument to this keyword must be
Damien Miller95def091999-11-25 00:26:21 +1100988.Dq yes
989or
990.Dq no .
991The default is
992.Dq no .
Damien Miller32aa1441999-10-29 09:15:49 +1000993.It Cm StrictHostKeyChecking
994If this flag is set to
Damien Miller22c77262000-04-13 12:26:34 +1000995.Dq yes ,
Damien Miller32aa1441999-10-29 09:15:49 +1000996.Nm
Ben Lindstromeb930d42001-01-29 08:37:08 +0000997will never automatically add host keys to the
Damien Miller32aa1441999-10-29 09:15:49 +1000998.Pa $HOME/.ssh/known_hosts
Damien Millere247cc42000-05-07 12:03:14 +1000999and
1000.Pa $HOME/.ssh/known_hosts2
Ben Lindstromeb930d42001-01-29 08:37:08 +00001001files, and refuses to connect to hosts whose host key has changed.
Damien Miller7684ee12000-03-17 23:40:15 +11001002This provides maximum protection against trojan horse attacks.
1003However, it can be somewhat annoying if you don't have good
Damien Miller886c63a2000-01-20 23:13:36 +11001004.Pa /etc/ssh_known_hosts
Damien Millere247cc42000-05-07 12:03:14 +10001005and
1006.Pa /etc/ssh_known_hosts2
Damien Miller32aa1441999-10-29 09:15:49 +10001007files installed and frequently
Ben Lindstromeb930d42001-01-29 08:37:08 +00001008connect to new hosts.
1009This option forces the user to manually
1010add all new hosts.
1011If this flag is set to
1012.Dq no ,
1013.Nm
1014will automatically add new host keys to the
1015user known hosts files.
1016If this flag is set to
1017.Dq ask ,
1018new host keys
1019will be added to the user known host files only after the user
1020has confirmed that is what they really want to do, and
1021.Nm
1022will refuse to connect to hosts whose host key has changed.
Damien Miller7684ee12000-03-17 23:40:15 +11001023The host keys of
Ben Lindstromeb930d42001-01-29 08:37:08 +00001024known hosts will be verified automatically in all cases.
Damien Miller7684ee12000-03-17 23:40:15 +11001025The argument must be
Ben Lindstromeb930d42001-01-29 08:37:08 +00001026.Dq yes ,
1027.Dq no
Damien Miller32aa1441999-10-29 09:15:49 +10001028or
Ben Lindstromeb930d42001-01-29 08:37:08 +00001029.Dq ask .
1030The default is
1031.Dq ask .
Damien Miller32aa1441999-10-29 09:15:49 +10001032.It Cm UsePrivilegedPort
1033Specifies whether to use a privileged port for outgoing connections.
1034The argument must be
1035.Dq yes
1036or
1037.Dq no .
1038The default is
Ben Lindstromcebc8582001-03-08 03:39:10 +00001039.Dq no .
Damien Miller32aa1441999-10-29 09:15:49 +10001040Note that setting this option to
1041.Dq no
Damien Millera34a28b1999-12-14 10:47:15 +11001042turns off
Damien Miller32aa1441999-10-29 09:15:49 +10001043.Cm RhostsAuthentication
1044and
Kevin Stevesfcec7f82000-12-15 19:55:48 +00001045.Cm RhostsRSAAuthentication
1046for older servers.
Damien Miller396691a2000-01-20 22:44:08 +11001047.It Cm User
Damien Miller7684ee12000-03-17 23:40:15 +11001048Specifies the user to log in as.
1049This can be useful if you have a different user name on different machines.
1050This saves the trouble of
Damien Miller396691a2000-01-20 22:44:08 +11001051having to remember to give the user name on the command line.
1052.It Cm UserKnownHostsFile
Ben Lindstrom1e621742001-03-06 01:10:53 +00001053Specifies a file to use for the protocol version 1 user
1054host key database instead of
Damien Miller396691a2000-01-20 22:44:08 +11001055.Pa $HOME/.ssh/known_hosts .
Ben Lindstrom1e621742001-03-06 01:10:53 +00001056.It Cm UserKnownHostsFile2
1057Specifies a file to use for the protocol version 2 user
1058host key database instead of
1059.Pa $HOME/.ssh/known_hosts2 .
Damien Miller32aa1441999-10-29 09:15:49 +10001060.It Cm UseRsh
Damien Miller7684ee12000-03-17 23:40:15 +11001061Specifies that rlogin/rsh should be used for this host.
1062It is possible that the host does not at all support the
Damien Miller32aa1441999-10-29 09:15:49 +10001063.Nm
Damien Miller7684ee12000-03-17 23:40:15 +11001064protocol.
1065This causes
Damien Miller32aa1441999-10-29 09:15:49 +10001066.Nm
Damien Miller7684ee12000-03-17 23:40:15 +11001067to immediately execute
Damien Miller32aa1441999-10-29 09:15:49 +10001068.Xr rsh 1 .
1069All other options (except
1070.Cm HostName )
Damien Miller7684ee12000-03-17 23:40:15 +11001071are ignored if this has been specified.
1072The argument must be
Damien Miller32aa1441999-10-29 09:15:49 +10001073.Dq yes
1074or
1075.Dq no .
Damien Millerd3a18572000-06-07 19:55:44 +10001076.It Cm XAuthLocation
1077Specifies the location of the
1078.Xr xauth 1
1079program.
1080The default is
1081.Pa /usr/X11R6/bin/xauth .
Damien Miller7b28dc52000-09-05 13:34:53 +11001082.El
Damien Miller32aa1441999-10-29 09:15:49 +10001083.Sh ENVIRONMENT
1084.Nm
1085will normally set the following environment variables:
1086.Bl -tag -width Ds
1087.It Ev DISPLAY
1088The
1089.Ev DISPLAY
Damien Miller7684ee12000-03-17 23:40:15 +11001090variable indicates the location of the X11 server.
Damien Miller22c77262000-04-13 12:26:34 +10001091It is automatically set by
Damien Miller32aa1441999-10-29 09:15:49 +10001092.Nm
1093to point to a value of the form
1094.Dq hostname:n
1095where hostname indicates
Damien Miller7684ee12000-03-17 23:40:15 +11001096the host where the shell runs, and n is an integer >= 1.
1097.Nm
1098uses this special value to forward X11 connections over the secure
1099channel.
1100The user should normally not set DISPLAY explicitly, as that
Damien Miller32aa1441999-10-29 09:15:49 +10001101will render the X11 connection insecure (and will require the user to
1102manually copy any required authorization cookies).
1103.It Ev HOME
1104Set to the path of the user's home directory.
1105.It Ev LOGNAME
1106Synonym for
1107.Ev USER ;
1108set for compatibility with systems that use this variable.
1109.It Ev MAIL
1110Set to point the user's mailbox.
Damien Miller7684ee12000-03-17 23:40:15 +11001111.It Ev PATH
Damien Miller32aa1441999-10-29 09:15:49 +10001112Set to the default
1113.Ev PATH ,
1114as specified when compiling
1115.Nm ssh .
1116.It Ev SSH_AUTH_SOCK
1117indicates the path of a unix-domain socket used to communicate with the
1118agent.
1119.It Ev SSH_CLIENT
Damien Miller7684ee12000-03-17 23:40:15 +11001120Identifies the client end of the connection.
1121The variable contains
Damien Miller32aa1441999-10-29 09:15:49 +10001122three space-separated values: client ip-address, client port number,
1123and server port number.
Ben Lindstrom4dccfa52000-12-28 16:40:05 +00001124.It Ev SSH_ORIGINAL_COMMAND
1125The variable contains the original command line if a forced command
1126is executed.
1127It can be used to extract the original arguments.
Damien Miller32aa1441999-10-29 09:15:49 +10001128.It Ev SSH_TTY
1129This is set to the name of the tty (path to the device) associated
Damien Miller7684ee12000-03-17 23:40:15 +11001130with the current shell or command.
1131If the current session has no tty,
Damien Miller32aa1441999-10-29 09:15:49 +10001132this variable is not set.
1133.It Ev TZ
1134The timezone variable is set to indicate the present timezone if it
Damien Miller942da032000-08-18 13:59:06 +10001135was set when the daemon was started (i.e., the daemon passes the value
Damien Miller32aa1441999-10-29 09:15:49 +10001136on to new connections).
1137.It Ev USER
1138Set to the name of the user logging in.
1139.El
1140.Pp
Damien Miller22c77262000-04-13 12:26:34 +10001141Additionally,
Damien Miller32aa1441999-10-29 09:15:49 +10001142.Nm
Damien Miller22c77262000-04-13 12:26:34 +10001143reads
1144.Pa $HOME/.ssh/environment ,
Damien Miller32aa1441999-10-29 09:15:49 +10001145and adds lines of the format
1146.Dq VARNAME=value
1147to the environment.
1148.Sh FILES
Damien Miller98c7ad62000-03-09 21:27:49 +11001149.Bl -tag -width Ds
Ben Lindstrom1e621742001-03-06 01:10:53 +00001150.It Pa $HOME/.ssh/known_hosts, $HOME/.ssh/known_hosts2
Damien Miller32aa1441999-10-29 09:15:49 +10001151Records host keys for all hosts the user has logged into (that are not
1152in
Ben Lindstrom1e621742001-03-06 01:10:53 +00001153.Pa /etc/ssh_known_hosts
1154for protocol version 1 or
1155.Pa /etc/ssh_known_hosts2
1156for protocol version 2).
Damien Miller32aa1441999-10-29 09:15:49 +10001157See
1158.Xr sshd 8 .
Ben Lindstrom18a82ac2001-04-11 15:59:35 +00001159.It Pa $HOME/.ssh/identity, $HOME/.ssh/id_dsa, $HOME/.ssh/id_rsa
1160Contains the authentication identity of the user.
1161They are for protocol 1 RSA, protocol 2 DSA, and protocol 2 RSA, respectively.
Damien Millere247cc42000-05-07 12:03:14 +10001162These files
1163contain sensitive data and should be readable by the user but not
Damien Miller32aa1441999-10-29 09:15:49 +10001164accessible by others (read/write/execute).
1165Note that
1166.Nm
Damien Millere247cc42000-05-07 12:03:14 +10001167ignores a private key file if it is accessible by others.
Damien Miller32aa1441999-10-29 09:15:49 +10001168It is possible to specify a passphrase when
1169generating the key; the passphrase will be used to encrypt the
1170sensitive part of this file using 3DES.
Ben Lindstrom18a82ac2001-04-11 15:59:35 +00001171.It Pa $HOME/.ssh/identity.pub, $HOME/.ssh/id_dsa.pub, $HOME/.ssh/id_rsa.pub
Damien Miller32aa1441999-10-29 09:15:49 +10001172Contains the public key for authentication (public part of the
Damien Miller7684ee12000-03-17 23:40:15 +11001173identity file in human-readable form).
Damien Millere247cc42000-05-07 12:03:14 +10001174The contents of the
1175.Pa $HOME/.ssh/identity.pub
1176file should be added to
Damien Miller32aa1441999-10-29 09:15:49 +10001177.Pa $HOME/.ssh/authorized_keys
1178on all machines
Ben Lindstrom18a82ac2001-04-11 15:59:35 +00001179where you wish to log in using protocol version 1 RSA authentication.
Damien Millere247cc42000-05-07 12:03:14 +10001180The contents of the
1181.Pa $HOME/.ssh/id_dsa.pub
Ben Lindstrom18a82ac2001-04-11 15:59:35 +00001182and
1183.Pa $HOME/.ssh/id_rsa.pub
Damien Millere247cc42000-05-07 12:03:14 +10001184file should be added to
1185.Pa $HOME/.ssh/authorized_keys2
1186on all machines
Ben Lindstrom18a82ac2001-04-11 15:59:35 +00001187where you wish to log in using protocol version 2 DSA/RSA authentication.
Damien Millere247cc42000-05-07 12:03:14 +10001188These files are not
Damien Miller7684ee12000-03-17 23:40:15 +11001189sensitive and can (but need not) be readable by anyone.
Damien Millere247cc42000-05-07 12:03:14 +10001190These files are
Kevin Steves3c034ae2001-02-05 13:47:11 +00001191never used automatically and are not necessary; they are only provided for
Damien Miller32aa1441999-10-29 09:15:49 +10001192the convenience of the user.
1193.It Pa $HOME/.ssh/config
Damien Miller7684ee12000-03-17 23:40:15 +11001194This is the per-user configuration file.
1195The format of this file is described above.
1196This file is used by the
Damien Miller32aa1441999-10-29 09:15:49 +10001197.Nm
Damien Miller7684ee12000-03-17 23:40:15 +11001198client.
1199This file does not usually contain any sensitive information,
Damien Miller32aa1441999-10-29 09:15:49 +10001200but the recommended permissions are read/write for the user, and not
1201accessible by others.
1202.It Pa $HOME/.ssh/authorized_keys
Damien Miller7684ee12000-03-17 23:40:15 +11001203Lists the RSA keys that can be used for logging in as this user.
1204The format of this file is described in the
Damien Miller32aa1441999-10-29 09:15:49 +10001205.Xr sshd 8
Damien Miller7684ee12000-03-17 23:40:15 +11001206manual page.
1207In the simplest form the format is the same as the .pub
Damien Miller32aa1441999-10-29 09:15:49 +10001208identity files (that is, each line contains the number of bits in
1209modulus, public exponent, modulus, and comment fields, separated by
Damien Miller7684ee12000-03-17 23:40:15 +11001210spaces).
1211This file is not highly sensitive, but the recommended
Damien Miller32aa1441999-10-29 09:15:49 +10001212permissions are read/write for the user, and not accessible by others.
Damien Millere247cc42000-05-07 12:03:14 +10001213.It Pa $HOME/.ssh/authorized_keys2
Damien Miller0bc1bd82000-11-13 22:57:25 +11001214Lists the public keys (DSA/RSA) that can be used for logging in as this user.
Damien Millere247cc42000-05-07 12:03:14 +10001215This file is not highly sensitive, but the recommended
1216permissions are read/write for the user, and not accessible by others.
1217.It Pa /etc/ssh_known_hosts, /etc/ssh_known_hosts2
Damien Miller7684ee12000-03-17 23:40:15 +11001218Systemwide list of known host keys.
Damien Millere247cc42000-05-07 12:03:14 +10001219.Pa /etc/ssh_known_hosts
1220contains RSA and
1221.Pa /etc/ssh_known_hosts2
Damien Miller0bc1bd82000-11-13 22:57:25 +11001222contains DSA or RSA keys for protocol version 2.
Damien Millere247cc42000-05-07 12:03:14 +10001223These files should be prepared by the
Damien Miller32aa1441999-10-29 09:15:49 +10001224system administrator to contain the public host keys of all machines in the
Damien Miller7684ee12000-03-17 23:40:15 +11001225organization.
1226This file should be world-readable.
1227This file contains
Damien Miller32aa1441999-10-29 09:15:49 +10001228public keys, one per line, in the following format (fields separated
1229by spaces): system name, number of bits in modulus, public exponent,
Damien Miller7684ee12000-03-17 23:40:15 +11001230modulus, and optional comment field.
1231When different names are used
Damien Miller32aa1441999-10-29 09:15:49 +10001232for the same machine, all such names should be listed, separated by
Damien Miller7684ee12000-03-17 23:40:15 +11001233commas.
1234The format is described on the
Damien Miller32aa1441999-10-29 09:15:49 +10001235.Xr sshd 8
1236manual page.
1237.Pp
1238The canonical system name (as returned by name servers) is used by
1239.Xr sshd 8
1240to verify the client host when logging in; other names are needed because
1241.Nm
1242does not convert the user-supplied name to a canonical name before
1243checking the key, because someone with access to the name servers
1244would then be able to fool host authentication.
Damien Miller886c63a2000-01-20 23:13:36 +11001245.It Pa /etc/ssh_config
Damien Miller7684ee12000-03-17 23:40:15 +11001246Systemwide configuration file.
1247This file provides defaults for those
Damien Miller32aa1441999-10-29 09:15:49 +10001248values that are not specified in the user's configuration file, and
Damien Miller7684ee12000-03-17 23:40:15 +11001249for those users who do not have a configuration file.
1250This file must be world-readable.
Damien Miller32aa1441999-10-29 09:15:49 +10001251.It Pa $HOME/.rhosts
1252This file is used in
1253.Pa \&.rhosts
1254authentication to list the
Damien Miller7684ee12000-03-17 23:40:15 +11001255host/user pairs that are permitted to log in.
1256(Note that this file is
Damien Miller32aa1441999-10-29 09:15:49 +10001257also used by rlogin and rsh, which makes using this file insecure.)
1258Each line of the file contains a host name (in the canonical form
1259returned by name servers), and then a user name on that host,
Damien Miller7684ee12000-03-17 23:40:15 +11001260separated by a space.
Ben Lindstromebd888d2001-03-05 05:49:29 +00001261On some machines this file may need to be
Damien Miller32aa1441999-10-29 09:15:49 +10001262world-readable if the user's home directory is on a NFS partition,
1263because
1264.Xr sshd 8
Damien Miller7684ee12000-03-17 23:40:15 +11001265reads it as root.
1266Additionally, this file must be owned by the user,
1267and must not have write permissions for anyone else.
1268The recommended
Damien Miller32aa1441999-10-29 09:15:49 +10001269permission for most machines is read/write for the user, and not
1270accessible by others.
1271.Pp
1272Note that by default
1273.Xr sshd 8
1274will be installed so that it requires successful RSA host
Damien Miller7684ee12000-03-17 23:40:15 +11001275authentication before permitting \s+2.\s0rhosts authentication.
1276If your server machine does not have the client's host key in
Damien Miller886c63a2000-01-20 23:13:36 +11001277.Pa /etc/ssh_known_hosts ,
Damien Miller32aa1441999-10-29 09:15:49 +10001278you can store it in
1279.Pa $HOME/.ssh/known_hosts .
1280The easiest way to do this is to
1281connect back to the client from the server machine using ssh; this
Damien Millere247cc42000-05-07 12:03:14 +10001282will automatically add the host key to
Damien Miller32aa1441999-10-29 09:15:49 +10001283.Pa $HOME/.ssh/known_hosts .
1284.It Pa $HOME/.shosts
1285This file is used exactly the same way as
1286.Pa \&.rhosts .
1287The purpose for
1288having this file is to be able to use rhosts authentication with
1289.Nm
1290without permitting login with
1291.Xr rlogin 1
1292or
1293.Xr rsh 1 .
1294.It Pa /etc/hosts.equiv
1295This file is used during
Damien Miller7684ee12000-03-17 23:40:15 +11001296.Pa \&.rhosts authentication.
1297It contains
Damien Miller32aa1441999-10-29 09:15:49 +10001298canonical hosts names, one per line (the full format is described on
1299the
1300.Xr sshd 8
Damien Miller7684ee12000-03-17 23:40:15 +11001301manual page).
1302If the client host is found in this file, login is
Damien Miller32aa1441999-10-29 09:15:49 +10001303automatically permitted provided client and server user names are the
Damien Miller7684ee12000-03-17 23:40:15 +11001304same.
1305Additionally, successful RSA host authentication is normally
1306required.
1307This file should only be writable by root.
Damien Miller886c63a2000-01-20 23:13:36 +11001308.It Pa /etc/shosts.equiv
Damien Miller22c77262000-04-13 12:26:34 +10001309This file is processed exactly as
Damien Miller32aa1441999-10-29 09:15:49 +10001310.Pa /etc/hosts.equiv .
1311This file may be useful to permit logins using
1312.Nm
1313but not using rsh/rlogin.
Damien Miller886c63a2000-01-20 23:13:36 +11001314.It Pa /etc/sshrc
Damien Miller32aa1441999-10-29 09:15:49 +10001315Commands in this file are executed by
1316.Nm
1317when the user logs in just before the user's shell (or command) is started.
1318See the
1319.Xr sshd 8
1320manual page for more information.
1321.It Pa $HOME/.ssh/rc
1322Commands in this file are executed by
1323.Nm
1324when the user logs in just before the user's shell (or command) is
1325started.
Damien Miller22c77262000-04-13 12:26:34 +10001326See the
Damien Miller32aa1441999-10-29 09:15:49 +10001327.Xr sshd 8
1328manual page for more information.
Damien Miller4f0fa561999-12-26 14:24:41 +11001329.It Pa $HOME/.ssh/environment
1330Contains additional definitions for environment variables, see section
1331.Sx ENVIRONMENT
1332above.
Damien Miller7b28dc52000-09-05 13:34:53 +11001333.El
Damien Miller0bc1bd82000-11-13 22:57:25 +11001334.Sh AUTHORS
Ben Lindstrom035782e2001-01-29 08:34:16 +00001335OpenSSH is a derivative of the original and free
1336ssh 1.2.12 release by Tatu Ylonen.
1337Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
1338Theo de Raadt and Dug Song
1339removed many bugs, re-added newer features and
1340created OpenSSH.
1341Markus Friedl contributed the support for SSH
1342protocol versions 1.5 and 2.0.
Damien Miller32aa1441999-10-29 09:15:49 +10001343.Sh SEE ALSO
1344.Xr rlogin 1 ,
1345.Xr rsh 1 ,
1346.Xr scp 1 ,
Damien Miller33804262001-02-04 23:20:18 +11001347.Xr sftp 1 ,
Damien Miller32aa1441999-10-29 09:15:49 +10001348.Xr ssh-add 1 ,
1349.Xr ssh-agent 1 ,
1350.Xr ssh-keygen 1 ,
1351.Xr telnet 1 ,
Ben Lindstrom5ab6ae12001-02-10 22:08:03 +00001352.Xr sshd 8
Ben Lindstrom160ec622001-04-22 17:17:46 +00001353.Rs
1354.%A T. Ylonen
1355.%A T. Kivinen
1356.%A M. Saarinen
1357.%A T. Rinne
1358.%A S. Lehtinen
1359.%T "SSH Protocol Architecture"
1360.%N draft-ietf-secsh-architecture-07.txt
1361.%D January 2001
1362.%O work in progress material
1363.Re