diff options
author | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:52:37 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:52:37 +0000 |
commit | 854156dd39acbde9b4a47ec0fc54a042ea7358e0 (patch) | |
tree | 96755f8590acc2146f4b4ef5b5cdba600e5d9353 /ssh-keygen.0 | |
parent | fad82e8999e790899083f9e22a1841148d746df6 (diff) | |
parent | 053db7da5ce09acdf742789d9d1a05e81d4861d0 (diff) |
Import OpenSSH 3.6.1p2.
Diffstat (limited to 'ssh-keygen.0')
-rw-r--r-- | ssh-keygen.0 | 182 |
1 files changed, 182 insertions, 0 deletions
diff --git a/ssh-keygen.0 b/ssh-keygen.0 new file mode 100644 index 000000000..515d9f94c --- /dev/null +++ b/ssh-keygen.0 | |||
@@ -0,0 +1,182 @@ | |||
1 | SSH-KEYGEN(1) BSD General Commands Manual SSH-KEYGEN(1) | ||
2 | |||
3 | NAME | ||
4 | ssh-keygen - authentication key generation, management and conversion | ||
5 | |||
6 | SYNOPSIS | ||
7 | ssh-keygen [-q] [-b bits] -t type [-N new_passphrase] [-C comment] | ||
8 | [-f output_keyfile] | ||
9 | ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile] | ||
10 | ssh-keygen -i [-f input_keyfile] | ||
11 | ssh-keygen -e [-f input_keyfile] | ||
12 | ssh-keygen -y [-f input_keyfile] | ||
13 | ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile] | ||
14 | ssh-keygen -l [-f input_keyfile] | ||
15 | ssh-keygen -B [-f input_keyfile] | ||
16 | ssh-keygen -D reader | ||
17 | ssh-keygen -U reader [-f input_keyfile] | ||
18 | |||
19 | DESCRIPTION | ||
20 | ssh-keygen generates, manages and converts authentication keys for | ||
21 | ssh(1). ssh-keygen can create RSA keys for use by SSH protocol version 1 | ||
22 | and RSA or DSA keys for use by SSH protocol version 2. The type of key to | ||
23 | be generated is specified with the -t option. | ||
24 | |||
25 | Normally each user wishing to use SSH with RSA or DSA authentication runs | ||
26 | this once to create the authentication key in $HOME/.ssh/identity, | ||
27 | $HOME/.ssh/id_dsa or $HOME/.ssh/id_rsa. Additionally, the system admin- | ||
28 | istrator may use this to generate host keys, as seen in /etc/rc. | ||
29 | |||
30 | Normally this program generates the key and asks for a file in which to | ||
31 | store the private key. The public key is stored in a file with the same | ||
32 | name but M-bM-^@M-^\.pubM-bM-^@M-^] appended. The program also asks for a passphrase. The | ||
33 | passphrase may be empty to indicate no passphrase (host keys must have an | ||
34 | empty passphrase), or it may be a string of arbitrary length. A | ||
35 | passphrase is similar to a password, except it can be a phrase with a | ||
36 | series of words, punctuation, numbers, whitespace, or any string of char- | ||
37 | acters you want. Good passphrases are 10-30 characters long, are not | ||
38 | simple sentences or otherwise easily guessable (English prose has only | ||
39 | 1-2 bits of entropy per character, and provides very bad passphrases), | ||
40 | and contain a mix of upper and lowercase letters, numbers, and non- | ||
41 | alphanumeric characters. The passphrase can be changed later by using | ||
42 | the -p option. | ||
43 | |||
44 | There is no way to recover a lost passphrase. If the passphrase is lost | ||
45 | or forgotten, a new key must be generated and copied to the corresponding | ||
46 | public key to other machines. | ||
47 | |||
48 | For RSA1 keys, there is also a comment field in the key file that is only | ||
49 | for convenience to the user to help identify the key. The comment can | ||
50 | tell what the key is for, or whatever is useful. The comment is initial- | ||
51 | ized to M-bM-^@M-^\user@hostM-bM-^@M-^] when the key is created, but can be changed using the | ||
52 | -c option. | ||
53 | |||
54 | After a key is generated, instructions below detail where the keys should | ||
55 | be placed to be activated. | ||
56 | |||
57 | The options are as follows: | ||
58 | |||
59 | -b bits | ||
60 | Specifies the number of bits in the key to create. Minimum is | ||
61 | 512 bits. Generally, 1024 bits is considered sufficient. The | ||
62 | default is 1024 bits. | ||
63 | |||
64 | -c Requests changing the comment in the private and public key | ||
65 | files. This operation is only supported for RSA1 keys. The pro- | ||
66 | gram will prompt for the file containing the private keys, for | ||
67 | the passphrase if the key has one, and for the new comment. | ||
68 | |||
69 | -e This option will read a private or public OpenSSH key file and | ||
70 | print the key in a M-bM-^@M-^XSECSH Public Key File FormatM-bM-^@M-^Y to stdout. | ||
71 | This option allows exporting keys for use by several commercial | ||
72 | SSH implementations. | ||
73 | |||
74 | -f filename | ||
75 | Specifies the filename of the key file. | ||
76 | |||
77 | -i This option will read an unencrypted private (or public) key file | ||
78 | in SSH2-compatible format and print an OpenSSH compatible private | ||
79 | (or public) key to stdout. ssh-keygen also reads the M-bM-^@M-^XSECSH | ||
80 | Public Key File FormatM-bM-^@M-^Y. This option allows importing keys from | ||
81 | several commercial SSH implementations. | ||
82 | |||
83 | -l Show fingerprint of specified public key file. Private RSA1 keys | ||
84 | are also supported. For RSA and DSA keys ssh-keygen tries to | ||
85 | find the matching public key file and prints its fingerprint. | ||
86 | |||
87 | -p Requests changing the passphrase of a private key file instead of | ||
88 | creating a new private key. The program will prompt for the file | ||
89 | containing the private key, for the old passphrase, and twice for | ||
90 | the new passphrase. | ||
91 | |||
92 | -q Silence ssh-keygen. Used by /etc/rc when creating a new key. | ||
93 | |||
94 | -y This option will read a private OpenSSH format file and print an | ||
95 | OpenSSH public key to stdout. | ||
96 | |||
97 | -t type | ||
98 | Specifies the type of the key to create. The possible values are | ||
99 | M-bM-^@M-^\rsa1M-bM-^@M-^] for protocol version 1 and M-bM-^@M-^\rsaM-bM-^@M-^] or M-bM-^@M-^\dsaM-bM-^@M-^] for protocol | ||
100 | version 2. | ||
101 | |||
102 | -B Show the bubblebabble digest of specified private or public key | ||
103 | file. | ||
104 | |||
105 | -C comment | ||
106 | Provides the new comment. | ||
107 | |||
108 | -D reader | ||
109 | Download the RSA public key stored in the smartcard in reader. | ||
110 | |||
111 | -N new_passphrase | ||
112 | Provides the new passphrase. | ||
113 | |||
114 | -P passphrase | ||
115 | Provides the (old) passphrase. | ||
116 | |||
117 | -U reader | ||
118 | Upload an existing RSA private key into the smartcard in reader. | ||
119 | |||
120 | FILES | ||
121 | $HOME/.ssh/identity | ||
122 | Contains the protocol version 1 RSA authentication identity of | ||
123 | the user. This file should not be readable by anyone but the | ||
124 | user. It is possible to specify a passphrase when generating the | ||
125 | key; that passphrase will be used to encrypt the private part of | ||
126 | this file using 3DES. This file is not automatically accessed by | ||
127 | ssh-keygen but it is offered as the default file for the private | ||
128 | key. ssh(1) will read this file when a login attempt is made. | ||
129 | |||
130 | $HOME/.ssh/identity.pub | ||
131 | Contains the protocol version 1 RSA public key for authentica- | ||
132 | tion. The contents of this file should be added to | ||
133 | $HOME/.ssh/authorized_keys on all machines where the user wishes | ||
134 | to log in using RSA authentication. There is no need to keep the | ||
135 | contents of this file secret. | ||
136 | |||
137 | $HOME/.ssh/id_dsa | ||
138 | Contains the protocol version 2 DSA authentication identity of | ||
139 | the user. This file should not be readable by anyone but the | ||
140 | user. It is possible to specify a passphrase when generating the | ||
141 | key; that passphrase will be used to encrypt the private part of | ||
142 | this file using 3DES. This file is not automatically accessed by | ||
143 | ssh-keygen but it is offered as the default file for the private | ||
144 | key. ssh(1) will read this file when a login attempt is made. | ||
145 | |||
146 | $HOME/.ssh/id_dsa.pub | ||
147 | Contains the protocol version 2 DSA public key for authentica- | ||
148 | tion. The contents of this file should be added to | ||
149 | $HOME/.ssh/authorized_keys on all machines where the user wishes | ||
150 | to log in using public key authentication. There is no need to | ||
151 | keep the contents of this file secret. | ||
152 | |||
153 | $HOME/.ssh/id_rsa | ||
154 | Contains the protocol version 2 RSA authentication identity of | ||
155 | the user. This file should not be readable by anyone but the | ||
156 | user. It is possible to specify a passphrase when generating the | ||
157 | key; that passphrase will be used to encrypt the private part of | ||
158 | this file using 3DES. This file is not automatically accessed by | ||
159 | ssh-keygen but it is offered as the default file for the private | ||
160 | key. ssh(1) will read this file when a login attempt is made. | ||
161 | |||
162 | $HOME/.ssh/id_rsa.pub | ||
163 | Contains the protocol version 2 RSA public key for authentica- | ||
164 | tion. The contents of this file should be added to | ||
165 | $HOME/.ssh/authorized_keys on all machines where the user wishes | ||
166 | to log in using public key authentication. There is no need to | ||
167 | keep the contents of this file secret. | ||
168 | |||
169 | AUTHORS | ||
170 | OpenSSH is a derivative of the original and free ssh 1.2.12 release by | ||
171 | Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo | ||
172 | de Raadt and Dug Song removed many bugs, re-added newer features and cre- | ||
173 | ated OpenSSH. Markus Friedl contributed the support for SSH protocol | ||
174 | versions 1.5 and 2.0. | ||
175 | |||
176 | SEE ALSO | ||
177 | ssh(1), ssh-add(1), ssh-agent(1), sshd(8) | ||
178 | |||
179 | J. Galbraith and R. Thayer, SECSH Public Key File Format, draft-ietf- | ||
180 | secsh-publickeyfile-01.txt, March 2001, work in progress material. | ||
181 | |||
182 | BSD September 25, 1999 BSD | ||