summaryrefslogtreecommitdiff
path: root/sshd.8
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-03-05 10:42:05 +1100
committerDamien Miller <djm@mindrot.org>2010-03-05 10:42:05 +1100
commita7dab8bfe571e6ee0b53e0852336f8a758b95c61 (patch)
treeb616b88ee7b06a86f4bc6b37caa9674e2ff74850 /sshd.8
parentc6db99ec14f511d8ee5efb3c1fee42ab1ab61c8e (diff)
- djm@cvs.openbsd.org 2010/03/04 23:19:29
[ssh.1 sshd.8] move section on CA and revoked keys from ssh.1 to sshd.8's known hosts format section and rework it a bit; requested by jmc@
Diffstat (limited to 'sshd.8')
-rw-r--r--sshd.850
1 files changed, 43 insertions, 7 deletions
diff --git a/sshd.8 b/sshd.8
index d31538176..577d19940 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.253 2010/03/03 22:49:50 djm Exp $ 37.\" $OpenBSD: sshd.8,v 1.254 2010/03/04 23:19:29 djm Exp $
38.Dd $Mdocdate: March 3 2010 $ 38.Dd $Mdocdate: March 4 2010 $
39.Dt SSHD 8 39.Dt SSHD 8
40.Os 40.Os
41.Sh NAME 41.Sh NAME
@@ -634,10 +634,19 @@ be prepared by the administrator (optional), and the per-user file is
634maintained automatically: whenever the user connects from an unknown host, 634maintained automatically: whenever the user connects from an unknown host,
635its key is added to the per-user file. 635its key is added to the per-user file.
636.Pp 636.Pp
637Each line in these files contains the following fields: hostnames, 637Each line in these files contains the following fields: markers (optional),
638bits, exponent, modulus, comment. 638hostnames, bits, exponent, modulus, comment.
639The fields are separated by spaces. 639The fields are separated by spaces.
640.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
641Hostnames is a comma-separated list of patterns 650Hostnames is a comma-separated list of patterns
642.Pf ( Ql * 651.Pf ( Ql *
643and 652and
@@ -677,8 +686,25 @@ Lines starting with
677and empty lines are ignored as comments. 686and empty lines are ignored as comments.
678.Pp 687.Pp
679When performing host authentication, authentication is accepted if any 688When performing host authentication, authentication is accepted if any
680matching line has the proper key. 689matching line has the proper key; either one that matches exactly or,
681It 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
682recommended) to have several lines or different host keys for the same 708recommended) to have several lines or different host keys for the same
683names. 709names.
684This will inevitably happen when short forms of host names 710This will inevitably happen when short forms of host names
@@ -689,10 +715,16 @@ accepted if valid information can be found from either file.
689.Pp 715.Pp
690Note that the lines in these files are typically hundreds of characters 716Note that the lines in these files are typically hundreds of characters
691long, 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.
692Rather, generate them by a script 718Rather, generate them by a script,
719.Xr ssh-keyscan 1
693or by taking 720or by taking
694.Pa /etc/ssh/ssh_host_key.pub 721.Pa /etc/ssh/ssh_host_key.pub
695and 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.
696.Pp 728.Pp
697An example ssh_known_hosts file: 729An example ssh_known_hosts file:
698.Bd -literal -offset 3n 730.Bd -literal -offset 3n
@@ -702,6 +734,10 @@ cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
702# A hashed hostname 734# A hashed hostname
703|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa 735|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa
704AAAA1234.....= 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...
705.Ed 741.Ed
706.Sh FILES 742.Sh FILES
707.Bl -tag -width Ds -compact 743.Bl -tag -width Ds -compact