summaryrefslogtreecommitdiff
path: root/man/man8/monkeysphere-server.8
blob: d25f0e8ea671b1d781c6b3eb243b9cb18f554864 (plain)
  1. .TH MONKEYSPHERE-SERVER "8" "June 2008" "monkeysphere" "User Commands"
  2. .SH NAME
  3. monkeysphere-server \- Monkeysphere server admin user interface
  4. .SH SYNOPSIS
  5. .B monkeysphere-server \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-server\fP is the Monkeysphere server admin utility.
  12. .SH SUBCOMMANDS
  13. \fBmonkeysphere-server\fP takes various subcommands:
  14. .TP
  15. .B update-users [ACCOUNT]...
  16. Rebuild the monkeysphere-controlled authorized_keys files. For each
  17. specified account, the user ID's listed in the account's
  18. authorized_user_ids file are processed. For each user ID, gpg will be
  19. queried for keys associated with that user ID, optionally querying a
  20. keyserver. If an acceptable key is found (see KEY ACCEPTABILITY in
  21. monkeysphere(7)), the key is added to the account's
  22. monkeysphere-controlled authorized_keys file. If the
  23. RAW_AUTHORIZED_KEYS variable is set, then a separate authorized_keys
  24. file (usually ~USER/.ssh/authorized_keys) is appended to the
  25. monkeysphere-controlled authorized_keys file. If no accounts are
  26. specified, then all accounts on the system are processed. `u' may be
  27. used in place of `update-users'.
  28. .TP
  29. .B gen-key [HOSTNAME]
  30. Generate a OpenPGP key for the host. If HOSTNAME is not specified,
  31. then the system fully-qualified domain name will be user. An
  32. alternate key bit length can be specified with the `-l' or `--length'
  33. option (default 2048). An expiration length can be specified with the
  34. `-e' or `--expire' option (prompt otherwise). The expiration format
  35. is the same as that of \fBextend-key\fP, below. A key revoker
  36. fingerprint can be specified with the `-r' or `--revoker' option. `g'
  37. may be used in place of `gen-key'.
  38. .TP
  39. .B extend-key EXPIRE
  40. Extend the validity of the OpenPGP key for the host until EXPIRE from
  41. the present. If EXPIRE is not specified, then the user will be
  42. prompted for the extension term. Expiration is specified like GnuPG
  43. does:
  44. .nf
  45. 0 = key does not expire
  46. <n> = key expires in n days
  47. <n>w = key expires in n weeks
  48. <n>m = key expires in n months
  49. <n>y = key expires in n years
  50. .fi
  51. `e' may be used in place of `extend-key'.
  52. .TP
  53. .B add-hostname HOSTNAME
  54. Add a hostname user ID to the server host key. `n+' may be used in
  55. place of `add-hostname'.
  56. .TP
  57. .B revoke-hostname HOSTNAME
  58. Revoke a hostname user ID from the server host key. `n-' may be used
  59. in place of `revoke-hostname'.
  60. .TP
  61. .B show-key
  62. Output gpg information about host's OpenPGP key. `s' may be used in
  63. place of `show-key'.
  64. .TP
  65. .B publish-key
  66. Publish the host's OpenPGP key to the keyserver. `p' may be used in
  67. place of `publish-key'.
  68. .TP
  69. .B diagnostics
  70. Review the state of the server with respect to the MonkeySphere in
  71. general and report on suggested changes. Among other checks, this
  72. includes making sure there is a valid host key, that the key is
  73. published, that the sshd configuration points to the right place, and
  74. that there are at least some valid identity certifiers. `d' may be
  75. used in place of `diagnostics'.
  76. .TP
  77. .B add-identity-certifier KEYID
  78. Instruct system to trust user identity certifications made by KEYID.
  79. Using the `-n' or `--domain' option allows you to indicate that you
  80. only trust the given KEYID to make identifications within a specific
  81. domain (e.g. "trust KEYID to certify user identities within the
  82. @example.org domain"). A certifier trust level can be specified with
  83. the `-t' or `--trust' option (possible values are `marginal' and
  84. `full' (default is `full')). A certifier trust depth can be specified
  85. with the `-d' or `--depth' option (default is 1). `c+' may be used in
  86. place of `add-identity-certifier'.
  87. .TP
  88. .B remove-identity-certifier KEYID
  89. Instruct system to ignore user identity certifications made by KEYID.
  90. `c-' may be used in place of `remove-identity-certifier'.
  91. .TP
  92. .B list-identity-certifiers
  93. List key IDs trusted by the system to certify user identities. `c'
  94. may be used in place of `list-identity-certifiers'.
  95. .TP
  96. .B gpg-authentication-cmd
  97. Execute a gpg command on the gnupg-authentication keyring as the
  98. monkeysphere user. This takes a single command (multiple gpg
  99. arguments need to be quoted). Use this command with caution, as
  100. modifying the gnupg-authentication keyring can affect ssh user
  101. authentication.
  102. .TP
  103. .B help
  104. Output a brief usage summary. `h' or `?' may be used in place of
  105. `help'.
  106. .SH SETUP
  107. In order to start using the monkeysphere, you must first generate an
  108. OpenPGP key for the server and convert that key to an ssh key that can
  109. be used by ssh for host authentication. This can be done with the
  110. \fBgen-key\fP subcommand:
  111. $ monkeysphere-server gen-key
  112. To enable host verification via the monkeysphere, you must then
  113. publish the host's key to the Web of Trust using the \fBpublish-key\fP
  114. command to push the key to a keyserver. You must also modify the
  115. sshd_config on the server to tell sshd where the new server host key
  116. is located:
  117. HostKey /var/lib/monkeysphere/ssh_host_rsa_key
  118. In order for users logging into the system to be able to identify the
  119. host via the monkeysphere, at least one person (e.g. a server admin)
  120. will need to sign the host's key. This is done using standard OpenPGP
  121. keysigning techniques, usually: pul the key from the keyserver, verify
  122. and sign the key, and then re-publish the signature. Once an admin's
  123. signature is published, users logging into the host can use it to
  124. validate the host's key.
  125. If the server will also handle user authentication through
  126. monkeysphere-generated authorized_keys files, the server must be told
  127. which keys will act as identity certifiers. This is done with the
  128. \fBadd-identity-certifier\fP command:
  129. $ monkeysphere-server add-identity-certifier KEYID
  130. where KEYID is the key ID of the server admin, or whoever's
  131. certifications should be acceptable to the system for the purposes of
  132. authenticating remote users. You can run this command multiple times
  133. to indicate that multiple certifiers are trusted. You may also
  134. specify a filename instead of a key ID, as long as the file contains a
  135. single OpenPGP public key. Certifiers can be removed with the
  136. \fBremove-identity-certifier\fP command, and listed with the
  137. \fBlist-identity-certifiers\fP command.
  138. Remote users will then be granted access to a local account based on
  139. the appropriately-signed and valid keys associated with user IDs
  140. listed in that account's authorized_user_ids file. By default, the
  141. authorized_user_ids file for an account is
  142. ~/.monkeysphere/authorized_user_ids. This can be changed in the
  143. monkeysphere-server.conf file.
  144. The \fBupdate-users\fP command can then be used to generate
  145. authorized_keys file for local accounts based on the authorized user
  146. IDs listed in the account's authorized_user_ids file:
  147. $ monkeysphere-server update-users USER
  148. Not specifying USER will cause all accounts on the system to updated.
  149. sshd can then use these monkeysphere generated authorized_keys files
  150. to grant access to user accounts for remote users. You must also tell
  151. sshd to look at the monkeysphere-generated authorized_keys file for
  152. user authentication by setting the following in the sshd_config:
  153. AuthorizedKeysFile /var/lib/monkeysphere/authorized_keys/%u
  154. It is recommended to add "monkeysphere-server update-users" to a
  155. system crontab, so that user keys are kept up-to-date, and key
  156. revocations and expirations can be processed in a timely manner.
  157. .SH ENVIRONMENT
  158. The following environment variables will override those specified in
  159. the monkeysphere-server.conf configuration file (defaults in
  160. parentheses):
  161. .TP
  162. MONKEYSPHERE_MONKEYSPHERE_USER
  163. User to control authentication keychain (monkeysphere).
  164. .TP
  165. MONKEYSPHERE_LOG_LEVEL
  166. Set the log level (INFO). Can be SILENT, ERROR, INFO, VERBOSE, DEBUG, in
  167. increasing order of verbosity.
  168. .TP
  169. MONKEYSPHERE_KEYSERVER
  170. OpenPGP keyserver to use (subkeys.pgp.net).
  171. .TP
  172. MONKEYSPHERE_AUTHORIZED_USER_IDS
  173. Path to user authorized_user_ids file
  174. (%h/.monkeysphere/authorized_user_ids).
  175. .TP
  176. MONKEYSPHERE_RAW_AUTHORIZED_KEYS
  177. Path to user-controlled authorized_keys file. `-' means not to add
  178. user-controlled file (%h/.ssh/authorized_keys).
  179. .SH FILES
  180. .TP
  181. /etc/monkeysphere/monkeysphere-server.conf
  182. System monkeysphere-server config file.
  183. .TP
  184. /etc/monkeysphere/monkeysphere.conf
  185. System-wide monkeysphere config file.
  186. .TP
  187. /etc/monkeysphere/gnupg-host.conf
  188. Monkeysphere host GNUPG home gpg.conf
  189. .TP
  190. /etc/monkeysphere/gnupg-authentication.conf
  191. Monkeysphere authentication GNUPG home gpg.conf
  192. .TP
  193. /var/lib/monkeysphere/authorized_keys/USER
  194. Monkeysphere-generated user authorized_keys files.
  195. .TP
  196. /var/lib/monkeysphere/ssh_host_rsa_key
  197. Copy of the host's private key in ssh format, suitable for use by
  198. sshd.
  199. .TP
  200. /var/lib/monkeysphere/gnupg-host
  201. Monkeysphere host GNUPG home directory.
  202. .TP
  203. /var/lib/monkeysphere/gnupg-authentication
  204. Monkeysphere authentication GNUPG home directory.
  205. .SH AUTHOR
  206. Written by Jameson Rollins <jrollins@fifthhorseman.net>, Daniel Kahn
  207. Gillmor <dkg@fifthhorseman.net>
  208. .SH SEE ALSO
  209. .BR monkeysphere (1),
  210. .BR monkeysphere (7),
  211. .BR gpg (1),
  212. .BR ssh (1)