man-pag.but 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. \cfg{man-identity}{pageant}{1}{2015-05-19}{PuTTY tool suite}{PuTTY tool suite}
  2. \H{pageant-manpage} Man page for Pageant
  3. \S{pageant-manpage-name} NAME
  4. \cw{pageant} - PuTTY SSH authentication agent
  5. \S{pageant-manpage-synopsis} SYNOPSIS
  6. \c pageant ( -X | -T | --permanent | --debug ) [ key-file... ]
  7. \e bbbbbbb bb bb bbbbbbbbbbb bbbbbbb iiiiiiii
  8. \c pageant [ key-file... ] --exec command [ args... ]
  9. \e bbbbbbb iiiiiiii bbbbbb iiiiiii iiii
  10. \c pageant -a key-file...
  11. \e bbbbbbb bb iiiiiiii
  12. \c pageant ( -d | --public | --public-openssh ) key-identifier...
  13. \e bbbbbbb bb bbbbbbbb bbbbbbbbbbbbbbbb iiiiiiiiiiiiii
  14. \c pageant -D
  15. \e bbbbbbb bb
  16. \c pageant -l
  17. \e bbbbbbb bb
  18. \c pageant --askpass prompt
  19. \e bbbbbbb bbbbbbbbb iiiiii
  20. \S{pageant-manpage-description} DESCRIPTION
  21. \c{pageant} is both an SSH authentication agent, and also a tool for
  22. communicating with an already-running agent.
  23. When running as an SSH agent, it listens on a Unix-domain socket for
  24. connections from client processes running under your user id. Clients
  25. can load SSH private keys into the agent, or request signatures on a
  26. given message from a key already in the agent. This permits one-touch
  27. authentication by SSH client programs, if Pageant is holding a key
  28. that the server they are connecting to will accept.
  29. \c{pageant} can also act as a client program itself, communicating
  30. with an already-running agent to add or remove keys, list the keys, or
  31. extract their public half.
  32. The agent protocol used by \c{pageant} is compatible with the PuTTY
  33. tools and also with other implementations such as OpenSSH's SSH client
  34. and \e{ssh-agent(1)}.
  35. To run \c{pageant} as an agent, you must provide an option to tell it
  36. what its \e{lifetime} should be. Typically you would probably want
  37. Pageant to last for the duration of a login session, in which case you
  38. should use either \cw{-X} or \cw{-T}, depending on whether your login
  39. session is GUI or purely terminal-based respectively. For example, in
  40. your X session startup script you might write
  41. \c eval $(pageant -X)
  42. \e bbbbbbbbbbbbbbbbbb
  43. which will cause Pageant to start running, monitor the X server to
  44. notice when your session terminates (and then it will terminate too),
  45. and print on standard output some shell commands to set environment
  46. variables that client processes will need to find the running agent.
  47. In a terminal-based login, you could do almost exactly the same thing
  48. but with \cw{-T}:
  49. \c eval $(pageant -T)
  50. \e bbbbbbbbbbbbbbbbbb
  51. This will cause Pageant to tie its lifetime to that of your
  52. controlling terminal: when you log out, and the terminal device ceases
  53. to be associated with your session, Pageant will notice that it has no
  54. controlling terminal any more, and will terminate automatically.
  55. In either of these modes, you can also add one or more private keys as
  56. extra command-line arguments, e.g.
  57. \c eval $(pageant -T ~/.ssh/key.ppk)
  58. \e bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  59. in which case Pageant will prompt for the keys' passphrases (if any)
  60. and start the agent with those keys already loaded. Passphrase prompts
  61. will use the controlling terminal if one is available, or failing that
  62. the GUI if one of those is available. (The prompt method can be
  63. overridden with the \cw{--gui-prompt} or \cw{--tty-prompt} options.)
  64. If neither is available, no passphrase prompting can be done.
  65. To use Pageant to talk to an existing agent, you can add new keys
  66. using \cw{-a}, list the current set of keys' fingerprints and comments
  67. with \cw{-l}, extract the full public half of any key using
  68. \cw{--public} or \cw{--public-openssh}, delete a key using \cw{-d}, or
  69. delete all keys using \cw{-D}.
  70. \S{pageant-manpage-lifetime} LIFETIME
  71. The following options are called \e{lifetime modes}. They all request
  72. Pageant to operate in agent mode; each one specifies a different
  73. method for Pageant to start up and know when to shut down.
  74. \dt \cw{-X}
  75. \dd Pageant will open a connection to your X display, and when that
  76. connection is lost, it will terminate. This gives it the same lifetime
  77. as your GUI login session, so in this mode it is suitable for running
  78. from a startup script such as \cw{.xsession}. The actual agent will be
  79. a subprocess; the main Pageant process will terminate immediately,
  80. after printing environment-variable setting commands on standard
  81. output which should be installed in any process wanting to communicate
  82. with the agent.
  83. \lcont{
  84. The usual approach would be to run
  85. \c eval $(pageant -X)
  86. \e bbbbbbbbbbbbbbbbbb
  87. in an X session startup script. However, other possibilities exist,
  88. such as directing the standard output of \cq{pageant -X} to a file
  89. which is then sourced by any new shell.
  90. }
  91. \dt \cw{-T}
  92. \dd Pageant will tie its lifetime to that of the login session running
  93. on its controlling terminal, by noticing when it ceases to have a
  94. controlling terminal (which will automatically happen as a side effect
  95. of the session leader process terminating). Like \cw{-X}, Pageant will
  96. print environment-variable commands on standard output.
  97. \dt \cw{--exec} \e{command}
  98. \dd Pageant will run the provided command as a subprocess, preloaded
  99. with the appropriate environment variables to access the agent it
  100. starts up. When the subprocess terminates, Pageant will terminate as
  101. well.
  102. \lcont{
  103. All arguments on Pageant's command line after \cw{--exec} will be
  104. treated as part of the command to run, even if they look like other
  105. valid Pageant options or key files.
  106. }
  107. \dt \cw{--permanent}
  108. \dd Pageant will fork off a subprocess to be the agent, and print
  109. environment-variable commands on standard output, like \cw{-X} and
  110. \cw{-T}. However, in this case, it will make no effort to limit its
  111. lifetime in any way; it will simply run permanently, unless manually
  112. killed. The environment variable \cw{SSH_AGENT_PID}, set by the
  113. commands printed by Pageant, permits the agent process to be found for
  114. this purpose.
  115. \lcont{
  116. This option is not recommended, because any method of manually killing
  117. the agent carries the risk of the session terminating unexpectedly
  118. before it manages to happen.
  119. }
  120. \dt \cw{--debug}
  121. \dd Pageant will run in the foreground, without forking. It will print
  122. its environment variable setup commands on standard output, and then it
  123. will log all agent activity to standard output as well. This is useful
  124. for debugging what Pageant itself is doing, or what another process is
  125. doing to it.
  126. \S{pageant-manpage-client} CLIENT OPTIONS
  127. The following options tell Pageant to operate in client mode,
  128. contacting an existing agent via environment variables that it should
  129. already have set.
  130. \dt \cw{-a} \e{key-files}
  131. \dd Load the specified private key file(s), decrypt them if necessary
  132. by prompting for their passphrases (with the same choice of user
  133. interfaces as in agent mode), and add them to the already-running agent.
  134. \lcont{
  135. The private key files must be in PuTTY's \cw{.ppk} file format.
  136. }
  137. \dt \cw{-l}
  138. \dd List the keys currently in the running agent. Each key's
  139. fingerprint and comment string will be shown.
  140. \dt \cw{--public} \e{key-identifiers}
  141. \dd Print the public half of each specified key, in the RFC 4716
  142. standard format (multiple lines, starting with \cq{---- BEGIN SSH2
  143. PUBLIC KEY ----}).
  144. \lcont{
  145. Each \e{key-identifier} can be any of the following:
  146. \b The name of a file containing the key, either the whole key (again
  147. in \cw{.ppk} format) or just its public half.
  148. \b The key's comment string, as shown by \cw{pageant -l}.
  149. \b Enough hex digits of the key's fingerprint to be unique among keys
  150. currently loaded into the agent.
  151. If Pageant can uniquely identify one key by interpreting the
  152. \e{key-identifier} in any of these ways, it will assume that key was
  153. the one you meant. If it cannot, you will have to specify more detail.
  154. If you find that your desired \e{key-identifier} string can be validly
  155. interpreted as more than one of the above \e{kinds} of identification,
  156. you can disambiguate by prefixing it with \cq{file:}, \cq{comment:} or
  157. \cq{fp:} to indicate that it is a filename, comment string or
  158. fingerprint prefix respectively.
  159. }
  160. \dt \cw{--public-openssh} \e{key-identifiers}, \cw{-L} \e{key-identifiers}
  161. \dd Print the public half of each specified key, in the one-line
  162. format used by OpenSSH, suitable for putting in
  163. \cw{.ssh/authorized_keys} files.
  164. \dt \cw{-d} \e{key-identifiers}
  165. \dd Delete each specified key from the agent's memory, so that the
  166. agent will no longer serve it to clients unless it is loaded in again
  167. using \cw{pageant -a}.
  168. \dt \cw{-D}
  169. \dd Delete all keys from the agent's memory, leaving it completely
  170. empty.
  171. \S{pageant-manpage-askpass} SSH-ASKPASS REPLACEMENT
  172. \dt \cw{--askpass} \e{prompt}
  173. \dd With this option, \c{pageant} acts as an \e{ssh-askpass(1)}
  174. replacement, rather than performing any SSH agent functionality. This
  175. may be useful if you prefer Pageant's GUI prompt style, which
  176. minimises information leakage about your passphrase length in its
  177. visual feedback, compared to other \e{ssh-askpass(1)} implementations.
  178. \lcont{
  179. \c{pageant --askpass} implements the standard \e{ssh-askpass(1)}
  180. interface: it can be passed a prompt to display (as a single argument)
  181. and, if successful, prints the passphrase on standard output and
  182. returns a zero exit status. Typically you would use the environment
  183. variable \cw{SSH_ASKPASS} to tell other programs to use \c{pageant} in
  184. this way.
  185. }
  186. \S{pageant-manpage-options} OPTIONS
  187. \dt \cw{-v}
  188. \dd Verbose mode. When Pageant runs in agent mode, this option causes
  189. it to log all agent activity to its standard error. For example, you
  190. might run
  191. \lcont{
  192. \c eval $(pageant -X -v 2>~/.pageant.log)
  193. \e bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  194. and expect a list of all signatures requested by agent clients to
  195. build up in that log file.
  196. The log information is the same as that produced by the \cw{--debug}
  197. lifetime option, but \cw{--debug} sends it to standard output (since
  198. that is the main point of debugging mode) whereas \cw{-v} in all other
  199. lifetime modes sends the same log data to standard error (being a
  200. by-product of the program's main purpose). Using \cw{-v} in
  201. \cw{--debug} mode has no effect: the log still goes to standard
  202. output.
  203. }
  204. \dt \cw{-s}, \cw{-c}
  205. \dd Force Pageant to output its environment setup commands in the
  206. style of POSIX / Bourne shells (\cw{-s}) or C shells (\cw{-c})
  207. respectively. If neither option is given, Pageant will guess based on
  208. whether the environment variable \cw{SHELL} has a value ending in
  209. \cq{csh}.
  210. \dt \cw{--gui-prompt}, \cw{--tty-prompt}
  211. \dd Force Pageant to prompt for key passphrases with a particular
  212. method (GUI or terminal) rather than trying to guess the most
  213. appropriate method as described above. (These options are relevant
  214. whenever an encrypted key filename is specified to \c{pageant},
  215. and in \c{--askpass} mode.)
  216. \dt \cw{--help}
  217. \dd Print a brief summary of command-line options and terminate.
  218. \dt \cw{--version}, \cw{-V}
  219. \dd Print the version of Pageant.
  220. \dt \cw{--}
  221. \dd Cause all subsequent arguments to be treated as key file names,
  222. even if they look like options.