summaryrefslogtreecommitdiff
path: root/ssh-keygen.1
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2010-08-23 22:56:08 +0100
committerColin Watson <cjwatson@debian.org>2010-08-23 22:56:08 +0100
commit31e30b835fd9695d3b6647cab4867001b092e28f (patch)
tree138e715c25661825457c7280cd66e3f4853d474c /ssh-keygen.1
parent78eedc2c60ff4718200f9271d8ee4f437da3a0c5 (diff)
parent43094ebf14c9b16f1ea398bc5b65a7335e947288 (diff)
merge 5.6p1
Diffstat (limited to 'ssh-keygen.1')
-rw-r--r--ssh-keygen.189
1 files changed, 65 insertions, 24 deletions
diff --git a/ssh-keygen.1 b/ssh-keygen.1
index 3e03a9bd0..9acd8f8c9 100644
--- a/ssh-keygen.1
+++ b/ssh-keygen.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keygen.1,v 1.92 2010/03/13 23:38:13 jmc Exp $ 1.\" $OpenBSD: ssh-keygen.1,v 1.98 2010/08/04 06:07:11 djm Exp $
2.\" 2.\"
3.\" -*- nroff -*- 3.\" -*- nroff -*-
4.\" 4.\"
@@ -37,15 +37,15 @@
37.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 37.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
38.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39.\" 39.\"
40.Dd $Mdocdate: March 13 2010 $ 40.Dd $Mdocdate: August 4 2010 $
41.Dt SSH-KEYGEN 1 41.Dt SSH-KEYGEN 1
42.Os 42.Os
43.Sh NAME 43.Sh NAME
44.Nm ssh-keygen 44.Nm ssh-keygen
45.Nd authentication key generation, management and conversion 45.Nd authentication key generation, management and conversion
46.Sh SYNOPSIS 46.Sh SYNOPSIS
47.Nm ssh-keygen
48.Bk -words 47.Bk -words
48.Nm ssh-keygen
49.Op Fl q 49.Op Fl q
50.Op Fl b Ar bits 50.Op Fl b Ar bits
51.Fl t Ar type 51.Fl t Ar type
@@ -59,9 +59,11 @@
59.Op Fl f Ar keyfile 59.Op Fl f Ar keyfile
60.Nm ssh-keygen 60.Nm ssh-keygen
61.Fl i 61.Fl i
62.Op Fl m Ar key_format
62.Op Fl f Ar input_keyfile 63.Op Fl f Ar input_keyfile
63.Nm ssh-keygen 64.Nm ssh-keygen
64.Fl e 65.Fl e
66.Op Fl m Ar key_format
65.Op Fl f Ar input_keyfile 67.Op Fl f Ar input_keyfile
66.Nm ssh-keygen 68.Nm ssh-keygen
67.Fl y 69.Fl y
@@ -110,8 +112,9 @@
110.Fl I Ar certificate_identity 112.Fl I Ar certificate_identity
111.Op Fl h 113.Op Fl h
112.Op Fl n Ar principals 114.Op Fl n Ar principals
113.Op Fl O Ar constraint 115.Op Fl O Ar option
114.Op Fl V Ar validity_interval 116.Op Fl V Ar validity_interval
117.Op Fl z Ar serial_number
115.Ar 118.Ar
116.Nm ssh-keygen 119.Nm ssh-keygen
117.Fl L 120.Fl L
@@ -212,13 +215,20 @@ the passphrase if the key has one, and for the new comment.
212.It Fl D Ar pkcs11 215.It Fl D Ar pkcs11
213Download the RSA public keys provided by the PKCS#11 shared library 216Download the RSA public keys provided by the PKCS#11 shared library
214.Ar pkcs11 . 217.Ar pkcs11 .
218When used in combination with
219.Fl s ,
220this option indicates that a CA key resides in a PKCS#11 token (see the
221.Sx CERTIFICATES
222section for details).
215.It Fl e 223.It Fl e
216This option will read a private or public OpenSSH key file and 224This option will read a private or public OpenSSH key file and
217print the key in 225print to stdout the key in one of the formats specified by the
218RFC 4716 SSH Public Key File Format 226.Fl m
219to stdout. 227option.
220This option allows exporting keys for use by several commercial 228The default export format is
221SSH implementations. 229.Dq RFC4716 .
230This option allows exporting OpenSSH keys for use by other programs, including
231several commercial SSH implementations.
222.It Fl F Ar hostname 232.It Fl F Ar hostname
223Search for the specified 233Search for the specified
224.Ar hostname 234.Ar hostname
@@ -269,13 +279,14 @@ Please see the
269section for details. 279section for details.
270.It Fl i 280.It Fl i
271This option will read an unencrypted private (or public) key file 281This option will read an unencrypted private (or public) key file
272in SSH2-compatible format and print an OpenSSH compatible private 282in the format specified by the
283.Fl m
284option and print an OpenSSH compatible private
273(or public) key to stdout. 285(or public) key to stdout.
274.Nm 286This option allows importing keys from other software, including several
275also reads the 287commercial SSH implementations.
276RFC 4716 SSH Public Key File Format. 288The default import format is
277This option allows importing keys from several commercial 289.Dq RFC4716 .
278SSH implementations.
279.It Fl L 290.It Fl L
280Prints the contents of a certificate. 291Prints the contents of a certificate.
281.It Fl l 292.It Fl l
@@ -290,6 +301,22 @@ an ASCII art representation of the key is supplied with the fingerprint.
290.It Fl M Ar memory 301.It Fl M Ar memory
291Specify the amount of memory to use (in megabytes) when generating 302Specify the amount of memory to use (in megabytes) when generating
292candidate moduli for DH-GEX. 303candidate moduli for DH-GEX.
304.It Fl m Ar key_format
305Specify a key format for the
306.Fl i
307(import) or
308.Fl e
309(export) conversion options.
310The supported key formats are:
311.Dq RFC4716
312(RFC 4716/SSH2 public or private key),
313.Dq PKCS8
314(PEM PKCS8 public key)
315or
316.Dq PEM
317(PEM public key).
318The default conversion format is
319.Dq RFC4716 .
293.It Fl N Ar new_passphrase 320.It Fl N Ar new_passphrase
294Provides the new passphrase. 321Provides the new passphrase.
295.It Fl n Ar principals 322.It Fl n Ar principals
@@ -299,13 +326,13 @@ Multiple principals may be specified, separated by commas.
299Please see the 326Please see the
300.Sx CERTIFICATES 327.Sx CERTIFICATES
301section for details. 328section for details.
302.It Fl O Ar constraint 329.It Fl O Ar option
303Specify a certificate constraint when signing a key. 330Specify a certificate option when signing a key.
304This option may be specified multiple times. 331This option may be specified multiple times.
305Please see the 332Please see the
306.Sx CERTIFICATES 333.Sx CERTIFICATES
307section for details. 334section for details.
308The constraints that are valid for user certificates are: 335The options that are valid for user certificates are:
309.Bl -tag -width Ds 336.Bl -tag -width Ds
310.It Ic clear 337.It Ic clear
311Clear all enabled permissions. 338Clear all enabled permissions.
@@ -355,7 +382,7 @@ is a comma-separated list of one or more address/netmask pairs in CIDR
355format. 382format.
356.El 383.El
357.Pp 384.Pp
358At present, no constraints are valid for host keys. 385At present, no options are valid for host keys.
359.It Fl P Ar passphrase 386.It Fl P Ar passphrase
360Provides the (old) passphrase. 387Provides the (old) passphrase.
361.It Fl p 388.It Fl p
@@ -441,6 +468,10 @@ Specify desired generator when testing candidate moduli for DH-GEX.
441.It Fl y 468.It Fl y
442This option will read a private 469This option will read a private
443OpenSSH format file and print an OpenSSH public key to stdout. 470OpenSSH format file and print an OpenSSH public key to stdout.
471.It Fl z Ar serial_number
472Specifies a serial number to be embedded in the certificate to distinguish
473this certificate from others from the same CA.
474The default serial number is zero.
444.El 475.El
445.Sh MODULI GENERATION 476.Sh MODULI GENERATION
446.Nm 477.Nm
@@ -501,7 +532,7 @@ that both ends of a connection share common moduli.
501supports signing of keys to produce certificates that may be used for 532supports signing of keys to produce certificates that may be used for
502user or host authentication. 533user or host authentication.
503Certificates consist of a public key, some identity information, zero or 534Certificates consist of a public key, some identity information, zero or
504more principal (user or host) names and an optional set of constraints that 535more principal (user or host) names and a set of options that
505are signed by a Certification Authority (CA) key. 536are signed by a Certification Authority (CA) key.
506Clients or servers may then trust only the CA key and verify its signature 537Clients or servers may then trust only the CA key and verify its signature
507on a certificate rather than trusting many user/host keys. 538on a certificate rather than trusting many user/host keys.
@@ -527,7 +558,17 @@ option:
527.Pp 558.Pp
528The host certificate will be output to 559The host certificate will be output to
529.Pa /path/to/host_key-cert.pub . 560.Pa /path/to/host_key-cert.pub .
530In both cases, 561.Pp
562It is possible to sign using a CA key stored in a PKCS#11 token by
563providing the token library using
564.Fl D
565and identifying the CA key by providing its public half as an argument
566to
567.Fl s :
568.Pp
569.Dl $ ssh-keygen -s ca_key.pub -D libpkcs11.so -I key_id host_key.pub
570.Pp
571In all cases,
531.Ar key_id 572.Ar key_id
532is a "key identifier" that is logged by the server when the certificate 573is a "key identifier" that is logged by the server when the certificate
533is used for authentication. 574is used for authentication.
@@ -541,11 +582,11 @@ To generate a certificate for a specified set of principals:
541.Dl "$ ssh-keygen -s ca_key -I key_id -h -n host.domain user_key.pub" 582.Dl "$ ssh-keygen -s ca_key -I key_id -h -n host.domain user_key.pub"
542.Pp 583.Pp
543Additional limitations on the validity and use of user certificates may 584Additional limitations on the validity and use of user certificates may
544be specified through certificate constraints. 585be specified through certificate options.
545A constrained certificate may disable features of the SSH session, may be 586A certificate option may disable features of the SSH session, may be
546valid only when presented from particular source addresses or may 587valid only when presented from particular source addresses or may
547force the use of a specific command. 588force the use of a specific command.
548For a list of valid certificate constraints, see the documentation for the 589For a list of valid certificate options, see the documentation for the
549.Fl O 590.Fl O
550option above. 591option above.
551.Pp 592.Pp