diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ssh-keygen.1 | 51 | ||||
-rw-r--r-- | ssh-keygen.c | 10 |
3 files changed, 46 insertions, 21 deletions
@@ -12,6 +12,10 @@ | |||
12 | - markus@cvs.openbsd.org 2001/04/22 12:34:05 | 12 | - markus@cvs.openbsd.org 2001/04/22 12:34:05 |
13 | [scp.c] | 13 | [scp.c] |
14 | scp > 2GB; niles@scyld.com; ok deraadt@, djm@ | 14 | scp > 2GB; niles@scyld.com; ok deraadt@, djm@ |
15 | - markus@cvs.openbsd.org 2001/04/22 13:25:37 | ||
16 | [ssh-keygen.1 ssh-keygen.c] | ||
17 | rename arguments -x -> -e (export key), -X -> -i (import key) | ||
18 | xref draft-ietf-secsh-publickeyfile-01.txt | ||
15 | 19 | ||
16 | 20010421 | 20 | 20010421 |
17 | - OpenBSD CVS Sync | 21 | - OpenBSD CVS Sync |
@@ -5215,4 +5219,4 @@ | |||
5215 | - Wrote replacements for strlcpy and mkdtemp | 5219 | - Wrote replacements for strlcpy and mkdtemp |
5216 | - Released 1.0pre1 | 5220 | - Released 1.0pre1 |
5217 | 5221 | ||
5218 | $Id: ChangeLog,v 1.1156 2001/04/22 17:13:20 mouring Exp $ | 5222 | $Id: ChangeLog,v 1.1157 2001/04/22 17:15:46 mouring Exp $ |
diff --git a/ssh-keygen.1 b/ssh-keygen.1 index 6808ede69..55e31de9e 100644 --- a/ssh-keygen.1 +++ b/ssh-keygen.1 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ssh-keygen.1,v 1.36 2001/04/10 09:13:21 itojun Exp $ | 1 | .\" $OpenBSD: ssh-keygen.1,v 1.37 2001/04/22 13:25:37 markus Exp $ |
2 | .\" | 2 | .\" |
3 | .\" -*- nroff -*- | 3 | .\" -*- nroff -*- |
4 | .\" | 4 | .\" |
@@ -42,7 +42,7 @@ | |||
42 | .Os | 42 | .Os |
43 | .Sh NAME | 43 | .Sh NAME |
44 | .Nm ssh-keygen | 44 | .Nm ssh-keygen |
45 | .Nd authentication key generation | 45 | .Nd authentication key generation, management and conversion |
46 | .Sh SYNOPSIS | 46 | .Sh SYNOPSIS |
47 | .Nm ssh-keygen | 47 | .Nm ssh-keygen |
48 | .Op Fl q | 48 | .Op Fl q |
@@ -57,10 +57,10 @@ | |||
57 | .Op Fl N Ar new_passphrase | 57 | .Op Fl N Ar new_passphrase |
58 | .Op Fl f Ar keyfile | 58 | .Op Fl f Ar keyfile |
59 | .Nm ssh-keygen | 59 | .Nm ssh-keygen |
60 | .Fl x | 60 | .Fl i |
61 | .Op Fl f Ar input_keyfile | 61 | .Op Fl f Ar input_keyfile |
62 | .Nm ssh-keygen | 62 | .Nm ssh-keygen |
63 | .Fl X | 63 | .Fl e |
64 | .Op Fl f Ar input_keyfile | 64 | .Op Fl f Ar input_keyfile |
65 | .Nm ssh-keygen | 65 | .Nm ssh-keygen |
66 | .Fl y | 66 | .Fl y |
@@ -78,10 +78,10 @@ | |||
78 | .Op Fl f Ar input_keyfile | 78 | .Op Fl f Ar input_keyfile |
79 | .Sh DESCRIPTION | 79 | .Sh DESCRIPTION |
80 | .Nm | 80 | .Nm |
81 | generates and manages authentication keys for | 81 | generates, manages and converts authentication keys for |
82 | .Xr ssh 1 . | 82 | .Xr ssh 1 . |
83 | .Nm | 83 | .Nm |
84 | defaults to generating an RSA key for use by protocols 1.3 and 1.5; | 84 | defaults to generating a RSA1 key for use by protocols 1.3 and 1.5; |
85 | specifying the | 85 | specifying the |
86 | .Fl t | 86 | .Fl t |
87 | option allows you to create a key for use by protocol 2.0. | 87 | option allows you to create a key for use by protocol 2.0. |
@@ -119,7 +119,8 @@ If the passphrase is | |||
119 | lost or forgotten, you will have to generate a new key and copy the | 119 | lost or forgotten, you will have to generate a new key and copy the |
120 | corresponding public key to other machines. | 120 | corresponding public key to other machines. |
121 | .Pp | 121 | .Pp |
122 | For RSA, there is also a comment field in the key file that is only for | 122 | For RSA1 keys, |
123 | there is also a comment field in the key file that is only for | ||
123 | convenience to the user to help identify the key. | 124 | convenience to the user to help identify the key. |
124 | The comment can tell what the key is for, or whatever is useful. | 125 | The comment can tell what the key is for, or whatever is useful. |
125 | The comment is initialized to | 126 | The comment is initialized to |
@@ -143,8 +144,23 @@ The default is 1024 bits. | |||
143 | Requests changing the comment in the private and public key files. | 144 | Requests changing the comment in the private and public key files. |
144 | The program will prompt for the file containing the private keys, for | 145 | The program will prompt for the file containing the private keys, for |
145 | passphrase if the key has one, and for the new comment. | 146 | passphrase if the key has one, and for the new comment. |
147 | .It Fl e | ||
148 | This option will read a private OpenSSH key file and print the key in a | ||
149 | .Sq SECSH Public Key File Format | ||
150 | to stdout. | ||
151 | This option allows exporting keys for use by several commercial | ||
152 | SSH implementations. | ||
146 | .It Fl f | 153 | .It Fl f |
147 | Specifies the filename of the key file. | 154 | Specifies the filename of the key file. |
155 | .It Fl i | ||
156 | This option will read an unencrypted private (or public) key file | ||
157 | in SSH2-compatible format and print an OpenSSH compatible private | ||
158 | (or public) key to stdout. | ||
159 | .Nm | ||
160 | does also read the | ||
161 | .Sq SECSH Public Key File Format . | ||
162 | This option allows importing keys from several commercial | ||
163 | SSH implementations. | ||
148 | .It Fl l | 164 | .It Fl l |
149 | Show fingerprint of specified private or public key file. | 165 | Show fingerprint of specified private or public key file. |
150 | .It Fl p | 166 | .It Fl p |
@@ -159,6 +175,9 @@ Silence | |||
159 | Used by | 175 | Used by |
160 | .Pa /etc/rc | 176 | .Pa /etc/rc |
161 | when creating a new key. | 177 | when creating a new key. |
178 | .It Fl y | ||
179 | This option will read a private | ||
180 | OpenSSH format file and print an OpenSSH public key to stdout. | ||
162 | .It Fl t Ar type | 181 | .It Fl t Ar type |
163 | Specifies the type of the key to create. | 182 | Specifies the type of the key to create. |
164 | The possible values are | 183 | The possible values are |
@@ -178,16 +197,6 @@ Provides the new comment. | |||
178 | Provides the new passphrase. | 197 | Provides the new passphrase. |
179 | .It Fl P Ar passphrase | 198 | .It Fl P Ar passphrase |
180 | Provides the (old) passphrase. | 199 | Provides the (old) passphrase. |
181 | .It Fl x | ||
182 | This option will read a private | ||
183 | OpenSSH DSA format file and print a SSH2-compatible public key to stdout. | ||
184 | .It Fl X | ||
185 | This option will read a unencrypted | ||
186 | SSH2-compatible private (or public) key file and | ||
187 | print an OpenSSH compatible private (or public) key to stdout. | ||
188 | .It Fl y | ||
189 | This option will read a private | ||
190 | OpenSSH format file and print an OpenSSH public key to stdout. | ||
191 | .El | 200 | .El |
192 | .Sh FILES | 201 | .Sh FILES |
193 | .Bl -tag -width Ds | 202 | .Bl -tag -width Ds |
@@ -260,3 +269,11 @@ protocol versions 1.5 and 2.0. | |||
260 | .Xr ssh-add 1 , | 269 | .Xr ssh-add 1 , |
261 | .Xr ssh-agent 1 , | 270 | .Xr ssh-agent 1 , |
262 | .Xr sshd 8 | 271 | .Xr sshd 8 |
272 | .Rs | ||
273 | .%A J. Galbraith | ||
274 | .%A R. Thayer | ||
275 | .%T "SECSH Public Key File Format" | ||
276 | .%N draft-ietf-secsh-publickeyfile-01.txt | ||
277 | .%D March 2001 | ||
278 | .%O work in progress material | ||
279 | .Re | ||
diff --git a/ssh-keygen.c b/ssh-keygen.c index d4ba23a4b..cb48b2f9d 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.56 2001/04/15 16:58:03 markus Exp $"); | 15 | RCSID("$OpenBSD: ssh-keygen.c,v 1.57 2001/04/22 13:25:37 markus Exp $"); |
16 | 16 | ||
17 | #include <openssl/evp.h> | 17 | #include <openssl/evp.h> |
18 | #include <openssl/pem.h> | 18 | #include <openssl/pem.h> |
@@ -628,7 +628,7 @@ do_change_comment(struct passwd *pw) | |||
628 | void | 628 | void |
629 | usage(void) | 629 | usage(void) |
630 | { | 630 | { |
631 | printf("Usage: %s [-lBpqxXyc] [-t type] [-b bits] [-f file] [-C comment] " | 631 | printf("Usage: %s [-lBpqxiec] [-t type] [-b bits] [-f file] [-C comment] " |
632 | "[-N new-pass] [-P pass]\n", __progname); | 632 | "[-N new-pass] [-P pass]\n", __progname); |
633 | exit(1); | 633 | exit(1); |
634 | } | 634 | } |
@@ -666,7 +666,7 @@ main(int ac, char **av) | |||
666 | exit(1); | 666 | exit(1); |
667 | } | 667 | } |
668 | 668 | ||
669 | while ((opt = getopt(ac, av, "dqpclBRxXyb:f:t:P:N:C:")) != -1) { | 669 | while ((opt = getopt(ac, av, "deiqpclBRxXyb:f:t:P:N:C:")) != -1) { |
670 | switch (opt) { | 670 | switch (opt) { |
671 | case 'b': | 671 | case 'b': |
672 | bits = atoi(optarg); | 672 | bits = atoi(optarg); |
@@ -718,11 +718,15 @@ main(int ac, char **av) | |||
718 | exit(0); | 718 | exit(0); |
719 | break; | 719 | break; |
720 | 720 | ||
721 | case 'e': | ||
721 | case 'x': | 722 | case 'x': |
723 | /* export key */ | ||
722 | convert_to_ssh2 = 1; | 724 | convert_to_ssh2 = 1; |
723 | break; | 725 | break; |
724 | 726 | ||
727 | case 'i': | ||
725 | case 'X': | 728 | case 'X': |
729 | /* import key */ | ||
726 | convert_from_ssh2 = 1; | 730 | convert_from_ssh2 = 1; |
727 | break; | 731 | break; |
728 | 732 | ||