summaryrefslogtreecommitdiff
path: root/sshd.8
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.8')
-rw-r--r--sshd.885
1 files changed, 43 insertions, 42 deletions
diff --git a/sshd.8 b/sshd.8
index 0eeea6666..34413e2a7 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.199 2003/08/13 08:46:31 markus Exp $ 37.\" $OpenBSD: sshd.8,v 1.200 2003/10/08 08:27:36 jmc Exp $
38.Dd September 25, 1999 38.Dd September 25, 1999
39.Dt SSHD 8 39.Dt SSHD 8
40.Os 40.Os
@@ -44,7 +44,7 @@
44.Sh SYNOPSIS 44.Sh SYNOPSIS
45.Nm sshd 45.Nm sshd
46.Bk -words 46.Bk -words
47.Op Fl deiqtD46 47.Op Fl 46Ddeiqt
48.Op Fl b Ar bits 48.Op Fl b Ar bits
49.Op Fl f Ar config_file 49.Op Fl f Ar config_file
50.Op Fl g Ar login_grace_time 50.Op Fl g Ar login_grace_time
@@ -78,9 +78,7 @@ This implementation of
78supports both SSH protocol version 1 and 2 simultaneously. 78supports both SSH protocol version 1 and 2 simultaneously.
79.Nm 79.Nm
80works as follows: 80works as follows:
81.Pp
82.Ss SSH protocol version 1 81.Ss SSH protocol version 1
83.Pp
84Each host has a host-specific RSA key 82Each host has a host-specific RSA key
85(normally 1024 bits) used to identify the host. 83(normally 1024 bits) used to identify the host.
86Additionally, when 84Additionally, when
@@ -92,7 +90,7 @@ Whenever a client connects, the daemon responds with its public
92host and server keys. 90host and server keys.
93The client compares the 91The client compares the
94RSA host key against its own database to verify that it has not changed. 92RSA host key against its own database to verify that it has not changed.
95The client then generates a 256 bit random number. 93The client then generates a 256-bit random number.
96It encrypts this 94It encrypts this
97random number using both the host key and the server key, and sends 95random number using both the host key and the server key, and sends
98the encrypted number to the server. 96the encrypted number to the server.
@@ -107,9 +105,9 @@ to use from those offered by the server.
107.Pp 105.Pp
108Next, the server and the client enter an authentication dialog. 106Next, the server and the client enter an authentication dialog.
109The client tries to authenticate itself using 107The client tries to authenticate itself using
110.Pa .rhosts 108.Em .rhosts
111authentication, 109authentication,
112.Pa .rhosts 110.Em .rhosts
113authentication combined with RSA host 111authentication combined with RSA host
114authentication, RSA challenge-response authentication, or password 112authentication, RSA challenge-response authentication, or password
115based authentication. 113based authentication.
@@ -137,7 +135,8 @@ or
137.Ql \&*NP\&* 135.Ql \&*NP\&*
138). 136).
139.Pp 137.Pp
140Rhosts authentication is normally disabled 138.Em rhosts
139authentication is normally disabled
141because it is fundamentally insecure, but can be enabled in the server 140because it is fundamentally insecure, but can be enabled in the server
142configuration file if desired. 141configuration file if desired.
143System security is not improved unless 142System security is not improved unless
@@ -150,9 +149,7 @@ are disabled (thus completely disabling
150and 149and
151.Xr rsh 150.Xr rsh
152into the machine). 151into the machine).
153.Pp
154.Ss SSH protocol version 2 152.Ss SSH protocol version 2
155.Pp
156Version 2 works similarly: 153Version 2 works similarly:
157Each host has a host-specific key (RSA or DSA) used to identify the host. 154Each host has a host-specific key (RSA or DSA) used to identify the host.
158However, when the daemon starts, it does not generate a server key. 155However, when the daemon starts, it does not generate a server key.
@@ -160,7 +157,7 @@ Forward security is provided through a Diffie-Hellman key agreement.
160This key agreement results in a shared session key. 157This key agreement results in a shared session key.
161.Pp 158.Pp
162The rest of the session is encrypted using a symmetric cipher, currently 159The rest of the session is encrypted using a symmetric cipher, currently
163128 bit AES, Blowfish, 3DES, CAST128, Arcfour, 192 bit AES, or 256 bit AES. 160128-bit AES, Blowfish, 3DES, CAST128, Arcfour, 192-bit AES, or 256-bit AES.
164The client selects the encryption algorithm 161The client selects the encryption algorithm
165to use from those offered by the server. 162to use from those offered by the server.
166Additionally, session integrity is provided 163Additionally, session integrity is provided
@@ -171,9 +168,7 @@ Protocol version 2 provides a public key based
171user (PubkeyAuthentication) or 168user (PubkeyAuthentication) or
172client host (HostbasedAuthentication) authentication method, 169client host (HostbasedAuthentication) authentication method,
173conventional password authentication and challenge response based methods. 170conventional password authentication and challenge response based methods.
174.Pp
175.Ss Command execution and data forwarding 171.Ss Command execution and data forwarding
176.Pp
177If the client successfully authenticates itself, a dialog for 172If the client successfully authenticates itself, a dialog for
178preparing the session is entered. 173preparing the session is entered.
179At this time the client may request 174At this time the client may request
@@ -192,8 +187,9 @@ connections have been closed, the server sends command exit status to
192the client, and both sides exit. 187the client, and both sides exit.
193.Pp 188.Pp
194.Nm 189.Nm
195can be configured using command-line options or a configuration 190can be configured using command-line options or a configuration file
196file. 191(by default
192.Xr sshd_config 5 ) .
197Command-line options override values specified in the 193Command-line options override values specified in the
198configuration file. 194configuration file.
199.Pp 195.Pp
@@ -205,9 +201,23 @@ by executing itself with the name it was started as, i.e.,
205.Pp 201.Pp
206The options are as follows: 202The options are as follows:
207.Bl -tag -width Ds 203.Bl -tag -width Ds
204.It Fl 4
205Forces
206.Nm
207to use IPv4 addresses only.
208.It Fl 6
209Forces
210.Nm
211to use IPv6 addresses only.
208.It Fl b Ar bits 212.It Fl b Ar bits
209Specifies the number of bits in the ephemeral protocol version 1 213Specifies the number of bits in the ephemeral protocol version 1
210server key (default 768). 214server key (default 768).
215.It Fl D
216When this option is specified,
217.Nm
218will not detach and does not become a daemon.
219This allows easy monitoring of
220.Nm sshd .
211.It Fl d 221.It Fl d
212Debug mode. 222Debug mode.
213The server sends verbose debug output to the system 223The server sends verbose debug output to the system
@@ -267,7 +277,7 @@ be feasible.
267Specifies how often the ephemeral protocol version 1 server key is 277Specifies how often the ephemeral protocol version 1 server key is
268regenerated (default 3600 seconds, or one hour). 278regenerated (default 3600 seconds, or one hour).
269The motivation for regenerating the key fairly 279The motivation for regenerating the key fairly
270often is that the key is not stored anywhere, and after about an hour, 280often is that the key is not stored anywhere, and after about an hour
271it becomes impossible to recover the key for decrypting intercepted 281it becomes impossible to recover the key for decrypting intercepted
272communications even if the machine is cracked into or physically 282communications even if the machine is cracked into or physically
273seized. 283seized.
@@ -276,6 +286,8 @@ A value of zero indicates that the key will never be regenerated.
276Can be used to give options in the format used in the configuration file. 286Can be used to give options in the format used in the configuration file.
277This is useful for specifying options for which there is no separate 287This is useful for specifying options for which there is no separate
278command-line flag. 288command-line flag.
289For full details of the options, and their values, see
290.Xr sshd_config 5 .
279.It Fl p Ar port 291.It Fl p Ar port
280Specifies the port on which the server listens for connections 292Specifies the port on which the server listens for connections
281(default 22). 293(default 22).
@@ -325,20 +337,6 @@ USER@HOST pattern in
325.Cm AllowUsers 337.Cm AllowUsers
326or 338or
327.Cm DenyUsers . 339.Cm DenyUsers .
328.It Fl D
329When this option is specified
330.Nm
331will not detach and does not become a daemon.
332This allows easy monitoring of
333.Nm sshd .
334.It Fl 4
335Forces
336.Nm
337to use IPv4 addresses only.
338.It Fl 6
339Forces
340.Nm
341to use IPv6 addresses only.
342.El 340.El
343.Sh CONFIGURATION FILE 341.Sh CONFIGURATION FILE
344.Nm 342.Nm
@@ -375,9 +373,9 @@ Changes to run with normal user privileges.
375.It 373.It
376Sets up basic environment. 374Sets up basic environment.
377.It 375.It
378Reads 376Reads the file
379.Pa $HOME/.ssh/environment 377.Pa $HOME/.ssh/environment ,
380if it exists and users are allowed to change their environment. 378if it exists, and users are allowed to change their environment.
381See the 379See the
382.Cm PermitUserEnvironment 380.Cm PermitUserEnvironment
383option in 381option in
@@ -516,7 +514,7 @@ Limit local
516port forwarding such that it may only connect to the specified host and 514port forwarding such that it may only connect to the specified host and
517port. 515port.
518IPv6 addresses can be specified with an alternative syntax: 516IPv6 addresses can be specified with an alternative syntax:
519.Ar host/port . 517.Ar host Ns / Ns Ar port .
520Multiple 518Multiple
521.Cm permitopen 519.Cm permitopen
522options may be applied separated by commas. 520options may be applied separated by commas.
@@ -524,13 +522,13 @@ No pattern matching is performed on the specified hostnames,
524they must be literal domains or addresses. 522they must be literal domains or addresses.
525.El 523.El
526.Ss Examples 524.Ss Examples
5271024 33 12121.\|.\|.\|312314325 ylo@foo.bar 5251024 33 12121...312314325 ylo@foo.bar
528.Pp 526.Pp
529from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23.\|.\|.\|2334 ylo@niksula 527from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23...2334 ylo@niksula
530.Pp 528.Pp
531command="dump /home",no-pty,no-port-forwarding 1024 33 23.\|.\|.\|2323 backup.hut.fi 529command="dump /home",no-pty,no-port-forwarding 1024 33 23...2323 backup.hut.fi
532.Pp 530.Pp
533permitopen="10.2.1.55:80",permitopen="10.2.1.56:25" 1024 33 23.\|.\|.\|2323 531permitopen="10.2.1.55:80",permitopen="10.2.1.56:25" 1024 33 23...2323
534.Sh SSH_KNOWN_HOSTS FILE FORMAT 532.Sh SSH_KNOWN_HOSTS FILE FORMAT
535The 533The
536.Pa /etc/ssh/ssh_known_hosts 534.Pa /etc/ssh/ssh_known_hosts
@@ -588,7 +586,7 @@ or by taking
588and adding the host names at the front. 586and adding the host names at the front.
589.Ss Examples 587.Ss Examples
590.Bd -literal 588.Bd -literal
591closenet,.\|.\|.\|,130.233.208.41 1024 37 159.\|.\|.93 closenet.hut.fi 589closenet,...,130.233.208.41 1024 37 159...93 closenet.hut.fi
592cvs.openbsd.org,199.185.137.3 ssh-rsa AAAA1234.....= 590cvs.openbsd.org,199.185.137.3 ssh-rsa AAAA1234.....=
593.Ed 591.Ed
594.Sh FILES 592.Sh FILES
@@ -647,7 +645,7 @@ and/or
647.Pa id_rsa.pub 645.Pa id_rsa.pub
648files into this file, as described in 646files into this file, as described in
649.Xr ssh-keygen 1 . 647.Xr ssh-keygen 1 .
650.It Pa "/etc/ssh/ssh_known_hosts" and "$HOME/.ssh/known_hosts" 648.It Pa "/etc/ssh/ssh_known_hosts", "$HOME/.ssh/known_hosts"
651These files are consulted when using rhosts with RSA host 649These files are consulted when using rhosts with RSA host
652authentication or protocol version 2 hostbased authentication 650authentication or protocol version 2 hostbased authentication
653to check the public key of the host. 651to check the public key of the host.
@@ -681,7 +679,7 @@ The file must
681be writable only by the user; it is recommended that it not be 679be writable only by the user; it is recommended that it not be
682accessible by others. 680accessible by others.
683.Pp 681.Pp
684If is also possible to use netgroups in the file. 682It is also possible to use netgroups in the file.
685Either host or user 683Either host or user
686name may be of the form +@groupname to specify all hosts or all users 684name may be of the form +@groupname to specify all hosts or all users
687in the group. 685in the group.
@@ -693,7 +691,7 @@ However, this file is
693not used by rlogin and rshd, so using this permits access using SSH only. 691not used by rlogin and rshd, so using this permits access using SSH only.
694.It Pa /etc/hosts.equiv 692.It Pa /etc/hosts.equiv
695This file is used during 693This file is used during
696.Pa .rhosts 694.Em rhosts
697authentication. 695authentication.
698In the simplest form, this file contains host names, one per line. 696In the simplest form, this file contains host names, one per line.
699Users on 697Users on
@@ -800,9 +798,12 @@ This file should be writable only by root, and should be world-readable.
800.Xr ssh-add 1 , 798.Xr ssh-add 1 ,
801.Xr ssh-agent 1 , 799.Xr ssh-agent 1 ,
802.Xr ssh-keygen 1 , 800.Xr ssh-keygen 1 ,
801.Xr chroot 2 ,
802.Xr hosts_access 5 ,
803.Xr login.conf 5 , 803.Xr login.conf 5 ,
804.Xr moduli 5 , 804.Xr moduli 5 ,
805.Xr sshd_config 5 , 805.Xr sshd_config 5 ,
806.Xr inetd 8 ,
806.Xr sftp-server 8 807.Xr sftp-server 8
807.Rs 808.Rs
808.%A T. Ylonen 809.%A T. Ylonen