summaryrefslogtreecommitdiff
path: root/man/man1/monkeysphere.1
blob: 345e1d8135190c1fb87b586bbcba996ea4801d20 (plain)
  1. .TH MONKEYSPHERE "1" "June 2008" "monkeysphere 0.1" "User Commands"
  2. .SH NAME
  3. monkeysphere \- Monkeysphere client user interface
  4. .SH SYNOPSIS
  5. .B monkeysphere \fIsubcommand\fP [\fIargs\fP]
  6. .SH DESCRIPTION
  7. \fBMonkeysphere\fP is a framework to leverage the OpenPGP web of trust
  8. for OpenSSH authentication. OpenPGP keys are tracked via GnuPG, and
  9. added to the authorized_keys and known_hosts files used by OpenSSH for
  10. connection authentication.
  11. \fBmonkeysphere\fP is the Monkeysphere client utility.
  12. .SH SUBCOMMANDS
  13. \fBmonkeysphere\fP takes various subcommands:
  14. .TP
  15. .B update-known_hosts [HOST]...
  16. Update the known_hosts file. For each specified host, gpg will be
  17. queried for a key associated with the host URI (see HOST
  18. IDENTIFICATION in
  19. .BR monkeysphere(7)),
  20. optionally querying a keyserver.
  21. If an acceptable key is found for the host (see KEY ACCEPTABILITY in
  22. .BR monkeysphere(7)),
  23. the key is added to the user's known_hosts file. If a key is found
  24. but is unacceptable for the host, any matching keys are removed from
  25. the user's known_hosts file. If no gpg key is found for the host,
  26. nothing is done. If no hosts are specified, all hosts listed in the
  27. known_hosts file will be processed. This subcommand will exit with a
  28. status of 0 if at least one acceptable key was found for a specified
  29. host, 1 if no matching keys were found at all, and 2 if matching keys
  30. were found but none were acceptable. `k' may be used in place of
  31. `update-known_hosts'.
  32. .TP
  33. .B update-authorized_keys
  34. Update the authorized_keys file for the user executing the command
  35. (see MONKEYSPHERE_AUTHORIZED_KEYS in ENVIRONMENT, below). First all
  36. monkeysphere keys are cleared from the authorized_keys file. Then, or
  37. each user ID in the user's authorized_user_ids file, gpg will be
  38. queried for keys associated with that user ID, optionally querying a
  39. keyserver. If an acceptable key is found (see KEY ACCEPTABILITY in
  40. .BR monkeysphere (7)),
  41. the key is added to the user's authorized_keys file.
  42. If a key is found but is unacceptable for the user ID, any matching
  43. keys are removed from the user's authorized_keys file. If no gpg key
  44. is found for the user ID, nothing is done. This subcommand will exit
  45. with a status of 0 if at least one acceptable key was found for a user
  46. ID, 1 if no matching keys were found at all, and 2 if matching keys
  47. were found but none were acceptable. `a' may be used in place of
  48. `update-authorized_keys'.
  49. .TP
  50. .B import-subkey FILE [KEYID]
  51. Import an existing ssh RSA key as an authentication subkey for a
  52. private key in your GnuPG keyring. KEYID is the key ID for the
  53. primary key for which the subkey with "authentication" capability will
  54. be imported. If no key ID is specified, but only one key exists in
  55. the secret keyring, that key will be used. `i' may be used in place
  56. of `import-subkey'.
  57. .TP
  58. .B gen-subkey [KEYID]
  59. Generate an authentication subkey for a private key in your GnuPG
  60. keyring. KEYID is the key ID for the primary key for which the subkey
  61. with "authentication" capability will be generated. If no key ID is
  62. specified, but only one key exists in the secret keyring, that key
  63. will be used. The length of the generated key can be specified with
  64. the `--length` or `-l` option. `g' may be used in place of
  65. `gen-subkey'.
  66. .TP
  67. .B ssh-proxycommand
  68. An ssh ProxyCommand that can be used to trigger a monkeysphere update
  69. of the ssh known_hosts file for a host that is being connected to with
  70. ssh. This works by updating the known_hosts file for the host first,
  71. before an attempted connection to the host is made. Once the
  72. known_hosts file has been updated, a TCP connection to the host is
  73. made by exec'ing netcat(1). Regular ssh communication is then done
  74. over this netcat TCP connection (see ProxyCommand in ssh_config(5) for
  75. more info).
  76. This command is meant to be run as the ssh "ProxyCommand". This can
  77. either be done by specifying the proxy command on the command line:
  78. .B ssh -o ProxyCommand="monkeysphere ssh-proxycommand %h %p" ...
  79. or by adding the following line to your ~/.ssh/config script:
  80. .B ProxyCommand monkeysphere ssh-proxycommand %h %p
  81. The script can easily be incorporated into other ProxyCommand scripts
  82. by calling it with the "--no-connect" option, i.e.:
  83. .B monkeysphere ssh-proxycommand --no-connect "$HOST" "$PORT"
  84. This will run everything except the final exec of netcat to make the
  85. TCP connection to the host. In this way this command can be added to
  86. another proxy command that does other stuff, and then makes the
  87. connection to the host itself.
  88. KEYSERVER CHECKING:
  89. The proxy command has a fairly nuanced policy for when keyservers are
  90. queried when processing a host. If the host userID is not found in
  91. either the user's keyring or in the known_hosts file, then the
  92. keyserver is queried for the host userID. If the host userID is found
  93. in the user's keyring, then the keyserver is not checked. This
  94. assumes that the keyring is kept up-to-date, in a cronjob or the like,
  95. so that revocations are properly handled. If the host userID is not
  96. found in the user's keyring, but the host is listed in the known_hosts
  97. file, then the keyserver is not checked. This last policy might
  98. change in the future, possibly by adding a deferred check, so that
  99. hosts that go from non-monkeysphere-enabled to monkeysphere-enabled
  100. will be properly checked.
  101. Setting the CHECK_KEYSERVER variable in the config file or the
  102. MONKEYSPHERE_CHECK_KEYSERVER environment variable to either `true' or
  103. `false' will override the keyserver-checking policy defined above and
  104. either always or never check the keyserver for host key updates.
  105. .TP
  106. .B subkey-to-ssh-agent [ssh-add arguments]
  107. Push all authentication-capable subkeys in your GnuPG secret keyring
  108. into your running ssh-agent. Additional arguments are passed through
  109. to
  110. .BR ssh-add (1).
  111. For example, to remove the authentication subkeys, pass an additional
  112. `-d' argument. To require confirmation on each use of the key, pass
  113. `-c'. `s' may be used in place of `subkey-to-ssh-agent'.
  114. .TP
  115. .B help
  116. Output a brief usage summary. `h' or `?' may be used in place of
  117. `help'.
  118. .SH ENVIRONMENT
  119. The following environment variables will override those specified in
  120. the monkeysphere.conf configuration file (defaults in parentheses):
  121. .TP
  122. MONKEYSPHERE_LOG_LEVEL
  123. Set the log level (INFO). Can be SILENT, ERROR, INFO, VERBOSE, DEBUG,
  124. in increasing order of verbosity.
  125. .TP
  126. MONKEYSPHERE_GNUPGHOME, GNUPGHOME
  127. GnuPG home directory (~/.gnupg).
  128. .TP
  129. MONKEYSPHERE_KEYSERVER
  130. OpenPGP keyserver to use (subkeys.pgp.net).
  131. .TP
  132. MONKEYSPHERE_CHECK_KEYSERVER
  133. Whether or not to check keyserver when making gpg queries (`true').
  134. .TP
  135. MONKEYSPHERE_KNOWN_HOSTS
  136. Path to ssh known_hosts file (~/.ssh/known_hosts).
  137. .TP
  138. MONKEYSPHERE_HASH_KNOWN_HOSTS
  139. Whether or not to hash to the known_hosts file entries (`true').
  140. .TP
  141. MONKEYSPHERE_AUTHORIZED_KEYS
  142. Path to ssh authorized_keys file (~/.ssh/authorized_keys).
  143. .TP
  144. MONKEYSPHERE_PROMPT
  145. If set to `false', never prompt the user for confirmation. (true)
  146. .SH FILES
  147. .TP
  148. ~/.monkeysphere/monkeysphere.conf
  149. User monkeysphere config file.
  150. .TP
  151. /etc/monkeysphere/monkeysphere.conf
  152. System-wide monkeysphere config file.
  153. .TP
  154. ~/.monkeysphere/authorized_user_ids
  155. OpenPGP user IDs associated with keys that will be checked for
  156. addition to the authorized_keys file.
  157. .SH AUTHOR
  158. Written by:
  159. Jameson Rollins <jrollins@fifthhorseman.net>,
  160. Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  161. .SH SEE ALSO
  162. .BR monkeysphere-host (8),
  163. .BR monkeysphere-authentication (8),
  164. .BR monkeysphere (7),
  165. .BR ssh (1),
  166. .BR ssh-add (1),
  167. .BR gpg (1)