man-pag.but 9.3 KB

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