summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-04-22 17:15:46 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-04-22 17:15:46 +0000
commit5a707825765ebab087abf6b79ff050b7021cf3b9 (patch)
treef42330bc1bd0757930dafd161f84cf6223605a6c
parent4eda71d3dec578397022f1a39a1816f2db1ef79c (diff)
- markus@cvs.openbsd.org 2001/04/22 13:25:37
[ssh-keygen.1 ssh-keygen.c] rename arguments -x -> -e (export key), -X -> -i (import key) xref draft-ietf-secsh-publickeyfile-01.txt
-rw-r--r--ChangeLog6
-rw-r--r--ssh-keygen.151
-rw-r--r--ssh-keygen.c10
3 files changed, 46 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index fd7377d6f..6adcc31b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
1620010421 2020010421
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
81generates and manages authentication keys for 81generates, manages and converts authentication keys for
82.Xr ssh 1 . 82.Xr ssh 1 .
83.Nm 83.Nm
84defaults to generating an RSA key for use by protocols 1.3 and 1.5; 84defaults to generating a RSA1 key for use by protocols 1.3 and 1.5;
85specifying the 85specifying the
86.Fl t 86.Fl t
87option allows you to create a key for use by protocol 2.0. 87option allows you to create a key for use by protocol 2.0.
@@ -119,7 +119,8 @@ If the passphrase is
119lost or forgotten, you will have to generate a new key and copy the 119lost or forgotten, you will have to generate a new key and copy the
120corresponding public key to other machines. 120corresponding public key to other machines.
121.Pp 121.Pp
122For RSA, there is also a comment field in the key file that is only for 122For RSA1 keys,
123there is also a comment field in the key file that is only for
123convenience to the user to help identify the key. 124convenience to the user to help identify the key.
124The comment can tell what the key is for, or whatever is useful. 125The comment can tell what the key is for, or whatever is useful.
125The comment is initialized to 126The comment is initialized to
@@ -143,8 +144,23 @@ The default is 1024 bits.
143Requests changing the comment in the private and public key files. 144Requests changing the comment in the private and public key files.
144The program will prompt for the file containing the private keys, for 145The program will prompt for the file containing the private keys, for
145passphrase if the key has one, and for the new comment. 146passphrase if the key has one, and for the new comment.
147.It Fl e
148This option will read a private OpenSSH key file and print the key in a
149.Sq SECSH Public Key File Format
150to stdout.
151This option allows exporting keys for use by several commercial
152SSH implementations.
146.It Fl f 153.It Fl f
147Specifies the filename of the key file. 154Specifies the filename of the key file.
155.It Fl i
156This option will read an unencrypted private (or public) key file
157in SSH2-compatible format and print an OpenSSH compatible private
158(or public) key to stdout.
159.Nm
160does also read the
161.Sq SECSH Public Key File Format .
162This option allows importing keys from several commercial
163SSH implementations.
148.It Fl l 164.It Fl l
149Show fingerprint of specified private or public key file. 165Show fingerprint of specified private or public key file.
150.It Fl p 166.It Fl p
@@ -159,6 +175,9 @@ Silence
159Used by 175Used by
160.Pa /etc/rc 176.Pa /etc/rc
161when creating a new key. 177when creating a new key.
178.It Fl y
179This option will read a private
180OpenSSH format file and print an OpenSSH public key to stdout.
162.It Fl t Ar type 181.It Fl t Ar type
163Specifies the type of the key to create. 182Specifies the type of the key to create.
164The possible values are 183The possible values are
@@ -178,16 +197,6 @@ Provides the new comment.
178Provides the new passphrase. 197Provides the new passphrase.
179.It Fl P Ar passphrase 198.It Fl P Ar passphrase
180Provides the (old) passphrase. 199Provides the (old) passphrase.
181.It Fl x
182This option will read a private
183OpenSSH DSA format file and print a SSH2-compatible public key to stdout.
184.It Fl X
185This option will read a unencrypted
186SSH2-compatible private (or public) key file and
187print an OpenSSH compatible private (or public) key to stdout.
188.It Fl y
189This option will read a private
190OpenSSH 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"
15RCSID("$OpenBSD: ssh-keygen.c,v 1.56 2001/04/15 16:58:03 markus Exp $"); 15RCSID("$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)
628void 628void
629usage(void) 629usage(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