summaryrefslogtreecommitdiff
path: root/sshd.8
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.8')
-rw-r--r--sshd.8104
1 files changed, 91 insertions, 13 deletions
diff --git a/sshd.8 b/sshd.8
index 85da7c4a1..78f4ea10f 100644
--- a/sshd.8
+++ b/sshd.8
@@ -9,7 +9,7 @@
9.\" 9.\"
10.\" Created: Sat Apr 22 21:55:14 1995 ylo 10.\" Created: Sat Apr 22 21:55:14 1995 ylo
11.\" 11.\"
12.\" $Id: sshd.8,v 1.20 2000/05/01 23:23:46 damien Exp $ 12.\" $Id: sshd.8,v 1.21 2000/05/07 02:03:20 damien Exp $
13.\" 13.\"
14.Dd September 25, 1999 14.Dd September 25, 1999
15.Dt SSHD 8 15.Dt SSHD 8
@@ -46,9 +46,14 @@ daemon for each incoming connection.
46The forked daemons handle 46The forked daemons handle
47key exchange, encryption, authentication, command execution, 47key exchange, encryption, authentication, command execution,
48and data exchange. 48and data exchange.
49.Pp 49This implementation of
50.Nm
51supports both SSH protocol version 1 and 2 simultaneously.
50.Nm 52.Nm
51works as follows. 53works as follows.
54.Pp
55.Ss SSH protocol version 1
56.Pp
52Each host has a host-specific RSA key 57Each host has a host-specific RSA key
53(normally 1024 bits) used to identify the host. 58(normally 1024 bits) used to identify the host.
54Additionally, when 59Additionally, when
@@ -59,7 +64,7 @@ is never stored on disk.
59Whenever a client connects the daemon responds with its public 64Whenever a client connects the daemon responds with its public
60host and server keys. 65host and server keys.
61The client compares the 66The client compares the
62host key against its own database to verify that it has not changed. 67RSA host key against its own database to verify that it has not changed.
63The client then generates a 256 bit random number. 68The client then generates a 256 bit random number.
64It encrypts this 69It encrypts this
65random number using both the host key and the server key, and sends 70random number using both the host key and the server key, and sends
@@ -97,6 +102,28 @@ and
97.Xr rsh 1 102.Xr rsh 1
98into the machine). 103into the machine).
99.Pp 104.Pp
105.Ss SSH protocol version 2
106.Pp
107Version 2 works similar:
108Each host has a host-specific DSA key used to identify the host.
109However, when the daemon starts, it does not generate a server key.
110Forward security is provided through a Diffie-Hellman key agreement.
111This key agreement results in a shared session key.
112The rest of the session is encrypted
113using a symmetric cipher, currently
114Blowfish, 3DES or CAST128 in CBC mode or Arcfour.
115The client selects the encryption algorithm
116to use from those offered by the server.
117Additionally, session integrity is provided
118through a crytographic message authentication code
119(hmac-sha1 or hmac-md5).
120.Pp
121Protocol version 2 provides a public key based
122user authentication method (DSAAuthentication)
123and conventional password authentication.
124.Pp
125.Ss Command execution and data forwarding
126.Pp
100If the client successfully authenticates itself, a dialog for 127If the client successfully authenticates itself, a dialog for
101preparing the session is entered. 128preparing the session is entered.
102At this time the client may request 129At this time the client may request
@@ -148,7 +175,7 @@ If the client fails to authenticate the user within
148this many seconds, the server disconnects and exits. 175this many seconds, the server disconnects and exits.
149A value of zero indicates no limit. 176A value of zero indicates no limit.
150.It Fl h Ar host_key_file 177.It Fl h Ar host_key_file
151Specifies the file from which the host key is read (default 178Specifies the file from which the RSA host key is read (default
152.Pa /etc/ssh_host_key ) . 179.Pa /etc/ssh_host_key ) .
153This option must be given if 180This option must be given if
154.Nm 181.Nm
@@ -280,12 +307,34 @@ and
280can be used as wildcards in the patterns. 307can be used as wildcards in the patterns.
281Only user names are valid, a numerical user ID isn't recognized. 308Only user names are valid, a numerical user ID isn't recognized.
282By default login is allowed regardless of the user name. 309By default login is allowed regardless of the user name.
310.It Cm DSAAuthentication
311Specifies whether DSA authentication is allowed.
312The default is
313.Dq yes .
314Note that this option applies to protocol version 2 only.
315.It Cm GatewayPorts
316Specifies whether remote hosts are allowed to connect to ports
317forwarded for the client.
318The argument must be
319.Dq yes
320or
321.Dq no .
322The default is
323.Dq no .
324.It Cm HostDsaKey
325Specifies the file containing the private DSA host key (default
326.Pa /etc/ssh_host_dsa_key )
327used by SSH protocol 2.0.
328Note that
329.Nm
330disables protcol 2.0 if this file is group/world-accessible.
283.It Cm HostKey 331.It Cm HostKey
284Specifies the file containing the private host key (default 332Specifies the file containing the private RSA host key (default
285.Pa /etc/ssh_host_key ) . 333.Pa /etc/ssh_host_key )
334used by SSH protocols 1.3 and 1.5.
286Note that 335Note that
287.Nm 336.Nm
288does not start if this file is group/world-accessible. 337disables protcols 1.3 and 1.5 if this file is group/world-accessible.
289.It Cm IgnoreRhosts 338.It Cm IgnoreRhosts
290Specifies that 339Specifies that
291.Pa .rhosts 340.Pa .rhosts
@@ -390,6 +439,7 @@ and is not recommended.
390Specifies whether password authentication is allowed. 439Specifies whether password authentication is allowed.
391The default is 440The default is
392.Dq yes . 441.Dq yes .
442Note that this option applies to both protocol version 1 and 2.
393.It Cm PermitEmptyPasswords 443.It Cm PermitEmptyPasswords
394When password authentication is allowed, it specifies whether the 444When password authentication is allowed, it specifies whether the
395server allows login to accounts with empty password strings. 445server allows login to accounts with empty password strings.
@@ -471,6 +521,7 @@ The default is
471Specifies whether pure RSA authentication is allowed. 521Specifies whether pure RSA authentication is allowed.
472The default is 522The default is
473.Dq yes . 523.Dq yes .
524Note that this option applies to protocol version 1 only.
474.It Cm ServerKeyBits 525.It Cm ServerKeyBits
475Defines the number of bits in the server key. 526Defines the number of bits in the server key.
476The minimum value is 512, and the default is 768. 527The minimum value is 512, and the default is 768.
@@ -568,7 +619,11 @@ Runs user's shell or command.
568The 619The
569.Pa $HOME/.ssh/authorized_keys 620.Pa $HOME/.ssh/authorized_keys
570file lists the RSA keys that are 621file lists the RSA keys that are
571permitted for RSA authentication. 622permitted for RSA authentication in SSH protocols 1.3 and 1.5
623Similarily, the
624.Pa $HOME/.ssh/authorized_keys2
625file lists the DSA keys that are
626permitted for DSA authentication in SSH protocol 2.0.
572Each line of the file contains one 627Each line of the file contains one
573key (empty lines and lines starting with a 628key (empty lines and lines starting with a
574.Ql # 629.Ql #
@@ -655,9 +710,11 @@ from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23.\|.\|.\|2334 ylo@niksula
655command="dump /home",no-pty,no-port-forwarding 1024 33 23.\|.\|.\|2323 backup.hut.fi 710command="dump /home",no-pty,no-port-forwarding 1024 33 23.\|.\|.\|2323 backup.hut.fi
656.Sh SSH_KNOWN_HOSTS FILE FORMAT 711.Sh SSH_KNOWN_HOSTS FILE FORMAT
657The 712The
658.Pa /etc/ssh_known_hosts 713.Pa /etc/ssh_known_hosts ,
714.Pa /etc/ssh_known_hosts2 ,
715.Pa $HOME/.ssh/known_hosts ,
659and 716and
660.Pa $HOME/.ssh/known_hosts 717.Pa $HOME/.ssh/known_hosts2
661files contain host public keys for all known hosts. 718files contain host public keys for all known hosts.
662The global file should 719The global file should
663be prepared by the administrator (optional), and the per-user file is 720be prepared by the administrator (optional), and the per-user file is
@@ -678,7 +735,7 @@ to indicate negation: if the host name matches a negated
678pattern, it is not accepted (by that line) even if it matched another 735pattern, it is not accepted (by that line) even if it matched another
679pattern on the line. 736pattern on the line.
680.Pp 737.Pp
681Bits, exponent, and modulus are taken directly from the host key; they 738Bits, exponent, and modulus are taken directly from the RSA host key; they
682can be obtained, e.g., from 739can be obtained, e.g., from
683.Pa /etc/ssh_host_key.pub . 740.Pa /etc/ssh_host_key.pub .
684The optional comment field continues to the end of the line, and is not used. 741The optional comment field continues to the end of the line, and is not used.
@@ -744,6 +801,21 @@ it being world-readable if the user's home directory resides on an NFS
744volume). 801volume).
745It is recommended that it not be accessible by others. 802It is recommended that it not be accessible by others.
746The format of this file is described above. 803The format of this file is described above.
804Users will place the contents of their
805.Pa identity.pub
806files into this file, as described in
807.Xr ssh-keygen 1 .
808.It Pa $HOME/.ssh/authorized_keys2
809Lists the DSA keys that can be used to log into the user's account.
810This file must be readable by root (which may on some machines imply
811it being world-readable if the user's home directory resides on an NFS
812volume).
813It is recommended that it not be accessible by others.
814The format of this file is described above.
815Users will place the contents of their
816.Pa id_dsa.pub
817files into this file, as described in
818.Xr ssh-keygen 1 .
747.It Pa "/etc/ssh_known_hosts" and "$HOME/.ssh/known_hosts" 819.It Pa "/etc/ssh_known_hosts" and "$HOME/.ssh/known_hosts"
748These files are consulted when using rhosts with RSA host 820These files are consulted when using rhosts with RSA host
749authentication to check the public key of the host. 821authentication to check the public key of the host.
@@ -875,6 +947,7 @@ but with bugs removed and newer features re-added.
875Rapidly after the 947Rapidly after the
8761.2.12 release, newer versions of the original ssh bore successively 9481.2.12 release, newer versions of the original ssh bore successively
877more restrictive licenses, and thus demand for a free version was born. 949more restrictive licenses, and thus demand for a free version was born.
950.Pp
878This version of OpenSSH 951This version of OpenSSH
879.Bl -bullet 952.Bl -bullet
880.It 953.It
@@ -883,8 +956,8 @@ directly removed from the source code; any licensed or patented components
883are chosen from 956are chosen from
884external libraries. 957external libraries.
885.It 958.It
886has been updated to support ssh protocol 1.5, making it compatible with 959has been updated to support SSH protocol 1.5 and 2, making it compatible with
887all other ssh protocol 1 clients and servers. 960all other SSH clients and servers.
888.It 961.It
889contains added support for 962contains added support for
890.Xr kerberos 8 963.Xr kerberos 8
@@ -893,6 +966,11 @@ authentication and ticket passing.
893supports one-time password authentication with 966supports one-time password authentication with
894.Xr skey 1 . 967.Xr skey 1 .
895.El 968.El
969.Pp
970OpenSSH has been created by Aaron Campbell, Bob Beck, Markus Friedl,
971Niels Provos, Theo de Raadt, and Dug Song.
972.Pp
973The support for SSH protocol 2 was written by Markus Friedl.
896.Sh SEE ALSO 974.Sh SEE ALSO
897.Xr scp 1 , 975.Xr scp 1 ,
898.Xr ssh 1 , 976.Xr ssh 1 ,