summaryrefslogtreecommitdiff
path: root/man/man8/monkeysphere-server.8
blob: 1300d8917eeb839c4bb706b3a784b00c418660a0 (plain)
  1. .TH MONKEYSPHERE-SERVER "1" "June 2008" "monkeysphere 0.1" "User Commands"
  2. .SH NAME
  3. monkeysphere-server \- monkeysphere server admin user interface
  4. .SH SYNOPSIS
  5. .B monkeysphere-server \fIcommand\fP [\fIargs\fP]
  6. .SH DESCRIPTION
  7. \fBMonkeySphere\fP is a system to leverage the OpenPGP Web of Trust
  8. for ssh authentication. OpenPGP keys are tracked via GnuPG, and added
  9. to the ssh authorized_keys and known_hosts files to be used for
  10. authentication of ssh connections.
  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 [USER]...
  16. Update admin-controlled authorized_keys files at
  17. /var/cache/monkeysphere/authorized_keys/USER. For each specified
  18. user, the user ID's listed in the user's authorized_user_ids file are
  19. processed. For each user ID, gpg will be queried for keys associated
  20. with that user ID, querying a keyserver if specified. If a key is
  21. found, it will be converted to an ssh key, and any matching ssh keys
  22. will be removed from the user's authorized_keys file. If the found
  23. key is acceptable (see KEY ACCEPTABILITY), then the key will be
  24. updated and re-added to the authorized_keys file. If no gpg key is
  25. found for the user ID, then nothing is done. If the
  26. RAW_AUTHORIZED_KEYS variable is set, then a user-controlled
  27. authorized_keys file (usually ~USER/.ssh/authorized_keys) is added to
  28. the authorized_keys file. If no users are specified, then all users
  29. listed in /etc/passwd are processed. `u' may be used in place of
  30. `update-users.
  31. .TP
  32. .B gen-key
  33. Generate a OpenPGP key pair for the host. `g' may be used in place of
  34. `gen-key'.
  35. .TP
  36. .B show-fingerprint
  37. Show the fingerprint for the host's OpenPGP key. `f' may be used in place of
  38. `show-fingerprint'.
  39. .TP
  40. .B publish-key
  41. Publish the host's OpenPGP key to the keyserver. `p' may be used in
  42. place of `publish-key'.
  43. .TP
  44. .B add-certifier KEYID
  45. Add a certifier key to host keyring. The key with specified key ID
  46. will be retrieved from the keyserver and imported to the host keyring.
  47. It will then be given a non-exportable trust signature, with default
  48. depth of 1, so that the key may certifier users to log into the
  49. system. `a' may be used in place of `add-certifier'.
  50. .TP
  51. .B remove-certifier KEYID
  52. Remove a certifier key from the host keyring. The key with specified
  53. key ID will be removed entirely from the host keyring so that the key
  54. will not longer be able to certify users on the system. `r' may be
  55. used in place of `remove-certifier'.
  56. .TP
  57. .B list-certifiers
  58. List certifier keys. `l' may be used in place of `list-certifiers'.
  59. .TP
  60. .B help
  61. Output a brief usage summary. `h' or `?' may be used in place of
  62. `help'.
  63. .SH SETUP
  64. In order to start using the monkeysphere, you must first generate an
  65. OpenPGP key for the server and convert that key to an ssh key that can
  66. be used by ssh for host authentication. This can be done with the
  67. \fBgen-key\fP subcommand:
  68. $ monkeysphere-server gen-key
  69. To enable host verification via the monkeysphere, you must then
  70. publish the host's key to the Web of Trust using the \fBpublish-key\fP
  71. command to push the key to a keyserver. Then modify the sshd_config
  72. to tell sshd where the new server host key is located:
  73. HostKey /var/lib/monkeysphere/ssh_host_rsa_key
  74. In order for users logging into the system to be able to verify the
  75. host via the monkeysphere, at least one person (ie. a server admin)
  76. will need to sign the host's key. This is done in the same way that
  77. key signing is usually done, by pulling the host's key from the
  78. keyserver, signing the key, and re-publishing the signature. Once
  79. that is done, users logging into the host will be able to certify the
  80. host's key via the signature of the host admin.
  81. If the server will also handle user authentication through
  82. monkeysphere-generated authorized_keys files, the server must be told
  83. which keys will act as user certifiers. This is done with the
  84. \fBadd-certifier\fP command:
  85. $ monkeysphere-server add-certifier KEYID
  86. where KEYID is the key ID of the server admin, or whoever's signature
  87. will be certifying users to the system. Certifiers can be later
  88. remove with the \fBremove-certifier\fP command, and listed with the
  89. \fBlist-certifiers\fP command.
  90. Remote user's will then be granted access to a local user account
  91. based on the appropriately signed and valid keys associated with user
  92. IDs listed in the authorized_user_ids file of the local user. By
  93. default, the authorized_user_ids file for local users is found in
  94. ~/.config/monkeysphere/authorized_user_ids. This can be changed in
  95. the monkeysphere-server.conf file.
  96. The \fBupdate-users\fP command can then be used to generate
  97. authorized_keys file for local users based on the authorized user IDs
  98. listed in the user's authorized_user_ids file:
  99. $ monkeysphere-server update-users USER
  100. sshd can then use these files to grant access to user accounts for
  101. remote users. If no user is specified, authorized_keys files will be
  102. generated for all users on the system. You must also tell sshd to
  103. look at the monkeysphere-generated authorized_keys file for user
  104. authentication by setting the following in the sshd_config:
  105. AuthorizedKeysFile /var/lib/monkeysphere/authorized_keys/%u
  106. It is recommended to add "monkeysphere-server update-users" to a
  107. system crontab, so that user keys are kept up-to-date, and key
  108. revokations and expirations can be processed in a timely manor.
  109. .SH KEY ACCEPTABILITY
  110. GPG keys are considered acceptable if the following criteria are met:
  111. .TP
  112. .B capability
  113. The key must have the "authentication" ("a") usage flag set.
  114. .TP
  115. .B validity
  116. The key must be "fully" valid (ie. signed by a trusted certifier), and
  117. must not be expired or revoked.
  118. .SH FILES
  119. .TP
  120. /etc/monkeysphere/monkeysphere-server.conf
  121. System monkeysphere-server config file.
  122. .TP
  123. /etc/monkeysphere/monkeysphere.conf
  124. System-wide monkeysphere config file.
  125. .TP
  126. /var/lib/monkeysphere/authorized_keys/USER
  127. Monkeysphere-generated user authorized_keys files.
  128. .TP
  129. /var/lib/monkeysphere/ssh_host_rsa_key
  130. Copy of the host's private key in ssh format, suitable for use by
  131. sshd.
  132. .TP
  133. /var/lib/monkeysphere/gnupg-host
  134. Monkeysphere host GNUPG home directory.
  135. .TP
  136. /var/lib/monkeysphere/gnupg-authentication
  137. Monkeysphere authentication GNUPG home directory.
  138. .SH AUTHOR
  139. Written by Jameson Rollins <jrollins@fifthhorseman.net>
  140. .SH SEE ALSO
  141. .BR monkeysphere (1),
  142. .BR gpg (1),
  143. .BR ssh (1)