diff options
author | Colin Watson <cjwatson@debian.org> | 2017-10-04 11:23:58 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2017-10-05 23:58:12 +0100 |
commit | 0556ea972b15607b7e13ff31bc05840881c91dd3 (patch) | |
tree | d6b8d48062d0278b5ae0eeff42d0e9afa9f26860 /ssh-keygen.1 | |
parent | db2122d97eb1ecdd8d99b7bf79b0dd2b5addfd92 (diff) | |
parent | 801a62eedaaf47b20dbf4b426dc3e084bf0c8d49 (diff) |
New upstream release (7.6p1)
Diffstat (limited to 'ssh-keygen.1')
-rw-r--r-- | ssh-keygen.1 | 120 |
1 files changed, 70 insertions, 50 deletions
diff --git a/ssh-keygen.1 b/ssh-keygen.1 index 01711dfff..dfbc65ddb 100644 --- a/ssh-keygen.1 +++ b/ssh-keygen.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ssh-keygen.1,v 1.133 2016/06/16 06:10:45 jmc Exp $ | 1 | .\" $OpenBSD: ssh-keygen.1,v 1.144 2017/07/08 18:32:54 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -35,7 +35,7 @@ | |||
35 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 35 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
36 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 36 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
37 | .\" | 37 | .\" |
38 | .Dd $Mdocdate: June 16 2016 $ | 38 | .Dd $Mdocdate: July 8 2017 $ |
39 | .Dt SSH-KEYGEN 1 | 39 | .Dt SSH-KEYGEN 1 |
40 | .Os | 40 | .Os |
41 | .Sh NAME | 41 | .Sh NAME |
@@ -46,7 +46,7 @@ | |||
46 | .Nm ssh-keygen | 46 | .Nm ssh-keygen |
47 | .Op Fl q | 47 | .Op Fl q |
48 | .Op Fl b Ar bits | 48 | .Op Fl b Ar bits |
49 | .Op Fl t Cm dsa | ecdsa | ed25519 | rsa | rsa1 | 49 | .Op Fl t Cm dsa | ecdsa | ed25519 | rsa |
50 | .Op Fl N Ar new_passphrase | 50 | .Op Fl N Ar new_passphrase |
51 | .Op Fl C Ar comment | 51 | .Op Fl C Ar comment |
52 | .Op Fl f Ar output_keyfile | 52 | .Op Fl f Ar output_keyfile |
@@ -114,6 +114,8 @@ | |||
114 | .Fl s Ar ca_key | 114 | .Fl s Ar ca_key |
115 | .Fl I Ar certificate_identity | 115 | .Fl I Ar certificate_identity |
116 | .Op Fl h | 116 | .Op Fl h |
117 | .Op Fl U | ||
118 | .Op Fl D Ar pkcs11_provider | ||
117 | .Op Fl n Ar principals | 119 | .Op Fl n Ar principals |
118 | .Op Fl O Ar option | 120 | .Op Fl O Ar option |
119 | .Op Fl V Ar validity_interval | 121 | .Op Fl V Ar validity_interval |
@@ -124,6 +126,7 @@ | |||
124 | .Op Fl f Ar input_keyfile | 126 | .Op Fl f Ar input_keyfile |
125 | .Nm ssh-keygen | 127 | .Nm ssh-keygen |
126 | .Fl A | 128 | .Fl A |
129 | .Op Fl f Ar prefix_path | ||
127 | .Nm ssh-keygen | 130 | .Nm ssh-keygen |
128 | .Fl k | 131 | .Fl k |
129 | .Fl f Ar krl_file | 132 | .Fl f Ar krl_file |
@@ -141,18 +144,14 @@ | |||
141 | generates, manages and converts authentication keys for | 144 | generates, manages and converts authentication keys for |
142 | .Xr ssh 1 . | 145 | .Xr ssh 1 . |
143 | .Nm | 146 | .Nm |
144 | can create keys for use by SSH protocol versions 1 and 2. | 147 | can create keys for use by SSH protocol version 2. |
145 | Protocol 1 should not be used | ||
146 | and is only offered to support legacy devices. | ||
147 | It suffers from a number of cryptographic weaknesses | ||
148 | and doesn't support many of the advanced features available for protocol 2. | ||
149 | .Pp | 148 | .Pp |
150 | The type of key to be generated is specified with the | 149 | The type of key to be generated is specified with the |
151 | .Fl t | 150 | .Fl t |
152 | option. | 151 | option. |
153 | If invoked without any arguments, | 152 | If invoked without any arguments, |
154 | .Nm | 153 | .Nm |
155 | will generate an RSA key for use in SSH protocol 2 connections. | 154 | will generate an RSA key. |
156 | .Pp | 155 | .Pp |
157 | .Nm | 156 | .Nm |
158 | is also used to generate groups for use in Diffie-Hellman group | 157 | is also used to generate groups for use in Diffie-Hellman group |
@@ -172,7 +171,6 @@ section for details. | |||
172 | Normally each user wishing to use SSH | 171 | Normally each user wishing to use SSH |
173 | with public key authentication runs this once to create the authentication | 172 | with public key authentication runs this once to create the authentication |
174 | key in | 173 | key in |
175 | .Pa ~/.ssh/identity , | ||
176 | .Pa ~/.ssh/id_dsa , | 174 | .Pa ~/.ssh/id_dsa , |
177 | .Pa ~/.ssh/id_ecdsa , | 175 | .Pa ~/.ssh/id_ecdsa , |
178 | .Pa ~/.ssh/id_ed25519 | 176 | .Pa ~/.ssh/id_ed25519 |
@@ -205,7 +203,7 @@ There is no way to recover a lost passphrase. | |||
205 | If the passphrase is lost or forgotten, a new key must be generated | 203 | If the passphrase is lost or forgotten, a new key must be generated |
206 | and the corresponding public key copied to other machines. | 204 | and the corresponding public key copied to other machines. |
207 | .Pp | 205 | .Pp |
208 | For RSA1 keys and keys stored in the newer OpenSSH format, | 206 | For keys stored in the newer OpenSSH format, |
209 | there is also a comment field in the key file that is only for | 207 | there is also a comment field in the key file that is only for |
210 | convenience to the user to help identify the key. | 208 | convenience to the user to help identify the key. |
211 | The comment can tell what the key is for, or whatever is useful. | 209 | The comment can tell what the key is for, or whatever is useful. |
@@ -221,22 +219,24 @@ should be placed to be activated. | |||
221 | The options are as follows: | 219 | The options are as follows: |
222 | .Bl -tag -width Ds | 220 | .Bl -tag -width Ds |
223 | .It Fl A | 221 | .It Fl A |
224 | For each of the key types (rsa1, rsa, dsa, ecdsa and ed25519) | 222 | For each of the key types (rsa, dsa, ecdsa and ed25519) |
225 | for which host keys | 223 | for which host keys |
226 | do not exist, generate the host keys with the default key file path, | 224 | do not exist, generate the host keys with the default key file path, |
227 | an empty passphrase, default bits for the key type, and default comment. | 225 | an empty passphrase, default bits for the key type, and default comment. |
226 | If | ||
227 | .Fl f | ||
228 | has also been specified, its argument is used as a prefix to the | ||
229 | default path for the resulting host key files. | ||
228 | This is used by system administration scripts to generate new host keys. | 230 | This is used by system administration scripts to generate new host keys. |
229 | .It Fl a Ar rounds | 231 | .It Fl a Ar rounds |
230 | When saving a new-format private key (i.e. an ed25519 key or any SSH protocol | 232 | When saving a new-format private key (i.e. an ed25519 key or when the |
231 | 2 key when the | ||
232 | .Fl o | 233 | .Fl o |
233 | flag is set), this option specifies the number of KDF (key derivation function) | 234 | flag is set), this option specifies the number of KDF (key derivation function) |
234 | rounds used. | 235 | rounds used. |
235 | Higher numbers result in slower passphrase verification and increased | 236 | Higher numbers result in slower passphrase verification and increased |
236 | resistance to brute-force password cracking (should the keys be stolen). | 237 | resistance to brute-force password cracking (should the keys be stolen). |
237 | .Pp | 238 | .Pp |
238 | When screening DH-GEX candidates ( | 239 | When screening DH-GEX candidates (using the |
239 | using the | ||
240 | .Fl T | 240 | .Fl T |
241 | command). | 241 | command). |
242 | This option specifies the number of primality tests to perform. | 242 | This option specifies the number of primality tests to perform. |
@@ -260,7 +260,7 @@ flag will be ignored. | |||
260 | Provides a new comment. | 260 | Provides a new comment. |
261 | .It Fl c | 261 | .It Fl c |
262 | Requests changing the comment in the private and public key files. | 262 | Requests changing the comment in the private and public key files. |
263 | This operation is only supported for RSA1 keys and keys stored in the | 263 | This operation is only supported for keys stored in the |
264 | newer OpenSSH format. | 264 | newer OpenSSH format. |
265 | The program will prompt for the file containing the private keys, for | 265 | The program will prompt for the file containing the private keys, for |
266 | the passphrase if the key has one, and for the new comment. | 266 | the passphrase if the key has one, and for the new comment. |
@@ -380,7 +380,6 @@ section. | |||
380 | Prints the contents of one or more certificates. | 380 | Prints the contents of one or more certificates. |
381 | .It Fl l | 381 | .It Fl l |
382 | Show fingerprint of specified public key file. | 382 | Show fingerprint of specified public key file. |
383 | Private RSA1 keys are also supported. | ||
384 | For RSA and DSA keys | 383 | For RSA and DSA keys |
385 | .Nm | 384 | .Nm |
386 | tries to find the matching public key file and prints its fingerprint. | 385 | tries to find the matching public key file and prints its fingerprint. |
@@ -419,51 +418,81 @@ section for details. | |||
419 | .It Fl O Ar option | 418 | .It Fl O Ar option |
420 | Specify a certificate option when signing a key. | 419 | Specify a certificate option when signing a key. |
421 | This option may be specified multiple times. | 420 | This option may be specified multiple times. |
422 | Please see the | 421 | See also the |
423 | .Sx CERTIFICATES | 422 | .Sx CERTIFICATES |
424 | section for details. | 423 | section for further details. |
425 | The options that are valid for user certificates are: | 424 | The options that are valid for user certificates are: |
426 | .Bl -tag -width Ds | 425 | .Pp |
426 | .Bl -tag -width Ds -compact | ||
427 | .It Ic clear | 427 | .It Ic clear |
428 | Clear all enabled permissions. | 428 | Clear all enabled permissions. |
429 | This is useful for clearing the default set of permissions so permissions may | 429 | This is useful for clearing the default set of permissions so permissions may |
430 | be added individually. | 430 | be added individually. |
431 | .Pp | ||
432 | .It Ic critical : Ns Ar name Ns Op Ns = Ns Ar contents | ||
433 | .It Ic extension : Ns Ar name Ns Op Ns = Ns Ar contents | ||
434 | Includes an arbitrary certificate critical option or extension. | ||
435 | The specified | ||
436 | .Ar name | ||
437 | should include a domain suffix, e.g.\& | ||
438 | .Dq name@example.com . | ||
439 | If | ||
440 | .Ar contents | ||
441 | is specified then it is included as the contents of the extension/option | ||
442 | encoded as a string, otherwise the extension/option is created with no | ||
443 | contents (usually indicating a flag). | ||
444 | Extensions may be ignored by a client or server that does not recognise them, | ||
445 | whereas unknown critical options will cause the certificate to be refused. | ||
446 | .Pp | ||
447 | At present, no standard options are valid for host keys. | ||
448 | .Pp | ||
431 | .It Ic force-command Ns = Ns Ar command | 449 | .It Ic force-command Ns = Ns Ar command |
432 | Forces the execution of | 450 | Forces the execution of |
433 | .Ar command | 451 | .Ar command |
434 | instead of any shell or command specified by the user when | 452 | instead of any shell or command specified by the user when |
435 | the certificate is used for authentication. | 453 | the certificate is used for authentication. |
454 | .Pp | ||
436 | .It Ic no-agent-forwarding | 455 | .It Ic no-agent-forwarding |
437 | Disable | 456 | Disable |
438 | .Xr ssh-agent 1 | 457 | .Xr ssh-agent 1 |
439 | forwarding (permitted by default). | 458 | forwarding (permitted by default). |
459 | .Pp | ||
440 | .It Ic no-port-forwarding | 460 | .It Ic no-port-forwarding |
441 | Disable port forwarding (permitted by default). | 461 | Disable port forwarding (permitted by default). |
462 | .Pp | ||
442 | .It Ic no-pty | 463 | .It Ic no-pty |
443 | Disable PTY allocation (permitted by default). | 464 | Disable PTY allocation (permitted by default). |
465 | .Pp | ||
444 | .It Ic no-user-rc | 466 | .It Ic no-user-rc |
445 | Disable execution of | 467 | Disable execution of |
446 | .Pa ~/.ssh/rc | 468 | .Pa ~/.ssh/rc |
447 | by | 469 | by |
448 | .Xr sshd 8 | 470 | .Xr sshd 8 |
449 | (permitted by default). | 471 | (permitted by default). |
472 | .Pp | ||
450 | .It Ic no-x11-forwarding | 473 | .It Ic no-x11-forwarding |
451 | Disable X11 forwarding (permitted by default). | 474 | Disable X11 forwarding (permitted by default). |
475 | .Pp | ||
452 | .It Ic permit-agent-forwarding | 476 | .It Ic permit-agent-forwarding |
453 | Allows | 477 | Allows |
454 | .Xr ssh-agent 1 | 478 | .Xr ssh-agent 1 |
455 | forwarding. | 479 | forwarding. |
480 | .Pp | ||
456 | .It Ic permit-port-forwarding | 481 | .It Ic permit-port-forwarding |
457 | Allows port forwarding. | 482 | Allows port forwarding. |
483 | .Pp | ||
458 | .It Ic permit-pty | 484 | .It Ic permit-pty |
459 | Allows PTY allocation. | 485 | Allows PTY allocation. |
486 | .Pp | ||
460 | .It Ic permit-user-rc | 487 | .It Ic permit-user-rc |
461 | Allows execution of | 488 | Allows execution of |
462 | .Pa ~/.ssh/rc | 489 | .Pa ~/.ssh/rc |
463 | by | 490 | by |
464 | .Xr sshd 8 . | 491 | .Xr sshd 8 . |
492 | .Pp | ||
465 | .It Ic permit-x11-forwarding | 493 | .It Ic permit-x11-forwarding |
466 | Allows X11 forwarding. | 494 | Allows X11 forwarding. |
495 | .Pp | ||
467 | .It Ic source-address Ns = Ns Ar address_list | 496 | .It Ic source-address Ns = Ns Ar address_list |
468 | Restrict the source addresses from which the certificate is considered valid. | 497 | Restrict the source addresses from which the certificate is considered valid. |
469 | The | 498 | The |
@@ -471,8 +500,6 @@ The | |||
471 | is a comma-separated list of one or more address/netmask pairs in CIDR | 500 | is a comma-separated list of one or more address/netmask pairs in CIDR |
472 | format. | 501 | format. |
473 | .El | 502 | .El |
474 | .Pp | ||
475 | At present, no options are valid for host keys. | ||
476 | .It Fl o | 503 | .It Fl o |
477 | Causes | 504 | Causes |
478 | .Nm | 505 | .Nm |
@@ -526,17 +553,22 @@ section for details. | |||
526 | Test DH group exchange candidate primes (generated using the | 553 | Test DH group exchange candidate primes (generated using the |
527 | .Fl G | 554 | .Fl G |
528 | option) for safety. | 555 | option) for safety. |
529 | .It Fl t Cm dsa | ecdsa | ed25519 | rsa | rsa1 | 556 | .It Fl t Cm dsa | ecdsa | ed25519 | rsa |
530 | Specifies the type of key to create. | 557 | Specifies the type of key to create. |
531 | The possible values are | 558 | The possible values are |
532 | .Dq rsa1 | ||
533 | for protocol version 1 and | ||
534 | .Dq dsa , | 559 | .Dq dsa , |
535 | .Dq ecdsa , | 560 | .Dq ecdsa , |
536 | .Dq ed25519 , | 561 | .Dq ed25519 , |
537 | or | 562 | or |
538 | .Dq rsa | 563 | .Dq rsa . |
539 | for protocol version 2. | 564 | .It Fl U |
565 | When used in combination with | ||
566 | .Fl s , | ||
567 | this option indicates that a CA key resides in a | ||
568 | .Xr ssh-agent 1 . | ||
569 | See the | ||
570 | .Sx CERTIFICATES | ||
571 | section for more information. | ||
540 | .It Fl u | 572 | .It Fl u |
541 | Update a KRL. | 573 | Update a KRL. |
542 | When specified with | 574 | When specified with |
@@ -684,6 +716,14 @@ to | |||
684 | .Pp | 716 | .Pp |
685 | .Dl $ ssh-keygen -s ca_key.pub -D libpkcs11.so -I key_id user_key.pub | 717 | .Dl $ ssh-keygen -s ca_key.pub -D libpkcs11.so -I key_id user_key.pub |
686 | .Pp | 718 | .Pp |
719 | Similarly, it is possible for the CA key to be hosted in a | ||
720 | .Xr ssh-agent 1 . | ||
721 | This is indicated by the | ||
722 | .Fl U | ||
723 | flag and, again, the CA key must be identified by its public half. | ||
724 | .Pp | ||
725 | .Dl $ ssh-keygen -Us ca_key.pub -I key_id user_key.pub | ||
726 | .Pp | ||
687 | In all cases, | 727 | In all cases, |
688 | .Ar key_id | 728 | .Ar key_id |
689 | is a "key identifier" that is logged by the server when the certificate | 729 | is a "key identifier" that is logged by the server when the certificate |
@@ -791,31 +831,11 @@ will exit with a non-zero exit status. | |||
791 | A zero exit status will only be returned if no key was revoked. | 831 | A zero exit status will only be returned if no key was revoked. |
792 | .Sh FILES | 832 | .Sh FILES |
793 | .Bl -tag -width Ds -compact | 833 | .Bl -tag -width Ds -compact |
794 | .It Pa ~/.ssh/identity | ||
795 | Contains the protocol version 1 RSA authentication identity of the user. | ||
796 | This file should not be readable by anyone but the user. | ||
797 | It is possible to | ||
798 | specify a passphrase when generating the key; that passphrase will be | ||
799 | used to encrypt the private part of this file using 3DES. | ||
800 | This file is not automatically accessed by | ||
801 | .Nm | ||
802 | but it is offered as the default file for the private key. | ||
803 | .Xr ssh 1 | ||
804 | will read this file when a login attempt is made. | ||
805 | .Pp | ||
806 | .It Pa ~/.ssh/identity.pub | ||
807 | Contains the protocol version 1 RSA public key for authentication. | ||
808 | The contents of this file should be added to | ||
809 | .Pa ~/.ssh/authorized_keys | ||
810 | on all machines | ||
811 | where the user wishes to log in using RSA authentication. | ||
812 | There is no need to keep the contents of this file secret. | ||
813 | .Pp | ||
814 | .It Pa ~/.ssh/id_dsa | 834 | .It Pa ~/.ssh/id_dsa |
815 | .It Pa ~/.ssh/id_ecdsa | 835 | .It Pa ~/.ssh/id_ecdsa |
816 | .It Pa ~/.ssh/id_ed25519 | 836 | .It Pa ~/.ssh/id_ed25519 |
817 | .It Pa ~/.ssh/id_rsa | 837 | .It Pa ~/.ssh/id_rsa |
818 | Contains the protocol version 2 DSA, ECDSA, Ed25519 or RSA | 838 | Contains the DSA, ECDSA, Ed25519 or RSA |
819 | authentication identity of the user. | 839 | authentication identity of the user. |
820 | This file should not be readable by anyone but the user. | 840 | This file should not be readable by anyone but the user. |
821 | It is possible to | 841 | It is possible to |
@@ -831,7 +851,7 @@ will read this file when a login attempt is made. | |||
831 | .It Pa ~/.ssh/id_ecdsa.pub | 851 | .It Pa ~/.ssh/id_ecdsa.pub |
832 | .It Pa ~/.ssh/id_ed25519.pub | 852 | .It Pa ~/.ssh/id_ed25519.pub |
833 | .It Pa ~/.ssh/id_rsa.pub | 853 | .It Pa ~/.ssh/id_rsa.pub |
834 | Contains the protocol version 2 DSA, ECDSA, Ed25519 or RSA | 854 | Contains the DSA, ECDSA, Ed25519 or RSA |
835 | public key for authentication. | 855 | public key for authentication. |
836 | The contents of this file should be added to | 856 | The contents of this file should be added to |
837 | .Pa ~/.ssh/authorized_keys | 857 | .Pa ~/.ssh/authorized_keys |