summaryrefslogtreecommitdiff
path: root/sshd.8
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.8')
-rw-r--r--sshd.877
1 files changed, 67 insertions, 10 deletions
diff --git a/sshd.8 b/sshd.8
index 111d491d9..5f1966005 100644
--- a/sshd.8
+++ b/sshd.8
@@ -34,8 +34,8 @@
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.248 2009/03/26 08:38:39 sobrado Exp $ 37.\" $OpenBSD: sshd.8,v 1.255 2010/03/05 06:50:35 jmc Exp $
38.Dd $Mdocdate: March 26 2009 $ 38.Dd $Mdocdate: March 5 2010 $
39.Dt SSHD 8 39.Dt SSHD 8
40.Os 40.Os
41.Sh NAME 41.Sh NAME
@@ -47,6 +47,7 @@
47.Op Fl 46DdeiqTt 47.Op Fl 46DdeiqTt
48.Op Fl b Ar bits 48.Op Fl b Ar bits
49.Op Fl C Ar connection_spec 49.Op Fl C Ar connection_spec
50.Op Fl c Ar host_certificate_file
50.Op Fl f Ar config_file 51.Op Fl f Ar config_file
51.Op Fl g Ar login_grace_time 52.Op Fl g Ar login_grace_time
52.Op Fl h Ar host_key_file 53.Op Fl h Ar host_key_file
@@ -119,6 +120,15 @@ and
119All are required and may be supplied in any order, either with multiple 120All are required and may be supplied in any order, either with multiple
120.Fl C 121.Fl C
121options or as a comma-separated list. 122options or as a comma-separated list.
123.It Fl c Ar host_certificate_file
124Specifies a path to a certificate file to identify
125.Nm
126during key exchange.
127The certificate file must match a host key file specified using the
128.Fl h
129option or the
130.Cm HostKey
131configuration directive.
122.It Fl D 132.It Fl D
123When this option is specified, 133When this option is specified,
124.Nm 134.Nm
@@ -127,8 +137,8 @@ This allows easy monitoring of
127.Nm sshd . 137.Nm sshd .
128.It Fl d 138.It Fl d
129Debug mode. 139Debug mode.
130The server sends verbose debug output to the system 140The server sends verbose debug output to standard error,
131log, and does not put itself in the background. 141and does not put itself in the background.
132The server also will not fork and will only process one connection. 142The server also will not fork and will only process one connection.
133This option is only intended for debugging for the server. 143This option is only intended for debugging for the server.
134Multiple 144Multiple
@@ -260,7 +270,7 @@ or
260.El 270.El
261.Sh AUTHENTICATION 271.Sh AUTHENTICATION
262The OpenSSH SSH daemon supports SSH protocols 1 and 2. 272The OpenSSH SSH daemon supports SSH protocols 1 and 2.
263Both protocols are supported by default, 273The default is to use protocol 2 only,
264though this can be changed via the 274though this can be changed via the
265.Cm Protocol 275.Cm Protocol
266option in 276option in
@@ -498,6 +508,13 @@ No spaces are permitted, except within double quotes.
498The following option specifications are supported (note 508The following option specifications are supported (note
499that option keywords are case-insensitive): 509that option keywords are case-insensitive):
500.Bl -tag -width Ds 510.Bl -tag -width Ds
511.It Cm cert-authority
512Specifies that the listed key is a certification authority (CA) that is
513trusted to validate signed certificates for user authentication.
514.Pp
515Certificates may encode access restrictions similar to these key options.
516If both certificate restrictions and key options are present, the most
517restrictive union of the two is applied.
501.It Cm command="command" 518.It Cm command="command"
502Specifies that the command is executed whenever this key is used for 519Specifies that the command is executed whenever this key is used for
503authentication. 520authentication.
@@ -517,6 +534,10 @@ The command originally supplied by the client is available in the
517.Ev SSH_ORIGINAL_COMMAND 534.Ev SSH_ORIGINAL_COMMAND
518environment variable. 535environment variable.
519Note that this option applies to shell, command or subsystem execution. 536Note that this option applies to shell, command or subsystem execution.
537Also note that this command may be superseded by either a
538.Xr sshd_config 5
539.Cm ForceCommand
540directive or a command embedded in a certificate.
520.It Cm environment="NAME=value" 541.It Cm environment="NAME=value"
521Specifies that the string is to be added to the environment when 542Specifies that the string is to be added to the environment when
522logging in using this key. 543logging in using this key.
@@ -613,10 +634,19 @@ be prepared by the administrator (optional), and the per-user file is
613maintained automatically: whenever the user connects from an unknown host, 634maintained automatically: whenever the user connects from an unknown host,
614its key is added to the per-user file. 635its key is added to the per-user file.
615.Pp 636.Pp
616Each line in these files contains the following fields: hostnames, 637Each line in these files contains the following fields: markers (optional),
617bits, exponent, modulus, comment. 638hostnames, bits, exponent, modulus, comment.
618The fields are separated by spaces. 639The fields are separated by spaces.
619.Pp 640.Pp
641The marker is optional, but if it is present then it must be one of
642.Dq @cert-authority ,
643to indicate that the line contains a certification authority (CA) key,
644or
645.Dq @revoked ,
646to indicate that the key contained on the line is revoked and must not ever
647be accepted.
648Only one marker should be used on a key line.
649.Pp
620Hostnames is a comma-separated list of patterns 650Hostnames is a comma-separated list of patterns
621.Pf ( Ql * 651.Pf ( Ql *
622and 652and
@@ -656,8 +686,25 @@ Lines starting with
656and empty lines are ignored as comments. 686and empty lines are ignored as comments.
657.Pp 687.Pp
658When performing host authentication, authentication is accepted if any 688When performing host authentication, authentication is accepted if any
659matching line has the proper key. 689matching line has the proper key; either one that matches exactly or,
660It is thus permissible (but not 690if the server has presented a certificate for authentication, the key
691of the certification authority that signed the certificate.
692For a key to be trusted as a certification authority, it must use the
693.Dq @cert-authority
694marker described above.
695.Pp
696The known hosts file also provides a facility to mark keys as revoked,
697for example when it is known that the associated private key has been
698stolen.
699Revoked keys are specified by including the
700.Dq @revoked
701marker at the beginning of the key line, and are never accepted for
702authentication or as certification authorities, but instead will
703produce a warning from
704.Xr ssh 1
705when they are encountered.
706.Pp
707It is permissible (but not
661recommended) to have several lines or different host keys for the same 708recommended) to have several lines or different host keys for the same
662names. 709names.
663This will inevitably happen when short forms of host names 710This will inevitably happen when short forms of host names
@@ -668,10 +715,16 @@ accepted if valid information can be found from either file.
668.Pp 715.Pp
669Note that the lines in these files are typically hundreds of characters 716Note that the lines in these files are typically hundreds of characters
670long, and you definitely don't want to type in the host keys by hand. 717long, and you definitely don't want to type in the host keys by hand.
671Rather, generate them by a script 718Rather, generate them by a script,
719.Xr ssh-keyscan 1
672or by taking 720or by taking
673.Pa /etc/ssh/ssh_host_key.pub 721.Pa /etc/ssh/ssh_host_key.pub
674and adding the host names at the front. 722and adding the host names at the front.
723.Xr ssh-keygen 1
724also offers some basic automated editing for
725.Pa ~/.ssh/known_hosts
726including removing hosts matching a host name and converting all host
727names to their hashed representations.
675.Pp 728.Pp
676An example ssh_known_hosts file: 729An example ssh_known_hosts file:
677.Bd -literal -offset 3n 730.Bd -literal -offset 3n
@@ -681,6 +734,10 @@ cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
681# A hashed hostname 734# A hashed hostname
682|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa 735|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
683AAAA1234.....= 736AAAA1234.....=
737# A revoked key
738@revoked * ssh-rsa AAAAB5W...
739# A CA key, accepted for any host in *.mydomain.com or *.mydomain.org
740@cert-authority *.mydomain.org,*.mydomain.com ssh-rsa AAAAB5W...
684.Ed 741.Ed
685.Sh FILES 742.Sh FILES
686.Bl -tag -width Ds -compact 743.Bl -tag -width Ds -compact