summaryrefslogtreecommitdiff
path: root/doc/README
blob: cf8a8d6ee1756c879bc3f269a0bb2705cfd6eddf (plain)
  1. Monkeysphere User README
  2. ========================
  3. You don't have to be an OpenSSH or OpenPGP expert to use the
  4. Monkeysphere. However, you should be comfortable using secure shell and
  5. you should already have GnuPG installed and an OpenPGP key pair before
  6. you begin.
  7. As a regular user on a system where the monkeysphere package is
  8. installed, you probably want to do a few things:
  9. Keeping your keyring up-to-date
  10. -------------------------------
  11. Regularly refresh your GnuPG keyring from the keyservers. This can be
  12. done with a simple cronjob. An example of crontab line to do this is:
  13. 0 12 * * * /usr/bin/gpg --refresh-keys > /dev/null 2>&1
  14. This would refresh your keychain every day at noon.
  15. Keeping your known_hosts file in sync with your keyring
  16. -------------------------------------------------------
  17. With your keyring updated, you want to make sure that OpenSSH can
  18. still see the most recent trusted information about who the various
  19. hosts are. This can be done with the monkeysphere-ssh-proxycommand
  20. (see next section) or with the update-known_hosts command:
  21. $ monkeysphere update-known_hosts
  22. This command will check to see if there is an OpenPGP key for
  23. each (non-hashed) host listed in the known_hosts file, and then add
  24. the key for that host to the known_hosts file if one is found. This
  25. command could be added to a crontab as well, if desired.
  26. Using monkeysphere-ssh-proxycommand(1)
  27. --------------------------------------
  28. The best way to handle host keys is to use the monkeysphere ssh proxy
  29. command. This command will make sure the known_hosts file is
  30. up-to-date for the host you are connecting to with ssh. The best way
  31. to integrate this is to add the following line to the "Host *" section
  32. of your ~/.ssh/config file:
  33. ProxyCommand monkeysphere-ssh-proxycommand %h %p
  34. The "Host *" section specifies what ssh options to use for all
  35. connections. If you don't already have a "Host *" line, you can add it
  36. by entering:
  37. Host *
  38. On a line by itself. Add the ProxyCommand line just below it.
  39. Once you've completed this step - you are half-way there. You will now
  40. be able to verify servers participating in the monkeysphere provided
  41. their keys have been signed by someone that you trust.
  42. FIXME: We should setup a way for someone to download a test gpg key and
  43. then connect to a test server that is signed by this gpg key so users
  44. can establish that they are setup correctly.
  45. The remaining steps will complete the second half: allow servers to
  46. verify you based on your OpenPGP key.
  47. Setting up an OpenPGP authentication key
  48. ----------------------------------------
  49. First things first: you'll need to create a new subkey for your
  50. current key, if you don't already have one. If your OpenPGP key is
  51. keyid $GPGID, you can set up such a subkey relatively easily with:
  52. $ monkeysphere gen-subkey $GPGID
  53. Typically, you can find out what your keyid is by running:
  54. gpg --list-secret-keys
  55. The first line (starting with sec) will include your key length followed
  56. by the type of key (e.g. 1024D) followed by a slash and then your keyid.
  57. Using your OpenPGP authentication key for SSH
  58. ---------------------------------------------
  59. Once you have created an OpenPGP authentication key, you will need to
  60. feed it to your ssh agent.
  61. Currently (2008-08-23), gnutls does not support this operation. In order
  62. to take this step, you will need to upgrade to a patched version of
  63. gnutls. You can easily upgrade a Debian system by adding the following
  64. to /etc/apt/sources.list.d/monkeysphere.list:
  65. deb http://monkeysphere.info/debian experimental gnutls
  66. deb-src http://monkeysphere.info/debian experimental gnutls
  67. And then adding the following to /etc/apt/preferences:
  68. Package: libgnutls26
  69. Pin: release o=The MonkeySphere Project
  70. Pin-Priority: 990
  71. Package: libgnutls26-dbg
  72. Pin: release o=The MonkeySphere Project
  73. Pin-Priority: 990
  74. Package: gnutls-bin
  75. Pin: release o=The MonkeySphere Project
  76. Pin-Priority: 990
  77. Package: gnutls-doc
  78. Pin: release o=The MonkeySphere Project
  79. Pin-Priority: 990
  80. Package: guile-gnutls
  81. Pin: release o=The MonkeySphere Project
  82. Pin-Priority: 990
  83. Package: gnutls-dev
  84. Pin: release o=The MonkeySphere Project
  85. Pin-Priority: 990
  86. Next, run `aptitude update; aptitude install libgnuttls26`.
  87. With the patched gnutls installed, you can feed your authentication sub
  88. key to your ssh agent by running:
  89. monkeysphere subkey-to-ssh-agent
  90. You may want to add this command to your ~/.xsession file so it is run
  91. automatically everytime you login.
  92. FIXME: using the key with a single session?
  93. Miscellaneous
  94. -------------
  95. Users can also maintain their own authorized_keys files, for users
  96. that would be logging into their accounts. This is primarily useful
  97. for accounts on hosts that are not already systematically using the
  98. monkeysphere for user authentication. If you're not sure whether this
  99. is the case for your host, ask your system administrator.
  100. If you want to do this as a regular user, use the
  101. update-authorized_keys command:
  102. $ monkeysphere update-authorized_keys
  103. This command will take all the user IDs listed in the
  104. ~/.config/monkeysphere/authorized_user_ids file and check to see if
  105. there are acceptable keys for those user IDs available. If so, they
  106. will be added to the ~/.ssh/authorized_keys file.
  107. You must have indicated reasonable ownertrust in some key for this
  108. account, or no keys will be found with trusted certification paths.
  109. If you find this useful, you might want to place a job like this in
  110. your crontab so that revocations and rekeyings can take place
  111. automatically.