man-pg.but 7.6 KB

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