summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-01-31 21:45:53 +1100
committerDamien Miller <djm@mindrot.org>2006-01-31 21:45:53 +1100
commit99cc4a8f1e4e1ab45e41600518aa888e24b4df64 (patch)
tree2d0761cf2f541f752d6be1186812221eb0b1188f
parentddfddf1ba3f767c27b8a57d0d70648ce925609a4 (diff)
- jmc@cvs.openbsd.org 2006/01/25 09:04:34
[sshd.8] move the options description up the page, and a few additional tweaks whilst in here; ok markus
-rw-r--r--ChangeLog7
-rw-r--r--sshd.8231
2 files changed, 121 insertions, 117 deletions
diff --git a/ChangeLog b/ChangeLog
index ada3d3ae8..5ec6e615d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,11 @@
4 [ssh_config.5] 4 [ssh_config.5]
5 - word change, agreed w/ markus 5 - word change, agreed w/ markus
6 - consistency fixes 6 - consistency fixes
7 - jmc@cvs.openbsd.org 2006/01/25 09:04:34
8 [sshd.8]
9 move the options description up the page, and a few additional tweaks
10 whilst in here;
11 ok markus
7 12
820060129 1320060129
9 - (dtucker) [configure.ac opensshd.init.in] Bug #1144: Use /bin/sh for the 14 - (dtucker) [configure.ac opensshd.init.in] Bug #1144: Use /bin/sh for the
@@ -3729,4 +3734,4 @@
3729 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3734 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3730 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3735 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3731 3736
3732$Id: ChangeLog,v 1.4095 2006/01/31 10:39:03 djm Exp $ 3737$Id: ChangeLog,v 1.4096 2006/01/31 10:45:53 djm Exp $
diff --git a/sshd.8 b/sshd.8
index 241aefd43..3ca929d50 100644
--- a/sshd.8
+++ b/sshd.8
@@ -34,7 +34,7 @@
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 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. 35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36.\" 36.\"
37.\" $OpenBSD: sshd.8,v 1.211 2006/01/12 22:20:00 jmc Exp $ 37.\" $OpenBSD: sshd.8,v 1.212 2006/01/25 09:04:34 jmc Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSHD 8 39.Dt SSHD 8
40.Os 40.Os
@@ -56,16 +56,14 @@
56.Ek 56.Ek
57.Sh DESCRIPTION 57.Sh DESCRIPTION
58.Nm 58.Nm
59(SSH Daemon) is the daemon program for 59(OpenSSH Daemon) is the daemon program for
60.Xr ssh 1 . 60.Xr ssh 1 .
61Together these programs replace rlogin and rsh, and 61Together these programs replace rlogin and rsh, and
62provide secure encrypted communications between two untrusted hosts 62provide secure encrypted communications between two untrusted hosts
63over an insecure network. 63over an insecure network.
64The programs are intended to be as easy to
65install and use as possible.
66.Pp 64.Pp
67.Nm 65.Nm
68is the daemon that listens for connections from clients. 66listens for connections from clients.
69It is normally started at boot from 67It is normally started at boot from
70.Pa /etc/rc . 68.Pa /etc/rc .
71It forks a new 69It forks a new
@@ -73,122 +71,13 @@ daemon for each incoming connection.
73The forked daemons handle 71The forked daemons handle
74key exchange, encryption, authentication, command execution, 72key exchange, encryption, authentication, command execution,
75and data exchange. 73and data exchange.
76This implementation of
77.Nm
78supports both SSH protocol version 1 and 2 simultaneously.
79.Nm
80works as follows:
81.Ss SSH protocol version 1
82Each host has a host-specific RSA key
83(normally 2048 bits) used to identify the host.
84Additionally, when
85the daemon starts, it generates a server RSA key (normally 768 bits).
86This key is normally regenerated every hour if it has been used, and
87is never stored on disk.
88.Pp
89Whenever a client connects, the daemon responds with its public
90host and server keys.
91The client compares the
92RSA host key against its own database to verify that it has not changed.
93The client then generates a 256-bit random number.
94It encrypts this
95random number using both the host key and the server key, and sends
96the encrypted number to the server.
97Both sides then use this
98random number as a session key which is used to encrypt all further
99communications in the session.
100The rest of the session is encrypted
101using a conventional cipher, currently Blowfish or 3DES, with 3DES
102being used by default.
103The client selects the encryption algorithm
104to use from those offered by the server.
105.Pp
106Next, the server and the client enter an authentication dialog.
107The client tries to authenticate itself using
108.Em .rhosts
109authentication combined with RSA host
110authentication, RSA challenge-response authentication, or password
111based authentication.
112.Pp
113Regardless of the authentication type, the account is checked to
114ensure that it is accessible. An account is not accessible if it is
115locked, listed in
116.Cm DenyUsers
117or its group is listed in
118.Cm DenyGroups
119\&. The definition of a locked account is system dependant. Some platforms
120have their own account database (eg AIX) and some modify the passwd field (
121.Ql \&*LK\&*
122on Solaris and UnixWare,
123.Ql \&*
124on HP-UX, containing
125.Ql Nologin
126on Tru64,
127a leading
128.Ql \&*LOCKED\&*
129on FreeBSD and a leading
130.Ql \&!!
131on Linux). If there is a requirement to disable password authentication
132for the account while allowing still public-key, then the passwd field
133should be set to something other than these values (eg
134.Ql NP
135or
136.Ql \&*NP\&*
137).
138.Pp
139.Nm rshd ,
140.Nm rlogind ,
141and
142.Nm rexecd
143are disabled (thus completely disabling
144.Xr rlogin
145and
146.Xr rsh
147into the machine).
148.Ss SSH protocol version 2
149Version 2 works similarly:
150Each host has a host-specific key (RSA or DSA) used to identify the host.
151However, when the daemon starts, it does not generate a server key.
152Forward security is provided through a Diffie-Hellman key agreement.
153This key agreement results in a shared session key.
154.Pp
155The rest of the session is encrypted using a symmetric cipher, currently
156128-bit AES, Blowfish, 3DES, CAST128, Arcfour, 192-bit AES, or 256-bit AES.
157The client selects the encryption algorithm
158to use from those offered by the server.
159Additionally, session integrity is provided
160through a cryptographic message authentication code
161(hmac-sha1 or hmac-md5).
162.Pp
163Protocol version 2 provides a public key based
164user (PubkeyAuthentication) or
165client host (HostbasedAuthentication) authentication method,
166conventional password authentication and challenge response based methods.
167.Ss Command execution and data forwarding
168If the client successfully authenticates itself, a dialog for
169preparing the session is entered.
170At this time the client may request
171things like allocating a pseudo-tty, forwarding X11 connections,
172forwarding TCP connections, or forwarding the authentication agent
173connection over the secure channel.
174.Pp
175Finally, the client either requests a shell or execution of a command.
176The sides then enter session mode.
177In this mode, either side may send
178data at any time, and such data is forwarded to/from the shell or
179command on the server side, and the user terminal in the client side.
180.Pp
181When the user program terminates and all forwarded X11 and other
182connections have been closed, the server sends command exit status to
183the client, and both sides exit.
184.Pp 74.Pp
185.Nm 75.Nm
186can be configured using command-line options or a configuration file 76can be configured using command-line options or a configuration file
187(by default 77(by default
188.Xr sshd_config 5 ) . 78.Xr sshd_config 5 ) ;
189Command-line options override values specified in the 79command-line options override values specified in the
190configuration file. 80configuration file.
191.Pp
192.Nm 81.Nm
193rereads its configuration file when it receives a hangup signal, 82rereads its configuration file when it receives a hangup signal,
194.Dv SIGHUP , 83.Dv SIGHUP ,
@@ -338,6 +227,116 @@ USER@HOST pattern in
338or 227or
339.Cm DenyUsers . 228.Cm DenyUsers .
340.El 229.El
230.Pp
231This implementation of
232.Nm
233supports both SSH protocol version 1 and 2 simultaneously.
234.Nm
235works as follows:
236.Ss SSH protocol version 1
237Each host has a host-specific RSA key
238(normally 2048 bits) used to identify the host.
239Additionally, when
240the daemon starts, it generates a server RSA key (normally 768 bits).
241This key is normally regenerated every hour if it has been used, and
242is never stored on disk.
243.Pp
244Whenever a client connects, the daemon responds with its public
245host and server keys.
246The client compares the
247RSA host key against its own database to verify that it has not changed.
248The client then generates a 256-bit random number.
249It encrypts this
250random number using both the host key and the server key, and sends
251the encrypted number to the server.
252Both sides then use this
253random number as a session key which is used to encrypt all further
254communications in the session.
255The rest of the session is encrypted
256using a conventional cipher, currently Blowfish or 3DES, with 3DES
257being used by default.
258The client selects the encryption algorithm
259to use from those offered by the server.
260.Pp
261Next, the server and the client enter an authentication dialog.
262The client tries to authenticate itself using
263.Em rhosts
264authentication combined with RSA host
265authentication, RSA challenge-response authentication, or password
266based authentication.
267.Pp
268Regardless of the authentication type, the account is checked to
269ensure that it is accessible. An account is not accessible if it is
270locked, listed in
271.Cm DenyUsers
272or its group is listed in
273.Cm DenyGroups
274\&. The definition of a locked account is system dependant. Some platforms
275have their own account database (eg AIX) and some modify the passwd field (
276.Ql \&*LK\&*
277on Solaris and UnixWare,
278.Ql \&*
279on HP-UX, containing
280.Ql Nologin
281on Tru64,
282a leading
283.Ql \&*LOCKED\&*
284on FreeBSD and a leading
285.Ql \&!!
286on Linux). If there is a requirement to disable password authentication
287for the account while allowing still public-key, then the passwd field
288should be set to something other than these values (eg
289.Ql NP
290or
291.Ql \&*NP\&*
292).
293.Pp
294System security is not improved unless
295.Nm rshd ,
296.Nm rlogind ,
297and
298.Nm rexecd
299are disabled (thus completely disabling
300.Xr rlogin
301and
302.Xr rsh
303into the machine).
304.Ss SSH protocol version 2
305Version 2 works similarly:
306Each host has a host-specific key (RSA or DSA) used to identify the host.
307However, when the daemon starts, it does not generate a server key.
308Forward security is provided through a Diffie-Hellman key agreement.
309This key agreement results in a shared session key.
310.Pp
311The rest of the session is encrypted using a symmetric cipher, currently
312128-bit AES, Blowfish, 3DES, CAST128, Arcfour, 192-bit AES, or 256-bit AES.
313The client selects the encryption algorithm
314to use from those offered by the server.
315Additionally, session integrity is provided
316through a cryptographic message authentication code
317(hmac-sha1 or hmac-md5).
318.Pp
319Protocol version 2 provides a public key based
320user (PubkeyAuthentication) or
321client host (HostbasedAuthentication) authentication method,
322conventional password authentication and challenge response based methods.
323.Ss Command execution and data forwarding
324If the client successfully authenticates itself, a dialog for
325preparing the session is entered.
326At this time the client may request
327things like allocating a pseudo-tty, forwarding X11 connections,
328forwarding TCP connections, or forwarding the authentication agent
329connection over the secure channel.
330.Pp
331Finally, the client either requests a shell or execution of a command.
332The sides then enter session mode.
333In this mode, either side may send
334data at any time, and such data is forwarded to/from the shell or
335command on the server side, and the user terminal in the client side.
336.Pp
337When the user program terminates and all forwarded X11 and other
338connections have been closed, the server sends command exit status to
339the client, and both sides exit.
341.Sh CONFIGURATION FILE 340.Sh CONFIGURATION FILE
342.Nm 341.Nm
343reads configuration data from 342reads configuration data from