man-pag.but 9.4 KB

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