man-pg.but 7.0 KB

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