diff options
author | Colin Watson <cjwatson@debian.org> | 2010-03-31 10:46:28 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2010-03-31 10:46:28 +0100 |
commit | efd3d4522636ae029488c2e9730b60c88e257d2e (patch) | |
tree | 31e02ac3f16090ce8c53448677356b2b7f423683 /ssh-keygen.1 | |
parent | bbec4db36d464ea1d464a707625125f9fd5c7b5e (diff) | |
parent | d1a87e462e1db89f19cd960588d0c6b287cb5ccc (diff) |
* New upstream release (LP: #535029).
- After a transition period of about 10 years, this release disables SSH
protocol 1 by default. Clients and servers that need to use the
legacy protocol must explicitly enable it in ssh_config / sshd_config
or on the command-line.
- Remove the libsectok/OpenSC-based smartcard code and add support for
PKCS#11 tokens. This support is enabled by default in the Debian
packaging, since it now doesn't involve additional library
dependencies (closes: #231472, LP: #16918).
- Add support for certificate authentication of users and hosts using a
new, minimal OpenSSH certificate format (closes: #482806).
- Added a 'netcat mode' to ssh(1): "ssh -W host:port ...".
- Add the ability to revoke keys in sshd(8) and ssh(1). (For the Debian
package, this overlaps with the key blacklisting facility added in
openssh 1:4.7p1-9, but with different file formats and slightly
different scopes; for the moment, I've roughly merged the two.)
- Various multiplexing improvements, including support for requesting
port-forwardings via the multiplex protocol (closes: #360151).
- Allow setting an explicit umask on the sftp-server(8) commandline to
override whatever default the user has (closes: #496843).
- Many sftp client improvements, including tab-completion, more options,
and recursive transfer support for get/put (LP: #33378). The old
mget/mput commands never worked properly and have been removed
(closes: #270399, #428082).
- Do not prompt for a passphrase if we fail to open a keyfile, and log
the reason why the open failed to debug (closes: #431538).
- Prevent sftp from crashing when given a "-" without a command. Also,
allow whitespace to follow a "-" (closes: #531561).
Diffstat (limited to 'ssh-keygen.1')
-rw-r--r-- | ssh-keygen.1 | 210 |
1 files changed, 194 insertions, 16 deletions
diff --git a/ssh-keygen.1 b/ssh-keygen.1 index c87d8031a..9dec5a098 100644 --- a/ssh-keygen.1 +++ b/ssh-keygen.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ssh-keygen.1,v 1.79 2008/07/24 23:55:30 sthen Exp $ | 1 | .\" $OpenBSD: ssh-keygen.1,v 1.88 2010/03/08 00:28:55 djm Exp $ |
2 | .\" | 2 | .\" |
3 | .\" -*- nroff -*- | 3 | .\" -*- nroff -*- |
4 | .\" | 4 | .\" |
@@ -37,7 +37,7 @@ | |||
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: July 24 2008 $ | 40 | .Dd $Mdocdate: March 8 2010 $ |
41 | .Dt SSH-KEYGEN 1 | 41 | .Dt SSH-KEYGEN 1 |
42 | .Os | 42 | .Os |
43 | .Sh NAME | 43 | .Sh NAME |
@@ -52,7 +52,6 @@ | |||
52 | .Op Fl N Ar new_passphrase | 52 | .Op Fl N Ar new_passphrase |
53 | .Op Fl C Ar comment | 53 | .Op Fl C Ar comment |
54 | .Op Fl f Ar output_keyfile | 54 | .Op Fl f Ar output_keyfile |
55 | .Ek | ||
56 | .Nm ssh-keygen | 55 | .Nm ssh-keygen |
57 | .Fl p | 56 | .Fl p |
58 | .Op Fl P Ar old_passphrase | 57 | .Op Fl P Ar old_passphrase |
@@ -79,7 +78,7 @@ | |||
79 | .Fl B | 78 | .Fl B |
80 | .Op Fl f Ar input_keyfile | 79 | .Op Fl f Ar input_keyfile |
81 | .Nm ssh-keygen | 80 | .Nm ssh-keygen |
82 | .Fl D Ar reader | 81 | .Fl D Ar pkcs11 |
83 | .Nm ssh-keygen | 82 | .Nm ssh-keygen |
84 | .Fl F Ar hostname | 83 | .Fl F Ar hostname |
85 | .Op Fl f Ar known_hosts_file | 84 | .Op Fl f Ar known_hosts_file |
@@ -91,9 +90,6 @@ | |||
91 | .Fl R Ar hostname | 90 | .Fl R Ar hostname |
92 | .Op Fl f Ar known_hosts_file | 91 | .Op Fl f Ar known_hosts_file |
93 | .Nm ssh-keygen | 92 | .Nm ssh-keygen |
94 | .Fl U Ar reader | ||
95 | .Op Fl f Ar input_keyfile | ||
96 | .Nm ssh-keygen | ||
97 | .Fl r Ar hostname | 93 | .Fl r Ar hostname |
98 | .Op Fl f Ar input_keyfile | 94 | .Op Fl f Ar input_keyfile |
99 | .Op Fl g | 95 | .Op Fl g |
@@ -109,6 +105,18 @@ | |||
109 | .Op Fl v | 105 | .Op Fl v |
110 | .Op Fl a Ar num_trials | 106 | .Op Fl a Ar num_trials |
111 | .Op Fl W Ar generator | 107 | .Op Fl W Ar generator |
108 | .Nm ssh-keygen | ||
109 | .Fl s Ar ca_key | ||
110 | .Fl I Ar certificate_identity | ||
111 | .Op Fl h | ||
112 | .Op Fl n Ar principals | ||
113 | .Op Fl O Ar constraint | ||
114 | .Op Fl V Ar validity_interval | ||
115 | .Ar | ||
116 | .Nm ssh-keygen | ||
117 | .Fl L | ||
118 | .Op Fl f Ar input_keyfile | ||
119 | .Ek | ||
112 | .Sh DESCRIPTION | 120 | .Sh DESCRIPTION |
113 | .Nm | 121 | .Nm |
114 | generates, manages and converts authentication keys for | 122 | generates, manages and converts authentication keys for |
@@ -199,9 +207,9 @@ Requests changing the comment in the private and public key files. | |||
199 | This operation is only supported for RSA1 keys. | 207 | This operation is only supported for RSA1 keys. |
200 | The program will prompt for the file containing the private keys, for | 208 | The program will prompt for the file containing the private keys, for |
201 | the passphrase if the key has one, and for the new comment. | 209 | the passphrase if the key has one, and for the new comment. |
202 | .It Fl D Ar reader | 210 | .It Fl D Ar pkcs11 |
203 | Download the RSA public key stored in the smartcard in | 211 | Download the RSA public keys provided by the PKCS#11 shared library |
204 | .Ar reader . | 212 | .Ar pkcs11 . |
205 | .It Fl e | 213 | .It Fl e |
206 | This option will read a private or public OpenSSH key file and | 214 | This option will read a private or public OpenSSH key file and |
207 | print the key in | 215 | print the key in |
@@ -246,6 +254,17 @@ but they do not reveal identifying information should the file's contents | |||
246 | be disclosed. | 254 | be disclosed. |
247 | This option will not modify existing hashed hostnames and is therefore safe | 255 | This option will not modify existing hashed hostnames and is therefore safe |
248 | to use on files that mix hashed and non-hashed names. | 256 | to use on files that mix hashed and non-hashed names. |
257 | .It Fl h | ||
258 | When signing a key, create a host certificate instead of a user | ||
259 | certificate. | ||
260 | Please see the | ||
261 | .Sx CERTIFICATES | ||
262 | section for details. | ||
263 | .It Fl I Ar certificate_identity | ||
264 | Specify the key identity when signing a public key. | ||
265 | Please see the | ||
266 | .Sx CERTIFICATES | ||
267 | section for details. | ||
249 | .It Fl i | 268 | .It Fl i |
250 | This option will read an unencrypted private (or public) key file | 269 | This option will read an unencrypted private (or public) key file |
251 | in SSH2-compatible format and print an OpenSSH compatible private | 270 | in SSH2-compatible format and print an OpenSSH compatible private |
@@ -255,6 +274,8 @@ also reads the | |||
255 | RFC 4716 SSH Public Key File Format. | 274 | RFC 4716 SSH Public Key File Format. |
256 | This option allows importing keys from several commercial | 275 | This option allows importing keys from several commercial |
257 | SSH implementations. | 276 | SSH implementations. |
277 | .It Fl L | ||
278 | Prints the contents of a certificate. | ||
258 | .It Fl l | 279 | .It Fl l |
259 | Show fingerprint of specified public key file. | 280 | Show fingerprint of specified public key file. |
260 | Private RSA1 keys are also supported. | 281 | Private RSA1 keys are also supported. |
@@ -269,6 +290,71 @@ Specify the amount of memory to use (in megabytes) when generating | |||
269 | candidate moduli for DH-GEX. | 290 | candidate moduli for DH-GEX. |
270 | .It Fl N Ar new_passphrase | 291 | .It Fl N Ar new_passphrase |
271 | Provides the new passphrase. | 292 | Provides the new passphrase. |
293 | .It Fl n Ar principals | ||
294 | Specify one or more principals (user or host names) to be included in | ||
295 | a certificate when signing a key. | ||
296 | Multiple principals may be specified, separated by commas. | ||
297 | Please see the | ||
298 | .Sx CERTIFICATES | ||
299 | section for details. | ||
300 | .It Fl O Ar constraint | ||
301 | Specify a certificate constraint when signing a key. | ||
302 | This option may be specified multiple times. | ||
303 | Please see the | ||
304 | .Sx CERTIFICATES | ||
305 | section for details. | ||
306 | The constraints that are valid for user certificates are: | ||
307 | .Bl -tag -width Ds | ||
308 | .It Ic no-x11-forwarding | ||
309 | Disable X11 forwarding (permitted by default). | ||
310 | .It Ic no-agent-forwarding | ||
311 | Disable | ||
312 | .Xr ssh-agent 1 | ||
313 | forwarding (permitted by default). | ||
314 | .It Ic no-port-forwarding | ||
315 | Disable port forwarding (permitted by default). | ||
316 | .It Ic no-pty | ||
317 | Disable PTY allocation (permitted by default). | ||
318 | .It Ic no-user-rc | ||
319 | Disable execution of | ||
320 | .Pa ~/.ssh/rc | ||
321 | by | ||
322 | .Xr sshd 8 | ||
323 | (permitted by default). | ||
324 | .It Ic clear | ||
325 | Clear all enabled permissions. | ||
326 | This is useful for clearing the default set of permissions so permissions may | ||
327 | be added individually. | ||
328 | .It Ic permit-x11-forwarding | ||
329 | Allows X11 forwarding. | ||
330 | .It Ic permit-agent-forwarding | ||
331 | Allows | ||
332 | .Xr ssh-agent 1 | ||
333 | forwarding. | ||
334 | .It Ic permit-port-forwarding | ||
335 | Allows port forwarding. | ||
336 | .It Ic permit-pty | ||
337 | Allows PTY allocation. | ||
338 | .It Ic permit-user-rc | ||
339 | Allows execution of | ||
340 | .Pa ~/.ssh/rc | ||
341 | by | ||
342 | .Xr sshd 8 . | ||
343 | .It Ic force-command=command | ||
344 | Forces the execution of | ||
345 | .Ar command | ||
346 | instead of any shell or command specified by the user when | ||
347 | the certificate is used for authentication. | ||
348 | .It Ic source-address=address_list | ||
349 | Restrict the source addresses from which the certificate is considered valid | ||
350 | from. | ||
351 | The | ||
352 | .Ar address_list | ||
353 | is a comma-separated list of one or more address/netmask pairs in CIDR | ||
354 | format. | ||
355 | .El | ||
356 | .Pp | ||
357 | At present, no constraints are valid for host keys. | ||
272 | .It Fl P Ar passphrase | 358 | .It Fl P Ar passphrase |
273 | Provides the (old) passphrase. | 359 | Provides the (old) passphrase. |
274 | .It Fl p | 360 | .It Fl p |
@@ -296,6 +382,11 @@ Print the SSHFP fingerprint resource record named | |||
296 | for the specified public key file. | 382 | for the specified public key file. |
297 | .It Fl S Ar start | 383 | .It Fl S Ar start |
298 | Specify start point (in hex) when generating candidate moduli for DH-GEX. | 384 | Specify start point (in hex) when generating candidate moduli for DH-GEX. |
385 | .It Fl s Ar ca_key | ||
386 | Certify (sign) a public key using the specified CA key. | ||
387 | Please see the | ||
388 | .Sx CERTIFICATES | ||
389 | section for details. | ||
299 | .It Fl T Ar output_file | 390 | .It Fl T Ar output_file |
300 | Test DH group exchange candidate primes (generated using the | 391 | Test DH group exchange candidate primes (generated using the |
301 | .Fl G | 392 | .Fl G |
@@ -309,9 +400,29 @@ for protocol version 1 and | |||
309 | or | 400 | or |
310 | .Dq dsa | 401 | .Dq dsa |
311 | for protocol version 2. | 402 | for protocol version 2. |
312 | .It Fl U Ar reader | 403 | .It Fl V Ar validity_interval |
313 | Upload an existing RSA private key into the smartcard in | 404 | Specify a validity interval when signing a certificate. |
314 | .Ar reader . | 405 | A validity interval may consist of a single time, indicating that the |
406 | certificate is valid beginning now and expiring at that time, or may consist | ||
407 | of two times separated by a colon to indicate an explicit time interval. | ||
408 | The start time may be specified as a date in YYYYMMDD format, a time | ||
409 | in YYYYMMDDHHMMSS format or a relative time (to the current time) consisting | ||
410 | of a minus sign followed by a relative time in the format described in the | ||
411 | .Sx TIME FORMATS | ||
412 | section of | ||
413 | .Xr ssh_config 5 . | ||
414 | The end time may be specified as a YYYYMMDD date, a YYYYMMDDHHMMSS time or | ||
415 | a relative time starting with a plus character. | ||
416 | .Pp | ||
417 | For example: | ||
418 | .Dq +52w1d | ||
419 | (valid from now to 52 weeks and one day from now), | ||
420 | .Dq -4w:+4w | ||
421 | (valid from four weeks ago to four weeks from now), | ||
422 | .Dq 20100101123000:20110101123000 | ||
423 | (valid from 12:30 PM, January 1st, 2010 to 12:30 PM, January 1st, 2011), | ||
424 | .Dq -1d:20110101 | ||
425 | (valid from yesterday to midnight, January 1st, 2011). | ||
315 | .It Fl v | 426 | .It Fl v |
316 | Verbose mode. | 427 | Verbose mode. |
317 | Causes | 428 | Causes |
@@ -382,6 +493,73 @@ Screened DH groups may be installed in | |||
382 | .Pa /etc/moduli . | 493 | .Pa /etc/moduli . |
383 | It is important that this file contains moduli of a range of bit lengths and | 494 | It is important that this file contains moduli of a range of bit lengths and |
384 | that both ends of a connection share common moduli. | 495 | that both ends of a connection share common moduli. |
496 | .Sh CERTIFICATES | ||
497 | .Nm | ||
498 | supports signing of keys to produce certificates that may be used for | ||
499 | user or host authentication. | ||
500 | Certificates consist of a public key, some identity information, zero or | ||
501 | more principal (user or host) names and an optional set of constraints that | ||
502 | are signed by a Certification Authority (CA) key. | ||
503 | Clients or servers may then trust only the CA key and verify its signature | ||
504 | on a certificate rather than trusting many user/host keys. | ||
505 | Note that OpenSSH certificates are a different, and much simpler, format to | ||
506 | the X.509 certificates used in | ||
507 | .Xr ssl 8 . | ||
508 | .Pp | ||
509 | .Nm | ||
510 | supports two types of certificates: user and host. | ||
511 | User certificates authenticate users to servers, whereas host certificates | ||
512 | authenticate server hosts to users. | ||
513 | To generate a user certificate: | ||
514 | .Pp | ||
515 | .Dl $ ssh-keygen -s /path/to/ca_key -I key_id /path/to/user_key.pub | ||
516 | .Pp | ||
517 | The resultant certificate will be placed in | ||
518 | .Pa /path/to/user_key_cert.pub . | ||
519 | A host certificate requires the | ||
520 | .Fl h | ||
521 | option: | ||
522 | .Pp | ||
523 | .Dl $ ssh-keygen -s /path/to/ca_key -I key_id -h /path/to/host_key.pub | ||
524 | .Pp | ||
525 | The host certificate will be output to | ||
526 | .Pa /path/to/host_key_cert.pub . | ||
527 | In both cases, | ||
528 | .Ar key_id | ||
529 | is a "key identifier" that is logged by the server when the certificate | ||
530 | is used for authentication. | ||
531 | .Pp | ||
532 | Certificates may be limited to be valid for a set of principal (user/host) | ||
533 | names. | ||
534 | By default, generated certificates are valid for all users or hosts. | ||
535 | To generate a certificate for a specified set of principals: | ||
536 | .Pp | ||
537 | .Dl $ ssh-keygen -s ca_key -I key_id -n user1,user2 user_key.pub | ||
538 | .Dl $ ssh-keygen -s ca_key -I key_id -h -n host.domain user_key.pub | ||
539 | .Pp | ||
540 | Additional limitations on the validity and use of user certificates may | ||
541 | be specified through certificate constraints. | ||
542 | A constrained certificate may disable features of the SSH session, may be | ||
543 | valid only when presented from particular source addresses or may | ||
544 | force the use of a specific command. | ||
545 | For a list of valid certificate constraints, see the documentation for the | ||
546 | .Fl O | ||
547 | option above. | ||
548 | .Pp | ||
549 | Finally, certificates may be defined with a validity lifetime. | ||
550 | The | ||
551 | .Fl V | ||
552 | option allows specification of certificate start and end times. | ||
553 | A certificate that is presented at a time outside this range will not be | ||
554 | considered valid. | ||
555 | By default, certificates have a maximum validity interval. | ||
556 | .Pp | ||
557 | For certificates to be used for user or host authentication, the CA | ||
558 | public key must be trusted by | ||
559 | .Xr sshd 8 | ||
560 | or | ||
561 | .Xr ssh 1 . | ||
562 | Please refer to those manual pages for details. | ||
385 | .Sh FILES | 563 | .Sh FILES |
386 | .Bl -tag -width Ds | 564 | .Bl -tag -width Ds |
387 | .It Pa ~/.ssh/identity | 565 | .It Pa ~/.ssh/identity |
@@ -389,7 +567,7 @@ Contains the protocol version 1 RSA authentication identity of the user. | |||
389 | This file should not be readable by anyone but the user. | 567 | This file should not be readable by anyone but the user. |
390 | It is possible to | 568 | It is possible to |
391 | specify a passphrase when generating the key; that passphrase will be | 569 | specify a passphrase when generating the key; that passphrase will be |
392 | used to encrypt the private part of this file using 3DES. | 570 | used to encrypt the private part of this file using 128-bit AES. |
393 | This file is not automatically accessed by | 571 | This file is not automatically accessed by |
394 | .Nm | 572 | .Nm |
395 | but it is offered as the default file for the private key. | 573 | but it is offered as the default file for the private key. |
@@ -407,7 +585,7 @@ Contains the protocol version 2 DSA authentication identity of the user. | |||
407 | This file should not be readable by anyone but the user. | 585 | This file should not be readable by anyone but the user. |
408 | It is possible to | 586 | It is possible to |
409 | specify a passphrase when generating the key; that passphrase will be | 587 | specify a passphrase when generating the key; that passphrase will be |
410 | used to encrypt the private part of this file using 3DES. | 588 | used to encrypt the private part of this file using 128-bit AES. |
411 | This file is not automatically accessed by | 589 | This file is not automatically accessed by |
412 | .Nm | 590 | .Nm |
413 | but it is offered as the default file for the private key. | 591 | but it is offered as the default file for the private key. |
@@ -425,7 +603,7 @@ Contains the protocol version 2 RSA authentication identity of the user. | |||
425 | This file should not be readable by anyone but the user. | 603 | This file should not be readable by anyone but the user. |
426 | It is possible to | 604 | It is possible to |
427 | specify a passphrase when generating the key; that passphrase will be | 605 | specify a passphrase when generating the key; that passphrase will be |
428 | used to encrypt the private part of this file using 3DES. | 606 | used to encrypt the private part of this file using 128-bit AES. |
429 | This file is not automatically accessed by | 607 | This file is not automatically accessed by |
430 | .Nm | 608 | .Nm |
431 | but it is offered as the default file for the private key. | 609 | but it is offered as the default file for the private key. |