summaryrefslogtreecommitdiff
path: root/ssh-keygen.1
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-08-02 22:40:07 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-08-02 22:40:07 +1000
commit019cefeaadc06a3664076cae10aedae4aed13911 (patch)
tree764f9301bf2bd62662ef43beef8d5af1622983d5 /ssh-keygen.1
parentc20c60bc99ea5e1b94236c1b3f00a8f4514a21f6 (diff)
- djm@cvs.openbsd.org 2003/07/28 09:49:56
[ssh-keygen.1 ssh-keygen.c] Support for generating Diffie-Hellman groups (/etc/moduli) from ssh-keygen. Based on code from Phil Karn, William Allen Simpson and Niels Provos. ok markus@, thanks jmc@
Diffstat (limited to 'ssh-keygen.1')
-rw-r--r--ssh-keygen.1100
1 files changed, 99 insertions, 1 deletions
diff --git a/ssh-keygen.1 b/ssh-keygen.1
index fc6b5a5e0..dc4bcacd0 100644
--- a/ssh-keygen.1
+++ b/ssh-keygen.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keygen.1,v 1.59 2003/06/10 09:12:11 jmc Exp $ 1.\" $OpenBSD: ssh-keygen.1,v 1.60 2003/07/28 09:49:56 djm Exp $
2.\" 2.\"
3.\" -*- nroff -*- 3.\" -*- nroff -*-
4.\" 4.\"
@@ -87,6 +87,16 @@
87.Fl r Ar hostname 87.Fl r Ar hostname
88.Op Fl f Ar input_keyfile 88.Op Fl f Ar input_keyfile
89.Op Fl g 89.Op Fl g
90.Nm ssh-keygen
91.Fl G Ar output_file
92.Op Fl b Ar bits
93.Op Fl M Ar memory
94.Op Fl S Ar start_point
95.Nm ssh-keygen
96.Fl T Ar output_file
97.Fl f Ar input_file
98.Op Fl a Ar num_trials
99.Op Fl W Ar generator
90.Sh DESCRIPTION 100.Sh DESCRIPTION
91.Nm 101.Nm
92generates, manages and converts authentication keys for 102generates, manages and converts authentication keys for
@@ -98,6 +108,13 @@ The type of key to be generated is specified with the
98.Fl t 108.Fl t
99option. 109option.
100.Pp 110.Pp
111.Nm
112is also used to generate groups for use in Diffie-Hellman group
113exchange (DH-GEX).
114See the
115.Sx MODULI GENERATION
116section for details.
117.Pp
101Normally each user wishing to use SSH 118Normally each user wishing to use SSH
102with RSA or DSA authentication runs this once to create the authentication 119with RSA or DSA authentication runs this once to create the authentication
103key in 120key in
@@ -150,6 +167,11 @@ should be placed to be activated.
150.Pp 167.Pp
151The options are as follows: 168The options are as follows:
152.Bl -tag -width Ds 169.Bl -tag -width Ds
170.It Fl a Ar trials
171Specifies the number of primality tests to perform when screening DH-GEX
172candidates using the
173.Fl T
174command.
153.It Fl b Ar bits 175.It Fl b Ar bits
154Specifies the number of bits in the key to create. 176Specifies the number of bits in the key to create.
155Minimum is 512 bits. 177Minimum is 512 bits.
@@ -217,10 +239,27 @@ Provides the new comment.
217.It Fl D Ar reader 239.It Fl D Ar reader
218Download the RSA public key stored in the smartcard in 240Download the RSA public key stored in the smartcard in
219.Ar reader . 241.Ar reader .
242.It Fl G Ar output_file
243Generate candidate primes for DH-GEX.
244These primes must be screened for
245safety (using the
246.Fl T
247option) before use.
248.It Fl M Ar memory
249Specify the amount of memory to use (in megabytes) when generating
250candidate moduli for DH-GEX.
220.It Fl N Ar new_passphrase 251.It Fl N Ar new_passphrase
221Provides the new passphrase. 252Provides the new passphrase.
222.It Fl P Ar passphrase 253.It Fl P Ar passphrase
223Provides the (old) passphrase. 254Provides the (old) passphrase.
255.It Fl S Ar start
256Specify start point (in hex) when generating candidate moduli for DH-GEX.
257.It Fl T Ar output_file
258Test DH group exchange candidate primes (generated using the
259.Fl G
260option) for safety.
261.It Fl W Ar generator
262Specify desired generator when testing candidate moduli for DH-GEX.
224.It Fl U Ar reader 263.It Fl U Ar reader
225Upload an existing RSA private key into the smartcard in 264Upload an existing RSA private key into the smartcard in
226.Ar reader . 265.Ar reader .
@@ -228,6 +267,60 @@ Upload an existing RSA private key into the smartcard in
228Print DNS resource record with the specified 267Print DNS resource record with the specified
229.Ar hostname . 268.Ar hostname .
230.El 269.El
270.Sh MODULI GENERATION
271.Nm
272may be used to generate groups for the Diffie-Hellman Group Exchange
273(DH-GEX) protocol.
274Generating these groups is a two-step process: first, candidate
275primes are generated using a fast, but memory intensive process.
276These candidate primes are then tested for suitability (a CPU-intensive
277process).
278.Pp
279Generation of primes is performed using the
280.Fl G
281option.
282The desired length of the primes may be specified by the
283.Fl b
284option.
285For example:
286.Pp
287.Dl ssh-keygen -G moduli-2048.candidates -b 2048
288.Pp
289By default, the search for primes begins at a random point in the
290desired length range.
291This may be overridden using the
292.Fl S
293option, which specifies a different start point (in hex).
294.Pp
295Once a set of candidates have been generated, they must be tested for
296suitability.
297This may be performed using the
298.Fl T
299option.
300In this mode
301.Nm
302will read candidates from standard input (or a file specified using the
303.Fl f
304option).
305For example:
306.Pp
307.Dl ssh-keygen -T moduli-2048 -f moduli-2048.candidates
308.Pp
309By default, each candidate will be subjected to 100 primality tests.
310This may be overridden using the
311.Fl a
312option.
313The DH generator value will be chosen automatically for the
314prime under consideration.
315If a specific generator is desired, it may be requested using the
316.Fl W
317option.
318Valid generator values are 2, 3 and 5.
319.Pp
320Screened DH groups may be installed in
321.Pa /etc/moduli .
322It is important that this file contains moduli of a range of bit lengths and
323that both ends of a connection share common moduli.
231.Sh FILES 324.Sh FILES
232.Bl -tag -width Ds 325.Bl -tag -width Ds
233.It Pa $HOME/.ssh/identity 326.It Pa $HOME/.ssh/identity
@@ -284,11 +377,16 @@ The contents of this file should be added to
284on all machines 377on all machines
285where the user wishes to log in using public key authentication. 378where the user wishes to log in using public key authentication.
286There is no need to keep the contents of this file secret. 379There is no need to keep the contents of this file secret.
380.It Pa /etc/moduli
381Contains Diffie-Hellman groups used for DH-GEX.
382The file format is described in
383.Xr moduli 5 .
287.El 384.El
288.Sh SEE ALSO 385.Sh SEE ALSO
289.Xr ssh 1 , 386.Xr ssh 1 ,
290.Xr ssh-add 1 , 387.Xr ssh-add 1 ,
291.Xr ssh-agent 1 , 388.Xr ssh-agent 1 ,
389.Xr moduli 5 ,
292.Xr sshd 8 390.Xr sshd 8
293.Rs 391.Rs
294.%A J. Galbraith 392.%A J. Galbraith