summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scp.1110
-rw-r--r--ssh-add.1116
-rw-r--r--ssh-agent.1163
-rw-r--r--ssh-keygen.1155
-rw-r--r--ssh.1966
-rw-r--r--sshd.8781
6 files changed, 2291 insertions, 0 deletions
diff --git a/scp.1 b/scp.1
new file mode 100644
index 000000000..5eedfdb92
--- /dev/null
+++ b/scp.1
@@ -0,0 +1,110 @@
1.\" -*- nroff -*-
2.\"
3.\" scp.1
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: Sun May 7 00:14:37 1995 ylo
11.\"
12.\" $Id: scp.1,v 1.3 1999/10/28 23:15:49 damien Exp $
13.\"
14.Dd September 25, 1999
15.Dt SCP 1
16.Os
17.Sh NAME
18.Nm scp
19.Nd secure copy (remote file copy program)
20.Sh SYNOPSIS
21.Nm scp
22.Op Fl pqrvC
23.Op Fl P Ar port
24.Op Fl c Ar cipher
25.Op Fl i Ar identity_file
26.Sm off
27.Oo
28.Op Ar user@
29.Ar host1 No :
30.Oc Ns Ar file1
31.Sm on
32.Op Ar ...
33.Sm off
34.Oo
35.Op Ar user@
36.Ar host2 No :
37.Oc Ar file2
38.Sm on
39.Sh DESCRIPTION
40.Nm
41copies files between hosts on a network. It uses
42.Xr ssh 1
43for data transfer, and uses the same authentication and provides the
44same security as
45.Xr ssh 1 .
46Unlike
47.Xr rcp 1 ,
48.Nm
49will ask for passwords or passphrases if they are needed for
50authentication.
51.Pp
52Any file name may contain a host and user specification to indicate
53that the file is to be copied to/from that host. Copies between two
54remote hosts are permitted.
55.Pp
56The options are as follows:
57.Bl -tag -width Ds
58.It Fl c Ar cipher
59Selects the cipher to use for encrypting the data transfer. This
60option is directly passed to
61.Xr ssh 1 .
62.It Fl i Ar identity_file
63Selects the file from which the identity (private key) for RSA
64authentication is read. This option is directly passed to
65.Xr ssh 1 .
66.It Fl p
67Preserves modification times, access times, and modes from the
68original file.
69.It Fl r
70Recursively copy entire directories.
71.It Fl v
72Verbose mode. Causes
73.Nm
74and
75.Xr ssh 1
76to print debugging messages about their progress. This is helpful in
77debugging connection, authentication, and configuration problems.
78.It Fl B
79Selects batch mode (prevents asking for passwords or passphrases).
80.It Fl q
81Disables the progress meter.
82.It Fl C
83Compression enable. Passes the
84.Fl C
85flag to
86.Xr ssh 1
87to enable compression.
88.It Fl P Ar port
89Specifies the port to connect to on the remote host. Note that this
90option is written with a capital
91.Sq P ,
92because
93.Fl p
94is already reserved for preserving the times and modes of the file in
95.Xr rcp 1 .
96.Sh AUTHORS
97Timo Rinne <tri@iki.fi> and Tatu Ylonen <ylo@cs.hut.fi>
98.Sh HISTORY
99.Nm
100is based on the
101.Xr rcp 1
102program in BSD source code from the Regents of the University of
103California.
104.Sh SEE ALSO
105.Xr rcp 1 ,
106.Xr ssh 1 ,
107.Xr ssh-add 1 ,
108.Xr ssh-agent 1 ,
109.Xr ssh-keygen 1 ,
110.Xr sshd 8
diff --git a/ssh-add.1 b/ssh-add.1
new file mode 100644
index 000000000..0ab93dc67
--- /dev/null
+++ b/ssh-add.1
@@ -0,0 +1,116 @@
1.\" -*- nroff -*-
2.\"
3.\" ssh-add.1
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 23:55:14 1995 ylo
11.\"
12.\" $Id: ssh-add.1,v 1.3 1999/10/28 23:15:49 damien Exp $
13.\"
14.Dd September 25, 1999
15.Dt SSH-ADD 1
16.Os
17.Sh NAME
18.Nm ssh-add
19.Nd adds identities for the authentication agent
20.Sh SYNOPSIS
21.Nm ssh-add
22.Op Fl ldD
23.Op Ar
24.Sh DESCRIPTION
25.Nm
26adds identities to the authentication agent,
27.Xr ssh-agent 1 .
28When run without arguments, it adds the file
29.Pa $HOME/.ssh/identity .
30Alternative file names can be given on the
31command line. If any file requires a passphrase,
32.Nm
33asks for the passphrase from the user.
34The Passphrase it is read from the user's tty.
35.Pp
36The authentication agent must be running and must be an ancestor of
37the current process for
38.Nm
39to work.
40.Pp
41The options are as follows:
42.Bl -tag -width Ds
43.It Fl l
44Lists all identities currently represented by the agent.
45.It Fl d
46Instead of adding the identity, removes the identity from the agent.
47.It Fl D
48Deletes all identities from the agent.
49.El
50.Sh FILES
51.Bl -tag -width Ds
52.Pa $HOME/.ssh/identity
53Contains the RSA authentication identity of the user. This file
54should not be readable by anyone but the user.
55Note that
56.Nm
57ignores this file if it is accessible by others.
58It is possible to
59specify a passphrase when generating the key; that passphrase will be
60used to encrypt the private part of this file. This is the
61default file added by
62.Nm
63when no other files have been specified.
64.Pp
65If
66.Nm
67needs a passphrase, it will read the passphrase from the current
68terminal if it was run from a terminal. If
69.Nm
70does not have a terminal associated with it but
71.Ev DISPLAY
72is set, it
73will open an X11 window to read the passphrase. This is particularly
74useful when calling
75.Nm
76from a
77.Pa .Xsession
78or related script. (Note that on some machines it
79may be necessary to redirect the input from
80.Pa /dev/null
81to make this work.)
82.Sh AUTHOR
83Tatu Ylonen <ylo@cs.hut.fi>
84.Pp
85OpenSSH
86is a derivative of the original (free) ssh 1.2.12 release, but with bugs
87removed and newer features re-added. Rapidly after the 1.2.12 release,
88newer versions bore successively more restrictive licenses. This version
89of OpenSSH
90.Bl -bullet
91.It
92has all components of a restrictive nature (ie. patents, see
93.Xr ssl 8 )
94directly removed from the source code; any licensed or patented components
95are chosen from
96external libraries.
97.It
98has been updated to support ssh protocol 1.5.
99.It
100contains added support for
101.Xr kerberos 8
102authentication and ticket passing.
103.It
104supports one-time password authentication with
105.Xr skey 1 .
106.El
107.Pp
108The libraries described in
109.Xr ssl 8
110are required for proper operation.
111.Sh SEE ALSO
112.Xr ssh 1 ,
113.Xr ssh-agent 1 ,
114.Xr ssh-keygen 1 ,
115.Xr sshd 8 ,
116.Xr ssl 8
diff --git a/ssh-agent.1 b/ssh-agent.1
new file mode 100644
index 000000000..8b9504fa5
--- /dev/null
+++ b/ssh-agent.1
@@ -0,0 +1,163 @@
1.\" $OpenBSD: ssh-agent.1,v 1.7 1999/10/28 08:43:10 markus Exp $
2.\"
3.\" -*- nroff -*-
4.\"
5.\" ssh-agent.1
6.\"
7.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
8pp.\"
9.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
10.\" All rights reserved
11.\"
12.\" Created: Sat Apr 23 20:10:43 1995 ylo
13.\"
14.Dd September 25, 1999
15.Dt SSH-AGENT 1
16.Os
17.Sh NAME
18.Nm ssh-agent
19.Nd authentication agent
20.Sh SYNOPSIS
21.Nm ssh-agent
22.Op Fl c Li | Fl s
23.Op Fl k
24.Oo
25.Ar command
26.Op Ar args ...
27.Oc
28.Sh DESCRIPTION
29.Nm
30is a program to hold authentication private keys. The
31idea is that
32.Nm
33is started in the beginning of an X-session or a login session, and
34all other windows or programs are started as clients to the ssh-agent
35program. Through use of environment variables the agent can be located
36and automatically used for RSA authentication when logging in to other
37machines using
38.Xr ssh 1 .
39.Pp
40The options are as follows:
41.Bl -tag -width Ds
42.It Fl c
43Generate C-shell commands on
44.Dv stdout .
45This is the default if
46.Ev SHELL
47looks like it's a csh style of shell.
48.It Fl s
49Generate Bourne shell commands on
50.Dv stdout .
51This is the default if
52.Ev SHELL
53does not look like it's a csh style of shell.
54.It Fl k
55Kill the current agent (given by the
56.Ev SSH_AGENT_PID
57environment variable).
58.El
59.Pp
60If a commandline is given, this is executed as a subprocess of the agent.
61When the command dies, so does the agent.
62.Pp
63The agent initially does not have any private keys. Keys are added
64using
65.Xr ssh-add 1 .
66When executed without arguments,
67.Xr ssh-add 1
68adds the
69.Pa $HOME/.ssh/identity
70file. If the identity has a passphrase,
71.Xr ssh-add 1
72asks for the passphrase (using a small X11 application if running
73under X11, or from the terminal if running without X). It then sends
74the identity to the agent. Several identities can be stored in the
75agent; the agent can automatically use any of these identities.
76.Ic ssh-add -l
77displays the identities currently held by the agent.
78.Pp
79The idea is that the agent is run in the user's local PC, laptop, or
80terminal. Authentication data need not be stored on any other
81machine, and authentication passphrases never go over the network.
82However, the connection to the agent is forwarded over SSH
83remote logins, and the user can thus use the privileges given by the
84identities anywhere in the network in a secure way.
85.Pp
86There are two main ways to get an agent setup: Either you let the agent
87start a new subcommand into which some environment variables are exported, or
88you let the agent print the needed shell commands (either
89.Xr sh 1
90or
91.Xr csh 1
92syntax can be generated) which can be evalled in the calling shell.
93Later
94.Xr ssh 1
95look at these variables and use them to establish a connection to the agent.
96.Pp
97A unix-domain socket is created
98.Pq Pa /tmp/ssh-XXXXXXXX/agent.<pid> ,
99and the name of this socket is stored in the
100.Ev SSH_AUTH_SOCK
101environment
102variable. The socket is made accessible only to the current user.
103This method is easily abused by root or another instance of the same
104user.
105.Pp
106The
107.Ev SSH_AGENT_PID
108environment variable holds the agent's PID.
109.Pp
110The agent exits automatically when the command given on the command
111line terminates.
112.Sh FILES
113.Bl -tag -width Ds
114.It Pa $HOME/.ssh/identity
115Contains the RSA authentication identity of the user. This file
116should not be readable by anyone but the user. It is possible to
117specify a passphrase when generating the key; that passphrase will be
118used to encrypt the private part of this file. This file
119is not used by
120.Nm
121but is normally added to the agent using
122.Xr ssh-add 1
123at login time.
124.It Pa /tmp/ssh-XXXX/agent.<pid> ,
125Unix-domain sockets used to contain the connection to the
126authentication agent. These sockets should only be readable by the
127owner. The sockets should get automatically removed when the agent
128exits.
129.Sh AUTHOR
130Tatu Ylonen <ylo@cs.hut.fi>
131.Pp
132OpenSSH
133is a derivative of the original (free) ssh 1.2.12 release, but with bugs
134removed and newer features re-added. Rapidly after the 1.2.12 release,
135newer versions bore successively more restrictive licenses. This version
136of OpenSSH
137.Bl -bullet
138.It
139has all components of a restrictive nature (ie. patents, see
140.Xr ssl 8 )
141directly removed from the source code; any licensed or patented components
142are chosen from
143external libraries.
144.It
145has been updated to support ssh protocol 1.5.
146.It
147contains added support for
148.Xr kerberos 8
149authentication and ticket passing.
150.It
151supports one-time password authentication with
152.Xr skey 1 .
153.El
154.Pp
155The libraries described in
156.Xr ssl 8
157are required for proper operation.
158.Sh SEE ALSO
159.Xr ssh 1 ,
160.Xr ssh-add 1 ,
161.Xr ssh-keygen 1 ,
162.Xr sshd 8 ,
163.Xr ssl 8
diff --git a/ssh-keygen.1 b/ssh-keygen.1
new file mode 100644
index 000000000..2cbcfae10
--- /dev/null
+++ b/ssh-keygen.1
@@ -0,0 +1,155 @@
1.\" -*- nroff -*-
2.\"
3.\" ssh-keygen.1
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 23:55:14 1995 ylo
11.\"
12.\" $Id: ssh-keygen.1,v 1.3 1999/10/28 23:15:49 damien Exp $
13.\"
14.Dd September 25, 1999
15.Dt SSH-KEYGEN 1
16.Os
17.Sh NAME
18.Nm ssh-keygen
19.Nd authentication key generation
20.Sh SYNOPSIS
21.Nm ssh-keygen
22.Op Fl q
23.Op Fl b Ar bits
24.Op Fl N Ar new_passphrase
25.Op Fl C Ar comment
26.Nm ssh-keygen
27.Fl p
28.Op Fl P Ar old_passphrase
29.Op Fl N Ar new_passphrase
30.Nm ssh-keygen
31.Fl c
32.Op Fl P Ar passphrase
33.Op Fl C Ar comment
34.Sh DESCRIPTION
35.Nm
36generates and manages authentication keys for
37.Xr ssh 1 .
38Normally each user wishing to use SSH
39with RSA authentication runs this once to create the authentication
40key in
41.Pa $HOME/.ssh/identity .
42Additionally, the system administrator may use this to generate host keys.
43.Pp
44Normally this program generates the key and asks for a file in which
45to store the private key. The public key is stored in a file with the
46same name but
47.Dq .pub
48appended. The program also asks for a
49passphrase. The passphrase may be empty to indicate no passphrase
50(host keys must have empty passphrase), or it may be a string of
51arbitrary length. Good passphrases are 10-30 characters long and are
52not simple sentences or otherwise easily guessable (English
53prose has only 1-2 bits of entropy per word, and provides very bad
54passphrases). The passphrase can be changed later by using the
55.Fl p
56option.
57.Pp
58There is no way to recover a lost passphrase. If the passphrase is
59lost or forgotten, you will have to generate a new key and copy the
60corresponding public key to other machines.
61.Pp
62There is also a comment field in the key file that is only for
63convenience to the user to help identify the key. The comment can
64tell what the key is for, or whatever is useful. The comment is
65initialized to
66.Dq user@host
67when the key is created, but can be changed using the
68.Fl c
69option.
70.Pp
71The options are as follows:
72.Bl -tag -width Ds
73.It Fl b Ar bits
74Specifies the number of bits in the key to create. Minimum is 512
75bits. Generally 1024 bits is considered sufficient, and key sizes
76above that no longer improve security but make things slower. The
77default is 1024 bits.
78.It Fl c
79Requests changing the comment in the private and public key files.
80The program will prompt for the file containing the private keys, for
81passphrase if the key has one, and for the new comment.
82.It Fl p
83Requests changing the passphrase of a private key file instead of
84creating a new private key. The program will prompt for the file
85containing the private key, for the old passphrase, and twice for the
86new passphrase.
87.It Fl q
88Silence
89.Nm ssh-keygen .
90Used by
91.Pa /etc/rc
92when creating a new key.
93.It Fl C Ar comment
94Provides the new comment.
95.It Fl N Ar new_passphrase
96Provides the new passphrase.
97.It Fl P Ar passphrase
98Provides the (old) passphrase.
99.El
100.Sh FILES
101.Bl -tag -width Ds
102.It Pa $HOME/.ssh/random_seed
103Used for seeding the random number generator. This file should not be
104readable by anyone but the user. This file is created the first time
105the program is run, and is updated every time.
106.It Pa $HOME/.ssh/identity
107Contains the RSA authentication identity of the user. This file
108should not be readable by anyone but the user. It is possible to
109specify a passphrase when generating the key; that passphrase will be
110used to encrypt the private part of this file using 3DES. This file
111is not automatically accessed by
112.Nm
113but it is offered as the default file for the private key.
114.It Pa $HOME/.ssh/identity.pub
115Contains the public key for authentication. The contents of this file
116should be added to
117.Pa $HOME/.ssh/authorized_keys
118on all machines
119where you wish to log in using RSA authentication. There is no
120need to keep the contents of this file secret.
121.Sh AUTHOR
122Tatu Ylonen <ylo@cs.hut.fi>
123.Pp
124OpenSSH
125is a derivative of the original (free) ssh 1.2.12 release, but with bugs
126removed and newer features re-added. Rapidly after the 1.2.12 release,
127newer versions bore successively more restrictive licenses. This version
128of OpenSSH
129.Bl -bullet
130.It
131has all components of a restrictive nature (ie. patents, see
132.Xr ssl 8 )
133directly removed from the source code; any licensed or patented components
134are chosen from
135external libraries.
136.It
137has been updated to support ssh protocol 1.5.
138.It
139contains added support for
140.Xr kerberos 8
141authentication and ticket passing.
142.It
143supports one-time password authentication with
144.Xr skey 1 .
145.El
146.Pp
147The libraries described in
148.Xr ssl 8
149are required for proper operation.
150.Sh SEE ALSO
151.Xr ssh 1 ,
152.Xr ssh-add 1 ,
153.Xr ssh-agent 1,
154.Xr sshd 8 ,
155.Xr ssl 8
diff --git a/ssh.1 b/ssh.1
new file mode 100644
index 000000000..36703e205
--- /dev/null
+++ b/ssh.1
@@ -0,0 +1,966 @@
1.\" -*- nroff -*-
2.\"
3.\" ssh.1.in
4.\"
5.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
6.\"
7.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8.\" All rights reserved
9.\"
10.\" Created: Sat Apr 22 21:55:14 1995 ylo
11.\"
12.\" $Id: ssh.1,v 1.3 1999/10/28 23:15:50 damien Exp $
13.\"
14.Dd September 25, 1999
15.Dt SSH 1
16.Os
17.Sh NAME
18.Nm ssh
19.Nd OpenSSH secure shell client (remote login program)
20.Sh SYNOPSIS
21.Nm ssh
22.Op Fl l Ar login_name
23.Op Ar hostname | user@hostname
24.Op Ar command
25.Pp
26.Nm ssh
27.Op Fl afgknqtvxCPX
28.Op Fl c Ar blowfish | 3des
29.Op Fl e Ar escape_char
30.Op Fl i Ar identity_file
31.Op Fl l Ar login_name
32.Op Fl o Ar option
33.Op Fl p Ar port
34.Oo Fl L Xo
35.Sm off
36.Ar host :
37.Ar port :
38.Ar hostport
39.Sm on
40.Xc
41.Oc
42.Oo Fl R Xo
43.Sm off
44.Ar host :
45.Ar port :
46.Ar hostport
47.Sm on
48.Xc
49.Oc
50.Op Ar hostname | user@hostname
51.Op Ar command
52.Sh DESCRIPTION
53.Nm
54(Secure Shell) is a program for logging into a remote machine and for
55executing commands on a remote machine. It is intended to replace
56rlogin and rsh, and provide secure encrypted communications between
57two untrusted hosts over an insecure network. X11 connections and
58arbitrary TCP/IP ports can also be forwarded over the secure channel.
59.Pp
60.Nm
61connects and logs into the specified
62.Ar hostname .
63The user must prove
64his/her identity to the remote machine using one of several methods.
65.Pp
66First, if the machine the user logs in from is listed in
67.Pa /etc/hosts.equiv
68or
69.Pa /etc/shosts.equiv
70on the remote machine, and the user names are
71the same on both sides, the user is immediately permitted to log in.
72Second, if
73.Pa \&.rhosts
74or
75.Pa \&.shosts
76exists in the user's home directory on the
77remote machine and contains a line containing the name of the client
78machine and the name of the user on that machine, the user is
79permitted to log in. This form of authentication alone is normally not
80allowed by the server because it is not secure.
81.Pp
82The second (and primary) authentication method is the
83.Pa rhosts
84or
85.Pa hosts.equiv
86method combined with RSA-based host authentication. It
87means that if the login would be permitted by
88.Pa \&.rhosts ,
89.Pa \&.shosts ,
90.Pa /etc/hosts.equiv ,
91or
92.Pa /etc/shosts.equiv ,
93and if additionally the server can verify the client's
94host key (see
95.Pa /etc/ssh_known_hosts
96in the
97.Sx FILES
98section), only then login is
99permitted. This authentication method closes security holes due to IP
100spoofing, DNS spoofing and routing spoofing. [Note to the
101administrator:
102.Pa /etc/hosts.equiv ,
103.Pa \&.rhosts ,
104and the rlogin/rsh protocol in general, are inherently insecure and should be
105disabled if security is desired.]
106.Pp
107As a third authentication method,
108.Nm
109supports RSA based authentication.
110The scheme is based on public-key cryptography: there are cryptosystems
111where encryption and decryption are done using separate keys, and it
112is not possible to derive the decryption key from the encryption key.
113RSA is one such system. The idea is that each user creates a public/private
114key pair for authentication purposes. The
115server knows the public key, and only the user knows the private key.
116The file
117.Pa $HOME/.ssh/authorized_keys
118lists the public keys that are permitted for logging
119in. When the user logs in, the
120.Nm
121program tells the server which key pair it would like to use for
122authentication. The server checks if this key is permitted, and if
123so, sends the user (actually the
124.Nm
125program running on behalf of the user) a challenge, a random number,
126encrypted by the user's public key. The challenge can only be
127decrypted using the proper private key. The user's client then decrypts the
128challenge using the private key, proving that he/she knows the private
129key but without disclosing it to the server.
130.Pp
131.Nm
132implements the RSA authentication protocol automatically. The user
133creates his/her RSA key pair by running
134.Xr ssh-keygen 1 .
135This stores the private key in
136.Pa \&.ssh/identity
137and the public key in
138.Pa \&.ssh/identity.pub
139in the user's home directory. The user should then
140copy the
141.Pa identity.pub
142to
143.Pa \&.ssh/authorized_keys
144in his/her home directory on the remote machine (the
145.Pa authorized_keys
146file corresponds to the conventional
147.Pa \&.rhosts
148file, and has one key
149per line, though the lines can be very long). After this, the user
150can log in without giving the password. RSA authentication is much
151more secure than rhosts authentication.
152.Pp
153The most convenient way to use RSA authentication may be with an
154authentication agent. See
155.Xr ssh-agent 1
156for more information.
157.Pp
158If other authentication methods fail,
159.Nm
160prompts the user for a password. The password is sent to the remote
161host for checking; however, since all communications are encrypted,
162the password cannot be seen by someone listening on the network.
163.Pp
164When the user's identity has been accepted by the server, the server
165either executes the given command, or logs into the machine and gives
166the user a normal shell on the remote machine. All communication with
167the remote command or shell will be automatically encrypted.
168.Pp
169If a pseudo-terminal has been allocated (normal login session), the
170user can disconnect with
171.Ic ~. ,
172and suspend
173.Nm
174with
175.Ic ~^Z .
176All forwarded connections can be listed with
177.Ic ~#
178and if
179the session blocks waiting for forwarded X11 or TCP/IP
180connections to terminate, it can be backgrounded with
181.Ic ~&
182(this should not be used while the user shell is active, as it can cause the
183shell to hang). All available escapes can be listed with
184.Ic ~? .
185.Pp
186A single tilde character can be sent as
187.Ic ~~
188(or by following the tilde by a character other than those described above).
189The escape character must always follow a newline to be interpreted as
190special. The escape character can be changed in configuration files
191or on the command line.
192.Pp
193If no pseudo tty has been allocated, the
194session is transparent and can be used to reliably transfer binary
195data. On most systems, setting the escape character to
196.Dq none
197will also make the session transparent even if a tty is used.
198.Pp
199The session terminates when the command or shell in on the remote
200machine exists and all X11 and TCP/IP connections have been closed.
201The exit status of the remote program is returned as the exit status
202of
203.Nm ssh .
204.Pp
205If the user is using X11 (the
206.Ev DISPLAY
207environment variable is set), the connection to the X11 display is
208automatically forwarded to the remote side in such a way that any X11
209programs started from the shell (or command) will go through the
210encrypted channel, and the connection to the real X server will be made
211from the local machine. The user should not manually set
212.Ev DISPLAY .
213Forwarding of X11 connections can be
214configured on the command line or in configuration files.
215.Pp
216The
217.Ev DISPLAY
218value set by
219.Nm
220will point to the server machine, but with a display number greater
221than zero. This is normal, and happens because
222.Nm
223creates a
224.Dq proxy
225X server on the server machine for forwarding the
226connections over the encrypted channel.
227.Pp
228.Nm
229will also automatically set up Xauthority data on the server machine.
230For this purpose, it will generate a random authorization cookie,
231store it in Xauthority on the server, and verify that any forwarded
232connections carry this cookie and replace it by the real cookie when
233the connection is opened. The real authentication cookie is never
234sent to the server machine (and no cookies are sent in the plain).
235.Pp
236If the user is using an authentication agent, the connection to the agent
237is automatically forwarded to the remote side unless disabled on
238command line or in a configuration file.
239.Pp
240Forwarding of arbitrary TCP/IP connections over the secure channel can
241be specified either on command line or in a configuration file. One
242possible application of TCP/IP forwarding is a secure connection to an
243electronic purse; another is going trough firewalls.
244.Pp
245.Nm
246automatically maintains and checks a database containing RSA-based
247identifications for all hosts it has ever been used with. The
248database is stored in
249.Pa \&.ssh/known_hosts
250in the user's home directory. Additionally, the file
251.Pa /etc/ssh_known_hosts
252is automatically checked for known hosts. Any new hosts are
253automatically added to the user's file. If a host's identification
254ever changes,
255.Nm
256warns about this and disables password authentication to prevent a
257trojan horse from getting the user's password. Another purpose of
258this mechanism is to prevent man-in-the-middle attacks which could
259otherwise be used to circumvent the encryption. The
260.Cm StrictHostKeyChecking
261option (see below) can be used to prevent logins to machines whose
262host key is not known or has changed.
263.Sh OPTIONS
264.Bl -tag -width Ds
265.It Fl a
266Disables forwarding of the authentication agent connection. This may
267also be specified on a per-host basis in the configuration file.
268.It Fl c Ar blowfish|3des
269Selects the cipher to use for encrypting the session.
270.Ar 3des
271is used by default. It is believed to be secure.
272.Ar 3des
273(triple-des) is an encrypt-decrypt-encrypt triple with three different keys.
274It is presumably more secure than the
275.Ar des
276cipher which is no longer supported in ssh.
277.Ar blowfish
278is a fast block cipher, it appears very secure and is much faster than
279.Ar 3des .
280.It Fl e Ar ch|^ch|none
281Sets the escape character for sessions with a pty (default:
282.Ql ~ ) .
283The escape character is only recognized at the beginning of a line. The
284escape character followed by a dot
285.Pq Ql \&.
286closes the connection, followed
287by control-Z suspends the connection, and followed by itself sends the
288escape character once. Setting the character to
289.Dq none
290disables any escapes and makes the session fully transparent.
291.It Fl f
292Requests
293.Nm
294to go to background after authentication. This is useful
295if
296.Nm
297is going to ask for passwords or passphrases, but the user
298wants it in the background. This implies
299.Fl n .
300The recommended way to start X11 programs at a remote site is with
301something like
302.Ic ssh -f host xterm .
303.It Fl i Ar identity_file
304Selects the file from which the identity (private key) for
305RSA authentication is read. Default is
306.Pa \&.ssh/identity
307in the user's home directory. Identity files may also be specified on
308a per-host basis in the configuration file. It is possible to have
309multiple
310.Fl i
311options (and multiple identities specified in
312configuration files).
313.It Fl g
314Allows remote hosts to connect to local forwarded ports.
315.It Fl k
316Disables forwarding of Kerberos tickets and AFS tokens. This may
317also be specified on a per-host basis in the configuration file.
318.It Fl l Ar login_name
319Specifies the user to log in as on the remote machine. This may also
320be specified on a per-host basis in the configuration file.
321.It Fl n
322Redirects stdin from
323.Pa /dev/null
324(actually, prevents reading from stdin).
325This must be used when
326.Nm
327is run in the background. A common trick is to use this to run X11
328programs in a remote machine. For example,
329.Ic ssh -n shadows.cs.hut.fi emacs &
330will start an emacs on shadows.cs.hut.fi, and the X11
331connection will be automatically forwarded over an encrypted channel.
332The
333.Nm
334program will be put in the background.
335(This does not work if
336.Nm
337needs to ask for a password or passphrase; see also the
338.Fl f
339option.)
340.It Fl o Ar option
341Can be used to give options in the format used in the config file.
342This is useful for specifying options for which there is no separate
343command-line flag. The option has the same format as a line in the
344configuration file.
345.It Fl p Ar port
346Port to connect to on the remote host. This can be specified on a
347per-host basis in the configuration file.
348.It Fl P
349Use a non-privileged port for outgoing connections.
350This can be used if your firewall does
351not permit connections from privileged ports.
352Note that this option turns of
353.Cm RhostsAuthentication
354and
355.Cm RhostsRSAAuthentication .
356.It Fl q
357Quiet mode. Causes all warning and diagnostic messages to be
358suppressed. Only fatal errors are displayed.
359.It Fl t
360Force pseudo-tty allocation. This can be used to execute arbitary
361screen-based programs on a remote machine, which can be very useful
362e.g. when implementing menu services.
363.It Fl v
364Verbose mode. Causes
365.Nm
366to print debugging messages about its progress. This is helpful in
367debugging connection, authentication, and configuration problems.
368The verbose mode is also used to display
369.Xr skey 1
370challenges, if the user entered "s/key" as password.
371.It Fl x
372Disables X11 forwarding. This can also be specified on a per-host
373basis in a configuration file.
374.It Fl X
375Enables X11 forwarding.
376.It Fl C
377Requests compression of all data (including stdin, stdout, stderr, and
378data for forwarded X11 and TCP/IP connections). The compression
379algorithm is the same used by gzip, and the
380.Dq level
381can be controlled by the
382.Cm CompressionLevel
383option (see below). Compression is desirable on modem lines and other
384slow connections, but will only slow down things on fast networks.
385The default value can be set on a host-by-host basis in the
386configuration files; see the
387.Cm Compress
388option below.
389.It Fl L Ar port:host:hostport
390Specifies that the given port on the local (client) host is to be
391forwarded to the given host and port on the remote side. This works
392by allocating a socket to listen to
393.Ar port
394on the local side, and whenever a connection is made to this port, the
395connection is forwarded over the secure channel, and a connection is
396made to
397.Ar host:hostport
398from the remote machine. Port forwardings can also be specified in the
399configuration file. Only root can forward privileged ports.
400.It Fl R Ar port:host:hostport
401Specifies that the given port on the remote (server) host is to be
402forwarded to the given host and port on the local side. This works
403by allocating a socket to listen to
404.Ar port
405on the remote side, and whenever a connection is made to this port, the
406connection is forwarded over the secure channel, and a connection is
407made to
408.Ar host:hostport
409from the local machine. Port forwardings can also be specified in the
410configuration file. Privileged ports can be forwarded only when
411logging in as root on the remote machine.
412.El
413.Sh CONFIGURATION FILES
414.Nm
415obtains configuration data from the following sources (in this order):
416command line options, user's configuration file
417.Pq Pa $HOME/.ssh/config ,
418and system-wide configuration file
419.Pq Pa /etc/ssh_config .
420For each parameter, the first obtained value
421will be used. The configuration files contain sections bracketed by
422"Host" specifications, and that section is only applied for hosts that
423match one of the patterns given in the specification. The matched
424host name is the one given on the command line.
425.Pp
426Since the first obtained value for each parameter is used, more
427host-specific declarations should be given near the beginning of the
428file, and general defaults at the end.
429.Pp
430The configuration file has the following format:
431.Pp
432Empty lines and lines starting with
433.Ql #
434are comments.
435.Pp
436Otherwise a line is of the format
437.Dq keyword arguments .
438The possible
439keywords and their meanings are as follows (note that the
440configuration files are case-sensitive):
441.Bl -tag -width Ds
442.It Cm Host
443Restricts the following declarations (up to the next
444.Cm Host
445keyword) to be only for those hosts that match one of the patterns
446given after the keyword.
447.Ql \&*
448and
449.Ql ?
450can be used as wildcards in the
451patterns. A single
452.Ql \&*
453as a pattern can be used to provide global
454defaults for all hosts. The host is the
455.Ar hostname
456argument given on the command line (i.e., the name is not converted to
457a canonicalized host name before matching).
458.It Cm AFSTokenPassing
459Specifies whether to pass AFS tokens to remote host. The argument to
460this keyword must be
461.Dq yes
462or
463.Dq no .
464.It Cm BatchMode
465If set to
466.Dq yes ,
467passphrase/password querying will be disabled. This
468option is useful in scripts and other batch jobs where you have no
469user to supply the password. The argument must be
470.Dq yes
471or
472.Dq no .
473.It Cm Cipher
474Specifies the cipher to use for encrypting the session. Currently,
475.Dq blowfish ,
476and
477.Dq 3des
478are supported. The default is
479.Dq 3des .
480.It Cm Compression
481Specifies whether to use compression. The argument must be
482.Dq yes
483or
484.Dq no .
485.It Cm CompressionLevel
486Specifies the compression level to use if compression is enable. The
487argument must be an integer from 1 (fast) to 9 (slow, best). The
488default level is 6, which is good for most applications. The meaning
489of the values is the same as in GNU GZIP.
490.It Cm ConnectionAttempts
491Specifies the number of tries (one per second) to make before falling
492back to rsh or exiting. The argument must be an integer. This may be
493useful in scripts if the connection sometimes fails.
494.It Cm EscapeChar
495Sets the escape character (default:
496.Ql ~ ) .
497The escape character can also
498be set on the command line. The argument should be a single
499character,
500.Ql ^
501followed by a letter, or
502.Dq none
503to disable the escape
504character entirely (making the connection transparent for binary
505data).
506.It Cm FallBackToRsh
507Specifies that if connecting via
508.Nm
509fails due to a connection refused error (there is no
510.Xr sshd 8
511listening on the remote host),
512.Xr rsh 1
513should automatically be used instead (after a suitable warning about
514the session being unencrypted). The argument must be
515.Dq yes
516or
517.Dq no .
518.It Cm ForwardAgent
519Specifies whether the connection to the authentication agent (if any)
520will be forwarded to the remote machine. The argument must be
521.Dq yes
522or
523.Dq no .
524.It Cm ForwardX11
525Specifies whether X11 connections will be automatically redirected
526over the secure channel and
527.Ev DISPLAY
528set. The argument must be
529.Dq yes
530or
531.Dq no .
532.It Cm GatewayPorts
533Specifies whether remote hosts are allowed to connect to local
534forwarded ports.
535The argument must be
536.Dq yes
537or
538.Dq no .
539The default is
540.Dq no .
541.It Cm GlobalKnownHostsFile
542Specifies a file to use instead of
543.Pa /etc/ssh_known_hosts .
544.It Cm HostName
545Specifies the real host name to log into. This can be used to specify
546nicnames or abbreviations for hosts. Default is the name given on the
547command line. Numeric IP addresses are also permitted (both on the
548command line and in
549.Cm HostName
550specifications).
551.It Cm IdentityFile
552Specifies the file from which the user's RSA authentication identity
553is read (default
554.Pa .ssh/identity
555in the user's home directory).
556Additionally, any identities represented by the authentication agent
557will be used for authentication. The file name may use the tilde
558syntax to refer to a user's home directory. It is possible to have
559multiple identity files specified in configuration files; all these
560identities will be tried in sequence.
561.It Cm KeepAlive
562Specifies whether the system should send keepalive messages to the
563other side. If they are sent, death of the connection or crash of one
564of the machines will be properly noticed. However, this means that
565connections will die if the route is down temporarily, and some people
566find it annoying.
567.Pp
568The default is
569.Dq yes
570(to send keepalives), and the client will notice
571if the network goes down or the remote host dies. This is important
572in scripts, and many users want it too.
573.Pp
574To disable keepalives, the value should be set to
575.Dq no
576in both the server and the client configuration files.
577.It Cm KerberosAuthentication
578Specifies whether Kerberos authentication will be used. The argument to
579this keyword must be
580.Dq yes
581or
582.Dq no .
583.It Cm KerberosTgtPassing
584Specifies whether a Kerberos TGT will be forwarded to the server. This
585will only work if the Kerberos server is actually an AFS kaserver. The
586argument to this keyword must be
587.Dq yes
588or
589.Dq no .
590.It Cm LocalForward
591Specifies that a TCP/IP port on the local machine be forwarded over
592the secure channel to given host:port from the remote machine. The
593first argument must be a port number, and the second must be
594host:port. Multiple forwardings may be specified, and additional
595forwardings can be given on the command line. Only the root can
596forward privileged ports.
597.It Cm PasswordAuthentication
598Specifies whether to use password authentication. The argument to
599this keyword must be
600.Dq yes
601or
602.Dq no .
603.It Cm NumberOfPasswordPrompts
604Specifies the number of password prompts before giving up. The
605argument to this keyword must be an integer. Default is 3.
606.It Cm Port
607Specifies the port number to connect on the remote host. Default is
60822.
609.It Cm ProxyCommand
610Specifies the command to use to connect to the server. The command
611string extends to the end of the line, and is executed with /bin/sh.
612In the command string, %h will be substituted by the host name to
613connect and %p by the port. The command can be basically anything,
614and should read from its stdin and write to its stdout. It should
615eventually connect an
616.Xr sshd 8
617server running on some machine, or execute
618.Ic sshd -i
619somewhere. Host key management will be done using the
620HostName of the host being connected (defaulting to the name typed by
621the user).
622.Pp
623.It Cm RemoteForward
624Specifies that a TCP/IP port on the remote machine be forwarded over
625the secure channel to given host:port from the local machine. The
626first argument must be a port number, and the second must be
627host:port. Multiple forwardings may be specified, and additional
628forwardings can be given on the command line. Only the root can
629forward privileged ports.
630.It Cm RhostsAuthentication
631Specifies whether to try rhosts based authentication. Note that this
632declaration only affects the client side and has no effect whatsoever
633on security. Disabling rhosts authentication may reduce
634authentication time on slow connections when rhosts authentication is
635not used. Most servers do not permit RhostsAuthentication because it
636is not secure (see RhostsRSAAuthentication). The argument to this
637keyword must be
638.Dq yes
639or
640.Dq no .
641.It Cm RhostsRSAAuthentication
642Specifies whether to try rhosts based authentication with RSA host
643authentication. This is the primary authentication method for most
644sites. The argument must be
645.Dq yes
646or
647.Dq no .
648.It Cm RSAAuthentication
649Specifies whether to try RSA authentication. The argument to this
650keyword must be
651.Dq yes
652or
653.Dq no .
654RSA authentication will only be
655attempted if the identity file exists, or an authentication agent is
656running.
657.It Cm CheckHostIP
658If this flag is set to
659.Dq yes ,
660ssh will additionally check the host ip address in the
661.Pa known_hosts
662file. This allows ssh to detect if a host key changed due to DNS spoofing.
663If the option is set to
664.Dq no ,
665the check will not be executed.
666.It Cm StrictHostKeyChecking
667If this flag is set to
668.Dq yes ,
669.Nm
670ssh will never automatically add host keys to the
671.Pa $HOME/.ssh/known_hosts
672file, and refuses to connect hosts whose host key has changed. This
673provides maximum protection against trojan horse attacks. However, it
674can be somewhat annoying if you don't have good
675.Pa /etc/ssh_known_hosts
676files installed and frequently
677connect new hosts. Basically this option forces the user to manually
678add any new hosts. Normally this option is disabled, and new hosts
679will automatically be added to the known host files. The host keys of
680known hosts will be verified automatically in either case. The
681argument must be
682.Dq yes
683or
684.Dq no .
685.It Cm User
686Specifies the user to log in as. This can be useful if you have a
687different user name in different machines. This saves the trouble of
688having to remember to give the user name on the command line.
689.It Cm UserKnownHostsFile
690Specifies a file to use instead of
691.Pa $HOME/.ssh/known_hosts .
692.It Cm UsePrivilegedPort
693Specifies whether to use a privileged port for outgoing connections.
694The argument must be
695.Dq yes
696or
697.Dq no .
698The default is
699.Dq yes .
700Note that setting this option to
701.Dq no
702turns of
703.Cm RhostsAuthentication
704and
705.Cm RhostsRSAAuthentication .
706.It Cm UseRsh
707Specifies that rlogin/rsh should be used for this host. It is
708possible that the host does not at all support the
709.Nm
710protocol. This causes
711.Nm
712to immediately exec
713.Xr rsh 1 .
714All other options (except
715.Cm HostName )
716are ignored if this has been specified. The argument must be
717.Dq yes
718or
719.Dq no .
720.Sh ENVIRONMENT
721.Nm
722will normally set the following environment variables:
723.Bl -tag -width Ds
724.It Ev DISPLAY
725The
726.Ev DISPLAY
727variable indicates the location of the X11 server. It is
728automatically set by
729.Nm
730to point to a value of the form
731.Dq hostname:n
732where hostname indicates
733the host where the shell runs, and n is an integer >= 1. Ssh uses
734this special value to forward X11 connections over the secure
735channel. The user should normally not set DISPLAY explicitly, as that
736will render the X11 connection insecure (and will require the user to
737manually copy any required authorization cookies).
738.It Ev HOME
739Set to the path of the user's home directory.
740.It Ev LOGNAME
741Synonym for
742.Ev USER ;
743set for compatibility with systems that use this variable.
744.It Ev MAIL
745Set to point the user's mailbox.
746.It Ev PATH
747Set to the default
748.Ev PATH ,
749as specified when compiling
750.Nm ssh .
751.It Ev SSH_AUTH_SOCK
752indicates the path of a unix-domain socket used to communicate with the
753agent.
754.It Ev SSH_CLIENT
755Identifies the client end of the connection. The variable contains
756three space-separated values: client ip-address, client port number,
757and server port number.
758.It Ev SSH_TTY
759This is set to the name of the tty (path to the device) associated
760with the current shell or command. If the current session has no tty,
761this variable is not set.
762.It Ev TZ
763The timezone variable is set to indicate the present timezone if it
764was set when the daemon was started (e.i., the daemon passes the value
765on to new connections).
766.It Ev USER
767Set to the name of the user logging in.
768.El
769.Pp
770Additionally,
771.Nm
772reads
773.Pa $HOME/.ssh/environment ,
774and adds lines of the format
775.Dq VARNAME=value
776to the environment.
777.Sh FILES
778.Bl -tag -width $HOME/.ssh/known_hosts
779.It Pa $HOME/.ssh/known_hosts
780Records host keys for all hosts the user has logged into (that are not
781in
782.Pa /etc/ssh_known_hosts ) .
783See
784.Xr sshd 8 .
785.It Pa $HOME/.ssh/random_seed
786Used for seeding the random number generator. This file contains
787sensitive data and should read/write for the user and not accessible
788for others. This file is created the first time the program is run
789and updated automatically. The user should never need to read or
790modify this file.
791.It Pa $HOME/.ssh/identity
792Contains the RSA authentication identity of the user. This file
793contains sensitive data and should be readable by the user but not
794accessible by others (read/write/execute).
795Note that
796.Nm
797ignores this file if it is accessible by others.
798It is possible to specify a passphrase when
799generating the key; the passphrase will be used to encrypt the
800sensitive part of this file using 3DES.
801.It Pa $HOME/.ssh/identity.pub
802Contains the public key for authentication (public part of the
803identity file in human-readable form). The contents of this file
804should be added to
805.Pa $HOME/.ssh/authorized_keys
806on all machines
807where you wish to log in using RSA authentication. This file is not
808sensitive and can (but need not) be readable by anyone. This file is
809never used automatically and is not necessary; it is only provided for
810the convenience of the user.
811.It Pa $HOME/.ssh/config
812This is the per-user configuration file. The format of this file is
813described above. This file is used by the
814.Nm
815client. This file does not usually contain any sensitive information,
816but the recommended permissions are read/write for the user, and not
817accessible by others.
818.It Pa $HOME/.ssh/authorized_keys
819Lists the RSA keys that can be used for logging in as this user. The
820format of this file is described in the
821.Xr sshd 8
822manual page. In the simplest form the format is the same as the .pub
823identity files (that is, each line contains the number of bits in
824modulus, public exponent, modulus, and comment fields, separated by
825spaces). This file is not highly sensitive, but the recommended
826permissions are read/write for the user, and not accessible by others.
827.It Pa /etc/ssh_known_hosts
828Systemwide list of known host keys. This file should be prepared by the
829system administrator to contain the public host keys of all machines in the
830organization. This file should be world-readable. This file contains
831public keys, one per line, in the following format (fields separated
832by spaces): system name, number of bits in modulus, public exponent,
833modulus, and optional comment field. When different names are used
834for the same machine, all such names should be listed, separated by
835commas. The format is described on the
836.Xr sshd 8
837manual page.
838.Pp
839The canonical system name (as returned by name servers) is used by
840.Xr sshd 8
841to verify the client host when logging in; other names are needed because
842.Nm
843does not convert the user-supplied name to a canonical name before
844checking the key, because someone with access to the name servers
845would then be able to fool host authentication.
846.It Pa /etc/ssh_config
847Systemwide configuration file. This file provides defaults for those
848values that are not specified in the user's configuration file, and
849for those users who do not have a configuration file. This file must
850be world-readable.
851.It Pa $HOME/.rhosts
852This file is used in
853.Pa \&.rhosts
854authentication to list the
855host/user pairs that are permitted to log in. (Note that this file is
856also used by rlogin and rsh, which makes using this file insecure.)
857Each line of the file contains a host name (in the canonical form
858returned by name servers), and then a user name on that host,
859separated by a space. One some machines this file may need to be
860world-readable if the user's home directory is on a NFS partition,
861because
862.Xr sshd 8
863reads it as root. Additionally, this file must be owned by the user,
864and must not have write permissions for anyone else. The recommended
865permission for most machines is read/write for the user, and not
866accessible by others.
867.Pp
868Note that by default
869.Xr sshd 8
870will be installed so that it requires successful RSA host
871authentication before permitting \s+2.\s0rhosts authentication. If your
872server machine does not have the client's host key in
873.Pa /etc/ssh_known_hosts ,
874you can store it in
875.Pa $HOME/.ssh/known_hosts .
876The easiest way to do this is to
877connect back to the client from the server machine using ssh; this
878will automatically add the host key inxi
879.Pa $HOME/.ssh/known_hosts .
880.It Pa $HOME/.shosts
881This file is used exactly the same way as
882.Pa \&.rhosts .
883The purpose for
884having this file is to be able to use rhosts authentication with
885.Nm
886without permitting login with
887.Xr rlogin 1
888or
889.Xr rsh 1 .
890.It Pa /etc/hosts.equiv
891This file is used during
892.Pa \&.rhosts authentication. It contains
893canonical hosts names, one per line (the full format is described on
894the
895.Xr sshd 8
896manual page). If the client host is found in this file, login is
897automatically permitted provided client and server user names are the
898same. Additionally, successful RSA host authentication is normally
899required. This file should only be writable by root.
900.It Pa /etc/shosts.equiv
901This file is processed exactly as
902.Pa /etc/hosts.equiv .
903This file may be useful to permit logins using
904.Nm
905but not using rsh/rlogin.
906.It Pa /etc/sshrc
907Commands in this file are executed by
908.Nm
909when the user logs in just before the user's shell (or command) is started.
910See the
911.Xr sshd 8
912manual page for more information.
913.It Pa $HOME/.ssh/rc
914Commands in this file are executed by
915.Nm
916when the user logs in just before the user's shell (or command) is
917started.
918See the
919.Xr sshd 8
920manual page for more information.
921.It Pa libcrypto.so.X.1
922A version of this library which includes support for the RSA algorithm
923is required for proper operation.
924.Sh AUTHOR
925Tatu Ylonen <ylo@cs.hut.fi>
926.Pp
927Issues can be found from the SSH WWW home page:
928.Pp
929.Dl http://www.cs.hut.fi/ssh
930.Pp
931OpenSSH
932is a derivative of the original (free) ssh 1.2.12 release, but with bugs
933removed and newer features re-added. Rapidly after the 1.2.12 release,
934newer versions bore successively more restrictive licenses. This version
935of OpenSSH
936.Bl -bullet
937.It
938has all components of a restrictive nature (ie. patents, see
939.Xr ssl 8 )
940directly removed from the source code; any licensed or patented components
941are chosen from
942external libraries.
943.It
944has been updated to support ssh protocol 1.5.
945.It
946contains added support for
947.Xr kerberos 8
948authentication and ticket passing.
949.It
950supports one-time password authentication with
951.Xr skey 1 .
952.El
953.Pp
954The libraries described in
955.Xr ssl 8
956are required for proper operation.
957.Sh SEE ALSO
958.Xr rlogin 1 ,
959.Xr rsh 1 ,
960.Xr scp 1 ,
961.Xr ssh-add 1 ,
962.Xr ssh-agent 1 ,
963.Xr ssh-keygen 1 ,
964.Xr telnet 1 ,
965.Xr sshd 8 ,
966.Xr ssl 8
diff --git a/sshd.8 b/sshd.8
new file mode 100644
index 000000000..a5c3f9554
--- /dev/null
+++ b/sshd.8
@@ -0,0 +1,781 @@
1.\" -*- nroff -*-
2.\"
3.\" sshd.8.in
4.\"
5.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
6.\"
7.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8.\" All rights reserved
9.\"
10.\" Created: Sat Apr 22 21:55:14 1995 ylo
11.\"
12.\" $Id: sshd.8,v 1.3 1999/10/28 23:15:50 damien Exp $
13.\"
14.Dd September 25, 1999
15.Dt SSHD 8
16.Os
17.Sh NAME
18.Nm sshd
19.Nd secure shell daemon
20.Sh SYNOPSIS
21.Nm sshd
22.Op Fl diq
23.Op Fl b Ar bits
24.Op Fl f Ar config_file
25.Op Fl g Ar login_grace_time
26.Op Fl h Ar host_key_file
27.Op Fl k Ar key_gen_time
28.Op Fl p Ar port
29.Sh DESCRIPTION
30.Nm
31(Secure Shell Daemon) is the daemon program for
32.Xr ssh 1 .
33Together these programs replace rlogin and rsh programs, and
34provide secure encrypted communications between two untrusted hosts
35over an insecure network. The programs are intended to be as easy to
36install and use as possible.
37.Pp
38.Nm
39is the daemon that listens for connections from clients. It is
40normally started at boot from
41.Pa /etc/rc .
42It forks a new
43daemon for each incoming connection. The forked daemons handle
44key exchange, encryption, authentication, command execution,
45and data exchange.
46.Pp
47.Nm
48works as follows. Each host has a host-specific RSA key
49(normally 1024 bits) used to identify the host. Additionally, when
50the daemon starts, it generates a server RSA key (normally 768 bits).
51This key is normally regenerated every hour if it has been used, and
52is never stored on disk.
53.Pp
54Whenever a client connects the daemon, the daemon sends its host
55and server public keys to the client. The client compares the
56host key against its own database to verify that it has not changed.
57The client then generates a 256 bit random number. It encrypts this
58random number using both the host key and the server key, and sends
59the encrypted number to the server. Both sides then start to use this
60random number as a session key which is used to encrypt all further
61communications in the session. The rest of the session is encrypted
62using a conventional cipher, currently Blowfish and 3DES, with 3DES
63being is used by default. The client selects the encryption algorithm
64to use from those offered by the server.
65.Pp
66Next, the server and the client enter an authentication dialog. The
67client tries to authenticate itself using
68.Pa .rhosts
69authentication,
70.Pa .rhosts
71authentication combined with RSA host
72authentication, RSA challenge-response authentication, or password
73based authentication.
74.Pp
75Rhosts authentication is normally disabled
76because it is fundamentally insecure, but can be enabled in the server
77configuration file if desired. System security is not improved unless
78.Xr rshd 8 ,
79.Xr rlogind 8 ,
80.Xr rexecd 8 ,
81and
82.Xr rexd 8
83are disabled (thus completely disabling
84.Xr rlogin 1
85and
86.Xr rsh 1
87into that machine).
88.Pp
89If the client successfully authenticates itself, a dialog for
90preparing the session is entered. At this time the client may request
91things like allocating a pseudo-tty, forwarding X11 connections,
92forwarding TCP/IP connections, or forwarding the authentication agent
93connection over the secure channel.
94.Pp
95Finally, the client either requests a shell or execution of a command.
96The sides then enter session mode. In this mode, either side may send
97data at any time, and such data is forwarded to/from the shell or
98command on the server side, and the user terminal in the client side.
99.Pp
100When the user program terminates and all forwarded X11 and other
101connections have been closed, the server sends command exit status to
102the client, and both sides exit.
103.Pp
104.Nm
105can be configured using command-line options or a configuration
106file. Command-line options override values specified in the
107configuration file.
108.Pp
109The options are as follows:
110.Bl -tag -width Ds
111.It Fl b Ar bits
112Specifies the number of bits in the server key (default 768).
113.Pp
114.It Fl d
115Debug mode. The server sends verbose debug output to the system
116log, and does not put itself in the background. The server also will
117not fork and will only process one connection. This option is only
118intended for debugging for the server.
119.It Fl f Ar configuration_file
120Specifies the name of the configuration file. The default is
121.Pa /etc/sshd_config .
122.Nm
123refuses to start if there is no configuration file.
124.It Fl g Ar login_grace_time
125Gives the grace time for clients to authenticate themselves (default
126300 seconds). If the client fails to authenticate the user within
127this many seconds, the server disconnects and exits. A value of zero
128indicates no limit.
129.It Fl h Ar host_key_file
130Specifies the file from which the host key is read (default
131.Pa /etc/ssh_host_key ) .
132This option must be given if
133.Nm
134is not run as root (as the normal
135host file is normally not readable by anyone but root).
136.It Fl i
137Specifies that
138.Nm
139is being run from inetd.
140.Nm
141is normally not run
142from inetd because it needs to generate the server key before it can
143respond to the client, and this may take tens of seconds. Clients
144would have to wait too long if the key was regenerated every time.
145However, with small key sizes (e.g. 512) using
146.Nm
147from inetd may
148be feasible.
149.It Fl k Ar key_gen_time
150Specifies how often the server key is regenerated (default 3600
151seconds, or one hour). The motivation for regenerating the key fairly
152often is that the key is not stored anywhere, and after about an hour,
153it becomes impossible to recover the key for decrypting intercepted
154communications even if the machine is cracked into or physically
155seized. A value of zero indicates that the key will never be regenerated.
156.It Fl p Ar port
157Specifies the port on which the server listens for connections
158(default 22).
159.It Fl q
160Quiet mode. Nothing is sent to the system log. Normally the beginning,
161authentication, and termination of each connection is logged.
162.It Fl Q
163Do not print an error message if RSA support is missing.
164.El
165.Sh CONFIGURATION FILE
166.Nm
167reads configuration data from
168.Pa /etc/sshd_config
169(or the file specified with
170.Fl f
171on the command line). The file
172contains keyword-value pairs, one per line. Lines starting with
173.Ql #
174and empty lines are interpreted as comments.
175.Pp
176The following keywords are possible.
177.Bl -tag -width Ds
178.It Cm AFSTokenPassing
179Specifies whether an AFS token may be forwarded to the server. Default is
180.Dq yes .
181.It Cm AllowGroups
182This keyword can be followed by a number of group names, separated
183by spaces. If specified, login is allowed only for users whose primary
184group matches one of the patterns.
185.Ql \&*
186and
187.Ql ?
188can be used as
189wildcards in the patterns. Only group names are valid, a numerical group
190id isn't recognized. By default login is allowed regardless of
191the primary group.
192.Pp
193.It Cm AllowUsers
194This keyword can be followed by a number of user names, separated
195by spaces. If specified, login is allowed only for users names that
196match one of the patterns.
197.Ql \&*
198and
199.Ql ?
200can be used as
201wildcards in the patterns. Only user names are valid, a numerical user
202id isn't recognized. By default login is allowed regardless of
203the user name.
204.Pp
205.It Cm CheckMail
206Specifies whether
207.Nm
208should check for new mail for interactive logins.
209The default is
210.Dq no .
211.It Cm DenyGroups
212This keyword can be followed by a number of group names, separated
213by spaces. Users whose primary group matches one of the patterns
214aren't allowed to log in.
215.Ql \&*
216and
217.Ql ?
218can be used as
219wildcards in the patterns. Only group names are valid, a numerical group
220id isn't recognized. By default login is allowed regardless of
221the primary group.
222.Pp
223.It Cm DenyUsers
224This keyword can be followed by a number of user names, separated
225by spaces. Login is allowed disallowed for user names that match
226one of the patterns.
227.Ql \&*
228and
229.Ql ?
230can be used as
231wildcards in the patterns. Only user names are valid, a numerical user
232id isn't recognized. By default login is allowed regardless of
233the user name.
234.Pp
235.It Cm FascistLogging
236Specifies whether to use verbose logging. Verbose logging violates
237the privacy of users and is not recommended. The argument must be
238.Dq yes
239or
240.Dq no .
241The default is
242.Dq no .
243.It Cm HostKey
244Specifies the file containing the private host key (default
245.Pa /etc/ssh_host_key ) .
246Note that
247.Nm
248does not start if this file is group/world-accessible.
249.It Cm IgnoreRhosts
250Specifies that rhosts and shosts files will not be used in
251authentication.
252.Pa /etc/hosts.equiv
253and
254.Pa /etc/shosts.equiv
255are still used. The default is
256.Dq no .
257.It Cm KeepAlive
258Specifies whether the system should send keepalive messages to the
259other side. If they are sent, death of the connection or crash of one
260of the machines will be properly noticed. However, this means that
261connections will die if the route is down temporarily, and some people
262find it annoying. On the other hand, if keepalives are not send,
263sessions may hang indefinitely on the server, leaving
264.Dq ghost
265users and consuming server resources.
266.Pp
267The default is
268.Dq yes
269(to send keepalives), and the server will notice
270if the network goes down or the client host reboots. This avoids
271infinitely hanging sessions.
272.Pp
273To disable keepalives, the value should be set to
274.Dq no
275in both the server and the client configuration files.
276.It Cm KerberosAuthentication
277Specifies whether Kerberos authentication is allowed. This can
278be in the form of a Kerberos ticket, or if
279.Cm PasswordAuthentication
280is yes, the password provided by the user will be validated through
281the Kerberos KDC. Default is
282.Dq yes .
283.It Cm KerberosOrLocalPasswd
284If set then if password authentication through Kerberos fails then
285the password will be validated via any additional local mechanism
286such as
287.Pa /etc/passwd
288or SecurID. Default is
289.Dq yes .
290.It Cm KerberosTgtPassing
291Specifies whether a Kerberos TGT may be forwarded to the server.
292Default is
293.Dq no ,
294as this only works when the Kerberos KDC is actually an AFS kaserver.
295.It Cm KerberosTicketCleanup
296Specifies whether to automatically destroy the user's ticket cache
297file on logout. Default is
298.Dq yes .
299.It Cm KeyRegenerationInterval
300The server key is automatically regenerated after this many seconds
301(if it has been used). The purpose of regeneration is to prevent
302decrypting captured sessions by later breaking into the machine and
303stealing the keys. The key is never stored anywhere. If the value is
3040, the key is never regenerated. The default is 3600
305(seconds).
306.It Cm ListenAddress
307Specifies what local address
308.Nm
309should listen on.
310The default is to listen to all local addresses.
311.It Cm LoginGraceTime
312The server disconnects after this time if the user has not
313successfully logged in. If the value is 0, there is no time limit.
314The default is 600 (seconds).
315.It Cm PasswordAuthentication
316Specifies whether password authentication is allowed.
317The default is
318.Dq yes .
319.It Cm PermitEmptyPasswords
320When password authentication is allowed, it specifies whether the
321server allows login to accounts with empty password strings. The default
322is
323.Dq yes .
324.It Cm PermitRootLogin
325Specifies whether the root can log in using
326.Xr ssh 1 .
327The argument must be
328.Dq yes ,
329.Dq without-password
330or
331.Dq no .
332The default is
333.Dq yes .
334If this options is set to
335.Dq without-password
336only password authentication is disabled for root.
337.Pp
338Root login with RSA authentication when the
339.Ar command
340option has been
341specified will be allowed regardless of the value of this setting
342(which may be useful for taking remote backups even if root login is
343normally not allowed).
344.It Cm Port
345Specifies the port number that
346.Nm
347listens on. The default is 22.
348.It Cm PrintMotd
349Specifies whether
350.Nm
351should print
352.Pa /etc/motd
353when a user logs in interactively. (On some systems it is also
354printed by the shell,
355.Pa /etc/profile ,
356or equivalent.) The default is
357.Dq yes .
358.It Cm QuietMode
359Specifies whether the system runs in quiet mode. In quiet mode,
360nothing is logged in the system log, except fatal errors. The default
361is
362.Dq no .
363.It Cm RandomSeed
364Obsolete. Random number generation uses other techniques.
365.It Cm RhostsAuthentication
366Specifies whether authentication using rhosts or /etc/hosts.equiv
367files is sufficient. Normally, this method should not be permitted
368because it is insecure.
369.Cm RhostsRSAAuthentication
370should be used
371instead, because it performs RSA-based host authentication in addition
372to normal rhosts or /etc/hosts.equiv authentication.
373The default is
374.Dq no .
375.It Cm RhostsRSAAuthentication
376Specifies whether rhosts or /etc/hosts.equiv authentication together
377with successful RSA host authentication is allowed. The default is
378.Dq yes .
379.It Cm RSAAuthentication
380Specifies whether pure RSA authentication is allowed. The default is
381.Dq yes .
382.It Cm ServerKeyBits
383Defines the number of bits in the server key. The minimum value is
384512, and the default is 768.
385.It Cm SkeyAuthentication
386Specifies whether
387.Xr skey 1
388authentication is allowed. The default is
389.Dq yes .
390Note that s/key authentication is enabled only if
391.Cm PasswordAuthentication
392is allowed, too.
393.It Cm StrictModes
394Specifies whether
395.Nm
396should check file modes and ownership of the
397user's files and home directory before accepting login. This
398is normally desirable because novices sometimes accidentally leave their
399directory or files world-writable. The default is
400.Dq yes .
401.It Cm SyslogFacility
402Gives the facility code that is used when logging messages from
403.Nm sshd .
404The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
405LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The default is AUTH.
406.It Cm UseLogin
407Specifies whether
408.Xr login 1
409is used. The default is
410.Dq no .
411.It Cm X11Forwarding
412Specifies whether X11 forwarding is permitted. The default is
413.Dq yes .
414Note that disabling X11 forwarding does not improve security in any
415way, as users can always install their own forwarders.
416.It Cm X11DisplayOffset
417Specifies the first display number available for
418.Nm sshd Ns 's
419X11 forwarding. This prevents
420.Nm
421from interfering with real X11 servers.
422.El
423.Sh LOGIN PROCESS
424When a user successfully logs in,
425.Nm
426does the following:
427.Bl -enum -offset indent
428.It
429If the login is on a tty, and no command has been specified,
430prints last login time and
431.Pa /etc/motd
432(unless prevented in the configuration file or by
433.Pa $HOME/.hushlogin ;
434see the
435.Sx FILES
436section).
437.It
438If the login is on a tty, records login time.
439.It
440Checks
441.Pa /etc/nologin ;
442if it exists, prints contents and quits
443(unless root).
444.It
445Changes to run with normal user privileges.
446.It
447Sets up basic environment.
448.It
449Reads
450.Pa $HOME/.ssh/environment
451if it exists.
452.It
453Changes to user's home directory.
454.It
455If
456.Pa $HOME/.ssh/rc
457exists, runs it; else if
458.Pa /etc/sshrc
459exists, runs
460it; otherwise runs xauth. The
461.Dq rc
462files are given the X11
463authentication protocol and cookie in standard input.
464.It
465Runs user's shell or command.
466.El
467.Sh AUTHORIZED_KEYS FILE FORMAT
468The
469.Pa $HOME/.ssh/authorized_keys
470file lists the RSA keys that are
471permitted for RSA authentication. Each line of the file contains one
472key (empty lines and lines starting with a
473.Ql #
474are ignored as
475comments). Each line consists of the following fields, separated by
476spaces: options, bits, exponent, modulus, comment. The options field
477is optional; its presence is determined by whether the line starts
478with a number or not (the option field never starts with a number).
479The bits, exponent, modulus and comment fields give the RSA key; the
480comment field is not used for anything (but may be convenient for the
481user to identify the key).
482.Pp
483Note that lines in this file are usually several hundred bytes long
484(because of the size of the RSA key modulus). You don't want to type
485them in; instead, copy the
486.Pa identity.pub
487file and edit it.
488.Pp
489The options (if present) consists of comma-separated option
490specifications. No spaces are permitted, except within double quotes.
491The following option specifications are supported:
492.Bl -tag -width Ds
493.It Cm from="pattern-list"
494Specifies that in addition to RSA authentication, the canonical name
495of the remote host must be present in the comma-separated list of
496patterns ('*' and '?' serve as wildcards). The list may also contain
497patterns negated by prefixing them with '!'; if the canonical host
498name matches a negated pattern, the key is not accepted. The purpose
499of this option is to optionally increase security: RSA authentication
500by itself does not trust the network or name servers or anything (but
501the key); however, if somebody somehow steals the key, the key
502permits an intruder to log in from anywhere in the world. This
503additional option makes using a stolen key more difficult (name
504servers and/or routers would have to be compromised in addition to
505just the key).
506.It Cm command="command"
507Specifies that the command is executed whenever this key is used for
508authentication. The command supplied by the user (if any) is ignored.
509The command is run on a pty if the connection requests a pty;
510otherwise it is run without a tty. A quote may be included in the
511command by quoting it with a backslash. This option might be useful
512to restrict certain RSA keys to perform just a specific operation. An
513example might be a key that permits remote backups but nothing
514else. Notice that the client may specify TCP/IP and/or X11
515forwardings unless they are explicitly prohibited.
516.It Cm environment="NAME=value"
517Specifies that the string is to be added to the environment when
518logging in using this key. Environment variables set this way
519override other default environment values. Multiple options of this
520type are permitted.
521.It Cm no-port-forwarding
522Forbids TCP/IP forwarding when this key is used for authentication.
523Any port forward requests by the client will return an error. This
524might be used, e.g., in connection with the
525.Cm command
526option.
527.It Cm no-X11-forwarding
528Forbids X11 forwarding when this key is used for authentication.
529Any X11 forward requests by the client will return an error.
530.It Cm no-agent-forwarding
531Forbids authentication agent forwarding when this key is used for
532authentication.
533.It Cm no-pty
534Prevents tty allocation (a request to allocate a pty will fail).
535.El
536.Ss Examples
5371024 33 12121.\|.\|.\|312314325 ylo@foo.bar
538.Pp
539from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23.\|.\|.\|2334 ylo@niksula
540.Pp
541command="dump /home",no-pty,no-port-forwarding 1024 33 23.\|.\|.\|2323 backup.hut.fi
542.Sh SSH_KNOWN_HOSTS FILE FORMAT
543The
544.Pa /etc/ssh_known_hosts
545and
546.Pa $HOME/.ssh/known_hosts
547files contain host public keys for all known hosts. The global file should
548be prepared by the admistrator (optional), and the per-user file is
549maintained automatically: whenever the user connects an unknown host
550its key is added to the per-user file.
551.Pp
552Each line in these files contains the following fields: hostnames,
553bits, exponent, modulus, comment. The fields are separated by spaces.
554.Pp
555Hostnames is a comma-separated list of patterns ('*' and '?' act as
556wildcards); each pattern in turn is matched against the canonical host
557name (when authenticating a client) or against the user-supplied
558name (when authenticating a server). A pattern may also be preceded
559by
560.Ql !
561to indicate negation: if the host name matches a negated
562pattern, it is not accepted (by that line) even if it matched another
563pattern on the line.
564.Pp
565Bits, exponent, and modulus are taken directly from the host key; they
566can be obtained, e.g., from
567.Pa /etc/ssh_host_key.pub .
568The optional comment field continues to the end of the line, and is not used.
569.Pp
570Lines starting with
571.Ql #
572and empty lines are ignored as comments.
573.Pp
574When performing host authentication, authentication is accepted if any
575matching line has the proper key. It is thus permissible (but not
576recommended) to have several lines or different host keys for the same
577names. This will inevitably happen when short forms of host names
578from different domains are put in the file. It is possible
579that the files contain conflicting information; authentication is
580accepted if valid information can be found from either file.
581.Pp
582Note that the lines in these files are typically hundreds of characters
583long, and you definitely don't want to type in the host keys by hand.
584Rather, generate them by a script
585or by taking
586.Pa /etc/ssh_host_key.pub
587and adding the host names at the front.
588.Ss Examples
589closenet,closenet.hut.fi,.\|.\|.\|,130.233.208.41 1024 37 159.\|.\|.93 closenet.hut.fi
590.Sh FILES
591.Bl -tag -width Ds
592.It Pa /etc/sshd_config
593Contains configuration data for
594.Nm sshd .
595This file should be writable by root only, but it is recommended
596(though not necessary) that it be world-readable.
597.It Pa /etc/ssh_host_key
598Contains the private part of the host key.
599This file should only be owned by root, readable only by root, and not
600accessible to others.
601Note that
602.Nm
603does not start if this file is group/world-accessible.
604.It Pa /etc/ssh_host_key.pub
605Contains the public part of the host key.
606This file should be world-readable but writable only by
607root. Its contents should match the private part. This file is not
608really used for anything; it is only provided for the convenience of
609the user so its contents can be copied to known hosts files.
610These two files are created using
611.Xr ssh-keygen 1 .
612.It Pa /var/run/sshd.pid
613Contains the process ID of the
614.Nm
615listening for connections (if there are several daemons running
616concurrently for different ports, this contains the pid of the one
617started last). The contents of this file are not sensitive; it can be
618world-readable.
619.It Pa $HOME/.ssh/authorized_keys
620Lists the RSA keys that can be used to log into the user's account.
621This file must be readable by root (which may on some machines imply
622it being world-readable if the user's home directory resides on an NFS
623volume). It is recommended that it not be accessible by others. The
624format of this file is described above.
625.It Pa /etc/ssh_known_hosts
626This file is consulted when using rhosts with RSA host
627authentication to check the public key of the host. The key must be
628listed in this file to be accepted.
629.It Pa $HOME/.ssh/known_hosts
630The client uses this file
631and
632.Pa /etc/ssh_known_hosts
633to verify that the remote host is the one we intended to
634connect. These files should be writable only by root/the owner.
635.Pa /etc/ssh_known_hosts
636should be world-readable, and
637.Pa $HOME/.ssh/known_hosts
638can but need not be world-readable.
639.It Pa /etc/nologin
640If this file exists,
641.Nm
642refuses to let anyone except root log in. The contents of the file
643are displayed to anyone trying to log in, and non-root connections are
644refused. The file should be world-readable.
645.It Pa /etc/hosts.allow, /etc/hosts.deny
646If compiled with
647.Sy LIBWRAP
648support, tcp-wrappers access controls may be defined here as described in
649.Xr hosts_access 5 .
650.It Pa $HOME/.rhosts
651This file contains host-username pairs, separated by a space, one per
652line. The given user on the corresponding host is permitted to log in
653without password. The same file is used by rlogind and rshd.
654The file must
655be writable only by the user; it is recommended that it not be
656accessible by others.
657.Pp
658If is also possible to use netgroups in the file. Either host or user
659name may be of the form +@groupname to specify all hosts or all users
660in the group.
661.It Pa $HOME/.shosts
662For ssh,
663this file is exactly the same as for
664.Pa .rhosts .
665However, this file is
666not used by rlogin and rshd, so using this permits access using SSH only.
667.Pa /etc/hosts.equiv
668This file is used during
669.Pa .rhosts
670authentication. In the
671simplest form, this file contains host names, one per line. Users on
672those hosts are permitted to log in without a password, provided they
673have the same user name on both machines. The host name may also be
674followed by a user name; such users are permitted to log in as
675.Em any
676user on this machine (except root). Additionally, the syntax
677.Dq +@group
678can be used to specify netgroups. Negated entries start with
679.Ql \&- .
680.Pp
681If the client host/user is successfully matched in this file, login is
682automatically permitted provided the client and server user names are the
683same. Additionally, successful RSA host authentication is normally
684required. This file must be writable only by root; it is recommended
685that it be world-readable.
686.Pp
687.Sy "Warning: It is almost never a good idea to use user names in"
688.Pa hosts.equiv .
689Beware that it really means that the named user(s) can log in as
690.Em anybody ,
691which includes bin, daemon, adm, and other accounts that own critical
692binaries and directories. Using a user name practically grants the
693user root access. The only valid use for user names that I can think
694of is in negative entries.
695.Pp
696Note that this warning also applies to rsh/rlogin.
697.It Pa /etc/shosts.equiv
698This is processed exactly as
699.Pa /etc/hosts.equiv .
700However, this file may be useful in environments that want to run both
701rsh/rlogin and ssh.
702.It Pa $HOME/.ssh/environment
703This file is read into the environment at login (if it exists). It
704can only contain empty lines, comment lines (that start with
705.Ql # ) ,
706and assignment lines of the form name=value. The file should be writable
707only by the user; it need not be readable by anyone else.
708.It Pa $HOME/.ssh/rc
709If this file exists, it is run with /bin/sh after reading the
710environment files but before starting the user's shell or command. If
711X11 spoofing is in use, this will receive the "proto cookie" pair in
712standard input (and
713.Ev DISPLAY
714in environment). This must call
715.Xr xauth 1
716in that case.
717.Pp
718The primary purpose of this file is to run any initialization routines
719which may be needed before the user's home directory becomes
720accessible; AFS is a particular example of such an environment.
721.Pp
722This file will probably contain some initialization code followed by
723something similar to: "if read proto cookie; then echo add $DISPLAY
724$proto $cookie | xauth -q -; fi".
725.Pp
726If this file does not exist,
727.Pa /etc/sshrc
728is run, and if that
729does not exist either, xauth is used to store the cookie.
730.Pp
731This file should be writable only by the user, and need not be
732readable by anyone else.
733.It Pa /etc/sshrc
734Like
735.Pa $HOME/.ssh/rc .
736This can be used to specify
737machine-specific login-time initializations globally. This file
738should be writable only by root, and should be world-readable.
739.Sh AUTHOR
740Tatu Ylonen <ylo@cs.hut.fi>
741.Pp
742Information about new releases, mailing lists, and other related
743issues can be found from the SSH WWW home page:
744.Pp
745.Dl http://www.cs.hut.fi/ssh.
746.Pp
747OpenSSH
748is a derivative of the original (free) ssh 1.2.12 release, but with bugs
749removed and newer features re-added. Rapidly after the 1.2.12 release,
750newer versions bore successively more restrictive licenses. This version
751of OpenSSH
752.Bl -bullet
753.It
754has all components of a restrictive nature (ie. patents, see
755.Xr ssl 8 )
756directly removed from the source code; any licensed or patented components
757are chosen from
758external libraries.
759.It
760has been updated to support ssh protocol 1.5.
761.It
762contains added support for
763.Xr kerberos 8
764authentication and ticket passing.
765.It
766supports one-time password authentication with
767.Xr skey 1 .
768.El
769.Pp
770The libraries described in
771.Xr ssl 8
772are required for proper operation.
773.Sh SEE ALSO
774.Xr rlogin 1 ,
775.Xr rsh 1 ,
776.Xr scp 1 ,
777.Xr ssh 1 ,
778.Xr ssh-add 1 ,
779.Xr ssh-agent 1 ,
780.Xr ssh-keygen 1 ,
781.Xr ssl 8