1 | .\" -*- nroff -*- |
---|
2 | .\" |
---|
3 | .\" ssh-keygen.1 |
---|
4 | .\" |
---|
5 | .\" Author: Tatu Ylonen <ylo@cs.hut.fi> |
---|
6 | .\" |
---|
7 | .\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
---|
8 | .\" All rights reserved |
---|
9 | .\" |
---|
10 | .\" Created: Sat Apr 22 23:55:14 1995 ylo |
---|
11 | .\" |
---|
12 | .\" $Id: ssh-keygen.1,v 1.1.1.2 1999-03-08 17:42:58 danw Exp $ |
---|
13 | .\" $Log: not supported by cvs2svn $ |
---|
14 | .\" Revision 1.10 1998/07/08 00:40:42 kivinen |
---|
15 | .\" Changed to do similar commercial #ifdef processing than other |
---|
16 | .\" files. |
---|
17 | .\" |
---|
18 | .\" Revision 1.9 1997/04/27 21:59:09 kivinen |
---|
19 | .\" Added F-SECURE stuff. |
---|
20 | .\" |
---|
21 | .\" Revision 1.8 1997/03/25 05:42:26 kivinen |
---|
22 | .\" Small changes from Sakari. Changed ylo's email to @ssh.fi. |
---|
23 | .\" |
---|
24 | .\" Revision 1.7 1996/10/03 23:27:59 ylo |
---|
25 | .\" A minor clarification. |
---|
26 | .\" |
---|
27 | .\" Revision 1.6 1996/10/03 23:27:02 ylo |
---|
28 | .\" Fixed a typo. |
---|
29 | .\" |
---|
30 | .\" Revision 1.5 1996/10/03 16:54:57 ttsalo |
---|
31 | .\" New feature: updating the keyfiles' cipher type. |
---|
32 | .\" |
---|
33 | .\" Revision 1.4 1996/09/29 01:00:38 ylo |
---|
34 | .\" Updated to use 3DES. |
---|
35 | .\" |
---|
36 | .\" Revision 1.3 1996/08/06 07:55:01 ylo |
---|
37 | .\" Added a note about empty passphrases. |
---|
38 | .\" |
---|
39 | .\" Revision 1.2 1996/05/30 16:10:50 ylo |
---|
40 | .\" Documented -f. |
---|
41 | .\" |
---|
42 | .\" Revision 1.1.1.1 1996/02/18 21:38:13 ylo |
---|
43 | .\" Imported ssh-1.2.13. |
---|
44 | .\" |
---|
45 | .\" Revision 1.3 1995/08/29 22:30:01 ylo |
---|
46 | .\" Improved manual pages from Andrew Macpherson. |
---|
47 | .\" |
---|
48 | .\" Revision 1.2 1995/07/13 01:36:30 ylo |
---|
49 | .\" Removed "Last modified" header. |
---|
50 | .\" Added cvs log. |
---|
51 | .\" |
---|
52 | .\" $Endlog$ |
---|
53 | .\" |
---|
54 | .\" |
---|
55 | .\" |
---|
56 | .\" |
---|
57 | .\" #ifndef F_SECURE_COMMERCIAL |
---|
58 | .TH SSH-KEYGEN 1 "November 8, 1995" "SSH" "SSH" |
---|
59 | .\" #endif F_SECURE_COMMERCIAL |
---|
60 | |
---|
61 | .SH NAME |
---|
62 | ssh-keygen \- authentication key pair generation |
---|
63 | |
---|
64 | .SH SYNOPSIS |
---|
65 | .LP |
---|
66 | .B ssh-keygen |
---|
67 | [\c |
---|
68 | .BI \-b \ bits\c |
---|
69 | ] |
---|
70 | [\c |
---|
71 | .BI \-f \ file\c |
---|
72 | ] |
---|
73 | [\c |
---|
74 | .BI \-N \ new_passphrase\c |
---|
75 | ] |
---|
76 | [\c |
---|
77 | .BI \-C \ comment\c |
---|
78 | ] |
---|
79 | |
---|
80 | .B "ssh-keygen \-p |
---|
81 | [\c |
---|
82 | .BI \-P \ old_passphrase\c |
---|
83 | ] |
---|
84 | [\c |
---|
85 | .BI \-N \ new_passphrase\c |
---|
86 | ] |
---|
87 | |
---|
88 | .B "ssh-keygen \-c |
---|
89 | [\c |
---|
90 | .BI \-P \ passphrase\c |
---|
91 | ] |
---|
92 | [\c |
---|
93 | .BI \-C \ comment\c |
---|
94 | ] |
---|
95 | |
---|
96 | .B "ssh-keygen \-u |
---|
97 | [\c |
---|
98 | .BI \-f \ file\c |
---|
99 | ] |
---|
100 | [\c |
---|
101 | .BI \-P \ passphrase\c |
---|
102 | ] |
---|
103 | |
---|
104 | .SH DESCRIPTION |
---|
105 | .LP |
---|
106 | .B Ssh-keygen |
---|
107 | generates and manages authentication keys for |
---|
108 | .BR ssh (1). |
---|
109 | Normally each user wishing to use |
---|
110 | .B ssh |
---|
111 | with RSA authentication runs this once to create the authentication |
---|
112 | key in |
---|
113 | .IR \&$HOME/\s+2.\s0ssh/identity ". |
---|
114 | Additionally, the system administrator may use this to generate host keys. |
---|
115 | .LP |
---|
116 | Normally this program generates the key and asks for a file in which |
---|
117 | to store the private key. The public key is stored in a file with the |
---|
118 | same name but ".pub" appended. The program also asks for a |
---|
119 | passphrase. The passphrase may be empty to indicate no passphrase |
---|
120 | (host keys must have empty passphrase), or it may be a string of |
---|
121 | arbitrary length. Good passphrases are 10-30 characters long and are |
---|
122 | not simple sentences or otherwise easily guessable (English |
---|
123 | prose has only 1-2 bits of entropy per word, and provides very bad |
---|
124 | passphrases). The passphrase can be changed later by using the |
---|
125 | .B \-p |
---|
126 | option. |
---|
127 | .LP |
---|
128 | There is no way to recover a lost passphrase. If the passphrase is |
---|
129 | lost or forgotten, you will have to generate a new key and copy the |
---|
130 | corresponding public key to other machines. |
---|
131 | .LP |
---|
132 | USING GOOD, UNGUESSABLE PASSPHRASES IS STRONGLY RECOMMENDED. EMPTY |
---|
133 | PASSPHRASES SHOULD NOT BE USED UNLESS YOU UNDERSTAND WHAT YOU ARE DOING. |
---|
134 | .LP |
---|
135 | There is also a comment field in the key file that is only for |
---|
136 | convenience to the user to help identify the key. The comment can |
---|
137 | tell what the key is for, or whatever is useful. The comment is |
---|
138 | initialized to user@host when the key is created, but can be changed |
---|
139 | using the |
---|
140 | .B \-c |
---|
141 | option. |
---|
142 | .LP |
---|
143 | The cipher to be used when encrypting keys with a passphrase is |
---|
144 | defined in ssh.h. Using the |
---|
145 | .B \-u |
---|
146 | option, keys encrypted in any supported cipher can be updated to |
---|
147 | use this default cipher. |
---|
148 | |
---|
149 | .SH OPTIONS |
---|
150 | .TP 0.6i |
---|
151 | .BI \-b \ bits |
---|
152 | Specifies the number of bits in the key to create. Minimum is 512 |
---|
153 | bits. Generally 1024 bits is considered sufficient, and key sizes |
---|
154 | above that no longer improve security but make things slower. The |
---|
155 | default is 1024 bits. |
---|
156 | .TP |
---|
157 | .B \-c |
---|
158 | Requests changing the comment in the private and public key files. |
---|
159 | The program will prompt for the file containing the private keys, for |
---|
160 | passphrase if the key has one, and for the new comment. |
---|
161 | .TP |
---|
162 | .B \-f |
---|
163 | Specifies the file name in which to load/store the key. |
---|
164 | .TP |
---|
165 | .B \-p |
---|
166 | Requests changing the passphrase of a private key file instead of |
---|
167 | creating a new private key. The program will prompt for the file |
---|
168 | containing the private key, for the old passphrase, and twice for the |
---|
169 | new passphrase. |
---|
170 | .TP |
---|
171 | .B \-u |
---|
172 | Requests that the key's cipher is changed to the current default |
---|
173 | cipher (determined at compile-time - currently 3DES). |
---|
174 | .TP |
---|
175 | .B \-C |
---|
176 | Provides the new comment. |
---|
177 | .TP |
---|
178 | .B \-N |
---|
179 | Provides the new passphrase. |
---|
180 | .TP |
---|
181 | .B \-P |
---|
182 | Provides the (old) passphrase. |
---|
183 | |
---|
184 | .SH FILES |
---|
185 | .TP 0.6i |
---|
186 | .I \&$HOME/\s+2.\s0ssh/random_seed |
---|
187 | Used for seeding the random number generator. This file should not be |
---|
188 | readable by anyone but the user. This file is created the first time |
---|
189 | the program is run, and is updated every time. |
---|
190 | .TP |
---|
191 | .I \&$HOME/\s+2.\s0ssh/identity |
---|
192 | Contains the RSA authentication identity of the user. This file |
---|
193 | should not be readable by anyone but the user. It is possible to |
---|
194 | specify a passphrase when generating the key; that passphrase will be |
---|
195 | used to encrypt the private part of this file using 3DES. This file |
---|
196 | is not automatically accessed by |
---|
197 | .BR ssh-keygen ", |
---|
198 | but it is offered as the default file for the private key. |
---|
199 | .TP |
---|
200 | .I \&$HOME/\s+2.\s0ssh/identity.pub |
---|
201 | Contains the public key for authentication. The contents of this file |
---|
202 | should be added to \f4$HOME/\s+2.\s0ssh/authorized_keys\f1 on all machines |
---|
203 | where you wish to log in using RSA authentication. There is no |
---|
204 | need to keep the contents of this file secret. |
---|
205 | |
---|
206 | .SH AUTHOR |
---|
207 | .LP |
---|
208 | Tatu Ylonen <ylo@ssh.fi> |
---|
209 | |
---|
210 | .SH SEE ALSO |
---|
211 | .LP |
---|
212 | .BR ssh (1), |
---|
213 | .BR sshd (8), |
---|
214 | .BR ssh-agent (1), |
---|
215 | .BR ssh-add (1) |
---|