]> asedeno.scripts.mit.edu Git - PuTTY.git/blob - doc/man-pg.but
Update man page for puttygen --random-device.
[PuTTY.git] / doc / man-pg.but
1 \cfg{man-identity}{puttygen}{1}{2004-03-24}{PuTTY tool suite}{PuTTY tool suite}
2
3 \H{puttygen-manpage} Man page for PuTTYgen
4
5 \S{puttygen-manpage-name} NAME
6
7 \cw{puttygen} - public-key generator for the PuTTY tools
8
9 \S{puttygen-manpage-synopsis} SYNOPSIS
10
11 \c puttygen ( keyfile | -t keytype [ -b bits ] )
12 \e bbbbbbbb   iiiiiii   bb iiiiiii   bb iiii
13 \c          [ -C new-comment ] [ -P ] [ -q ]
14 \e            bb iiiiiiiiiii     bb     bb
15 \c          [ -O output-type | -l | -L | -p ]
16 \e            bb iiiiiiiiiii   bb   bb   bb
17 \c          [ -o output-file ]
18 \e            bb iiiiiiiiiii
19
20 \S{puttygen-manpage-description} DESCRIPTION
21
22 \c{puttygen} is a tool to generate and manipulate SSH public and
23 private key pairs. It is part of the PuTTY suite, although it can
24 also interoperate with the private key formats used by some other
25 SSH clients.
26
27 When you run \c{puttygen}, it does three things. Firstly, it either
28 loads an existing key file (if you specified \e{keyfile}), or
29 generates a new key (if you specified \e{keytype}). Then, it
30 optionally makes modifications to the key (changing the comment
31 and/or the passphrase); finally, it outputs the key, or some
32 information about the key, to a file.
33
34 All three of these phases are controlled by the options described in
35 the following section.
36
37 \S{puttygen-manpage-options} OPTIONS
38
39 In the first phase, \c{puttygen} either loads or generates a key.
40 Note that generating a key requires random data, which can cause
41 \c{puttygen} to pause, possibly for some time if your system does
42 not have much randomness available.
43
44 The options to control this phase are:
45
46 \dt \e{keyfile}
47
48 \dd Specify a private key file to be loaded. This private key file can
49 be in the (de facto standard) SSH-1 key format, or in PuTTY's SSH-2
50 key format, or in either of the SSH-2 private key formats used by
51 OpenSSH and ssh.com's implementation.
52
53 \dt \cw{\-t} \e{keytype}
54
55 \dd Specify a type of key to generate. The acceptable values here are
56 \c{rsa}, \c{dsa}, \c{ecdsa}, and \c{ed25519} (to generate SSH-2 keys),
57 and \c{rsa1} (to generate SSH-1 keys).
58
59 \dt \cw{\-b} \e{bits}
60
61 \dd Specify the size of the key to generate, in bits. Default is 2048.
62
63 \dt \cw{\-q}
64
65 \dd Suppress the progress display when generating a new key.
66
67 \dt \cw{\-\-old\-passphrase} \e{file}
68
69 \dd Specify a file name; the first line will be read from this file
70 (removing any trailing newline) and used as the old passphrase.
71 \s{CAUTION:} If the passphrase is important, the file should be stored
72 on a temporary filesystem or else securely erased after use.
73
74 \dt \cw{\-\-random\-device} \e{device}
75
76 \dd Specify device to read entropy from (default \c{/dev/random}).
77
78 In the second phase, \c{puttygen} optionally alters properties of
79 the key it has loaded or generated. The options to control this are:
80
81 \dt \cw{\-C} \e{new\-comment}
82
83 \dd Specify a comment string to describe the key. This comment string
84 will be used by PuTTY to identify the key to you (when asking you to
85 enter the passphrase, for example, so that you know which passphrase
86 to type).
87
88 \dt \cw{\-P}
89
90 \dd Indicate that you want to change the key's passphrase. This is
91 automatic when you are generating a new key, but not when you are
92 modifying an existing key.
93
94 In the third phase, \c{puttygen} saves the key or information
95 about it. The options to control this are:
96
97 \dt \cw{\-O} \e{output\-type}
98
99 \dd Specify the type of output you want \c{puttygen} to produce.
100 Acceptable options are:
101
102 \lcont{
103
104 \dt \cw{private}
105
106 \dd Save the private key in a format usable by PuTTY. This will either
107 be the standard SSH-1 key format, or PuTTY's own SSH-2 key format.
108
109 \dt \cw{public}
110
111 \dd Save the public key only. For SSH-1 keys, the standard public key
112 format will be used (\q{\cw{1024 37 5698745}...}). For SSH-2 keys, the
113 public key will be output in the format specified by RFC 4716,
114 which is a multi-line text file beginning with the line
115 \q{\cw{---- BEGIN SSH2 PUBLIC KEY ----}}.
116
117 \dt \cw{public-openssh}
118
119 \dd Save the public key only, in a format usable by OpenSSH. For SSH-1
120 keys, this output format behaves identically to \c{public}. For
121 SSH-2 keys, the public key will be output in the OpenSSH format,
122 which is a single line (\q{\cw{ssh-rsa AAAAB3NzaC1yc2}...}).
123
124 \dt \cw{fingerprint}
125
126 \dd Print the fingerprint of the public key. All fingerprinting
127 algorithms are believed compatible with OpenSSH.
128
129 \dt \cw{private-openssh}
130
131 \dd Save an SSH-2 private key in OpenSSH's format, using the oldest
132 format available to maximise backward compatibility. This option is not
133 permitted for SSH-1 keys.
134
135 \dt \cw{private-openssh-new}
136
137 \dd As \c{private-openssh}, except that it forces the use of OpenSSH's
138 newer format even for RSA, DSA, and ECDSA keys.
139
140 \dt \cw{private-sshcom}
141
142 \dd Save an SSH-2 private key in ssh.com's format. This option is not
143 permitted for SSH-1 keys.
144
145 If no output type is specified, the default is \c{private}.
146
147 }
148
149 \dt \cw{\-o} \e{output\-file}
150
151 \dd Specify the file where \c{puttygen} should write its output. If
152 this option is not specified, \c{puttygen} will assume you want to
153 overwrite the original file if the input and output file types are
154 the same (changing a comment or passphrase), and will assume you
155 want to output to stdout if you are asking for a public key or
156 fingerprint. Otherwise, the \c{\-o} option is required.
157
158 \dt \cw{\-l}
159
160 \dd Synonym for \q{\cw{-O fingerprint}}.
161
162 \dt \cw{\-L}
163
164 \dd Synonym for \q{\cw{-O public-openssh}}.
165
166 \dt \cw{\-p}
167
168 \dd Synonym for \q{\cw{-O public}}.
169
170 \dt \cw{\-\-new\-passphrase} \e{file}
171
172 \dd Specify a file name; the first line will be read from this file
173 (removing any trailing newline) and used as the new passphrase. If the
174 file is empty then the saved key will be unencrypted. \s{CAUTION:} If
175 the passphrase is important, the file should be stored on a temporary
176 filesystem or else securely erased after use.
177
178 The following options do not run PuTTYgen as normal, but print
179 informational messages and then quit:
180
181 \dt \cw{\-h}, \cw{\-\-help}
182
183 \dd Display a message summarizing the available options.
184
185 \dt \cw{\-V}, \cw{\-\-version}
186
187 \dd Display the version of PuTTYgen.
188
189 \dt \cw{\-\-pgpfp}
190
191 \dd Display the fingerprints of the PuTTY PGP Master Keys, to aid
192 in verifying new files released by the PuTTY team.
193
194 \S{puttygen-manpage-examples} EXAMPLES
195
196 To generate an SSH-2 RSA key pair and save it in PuTTY's own format
197 (you will be prompted for the passphrase):
198
199 \c puttygen -t rsa -C "my home key" -o mykey.ppk
200
201 To generate a larger (4096-bit) key:
202
203 \c puttygen -t rsa -b 4096 -C "my home key" -o mykey.ppk
204
205 To change the passphrase on a key (you will be prompted for the old
206 and new passphrases):
207
208 \c puttygen -P mykey.ppk
209
210 To change the comment on a key:
211
212 \c puttygen -C "new comment" mykey.ppk
213
214 To convert a key into OpenSSH's private key format:
215
216 \c puttygen mykey.ppk -O private-openssh -o my-openssh-key
217
218 To convert a key \e{from} another format (\c{puttygen} will
219 automatically detect the input key type):
220
221 \c puttygen my-ssh.com-key -o mykey.ppk
222
223 To display the fingerprint of a key (some key types require a
224 passphrase to extract even this much information):
225
226 \c puttygen -l mykey.ppk
227
228 To add the OpenSSH-format public half of a key to your authorised
229 keys file:
230
231 \c puttygen -L mykey.ppk >> $HOME/.ssh/authorized_keys