1 Monkeysphere User README
2 ========================
4 You don't have to be an OpenSSH or OpenPGP expert to use the
5 Monkeysphere. However, you should be comfortable using secure shell
6 (ssh), and you should already have GnuPG installed and an OpenPGP key
9 As a regular user on a system where the monkeysphere package is
10 installed, you probably want to do a few things:
13 Keep your keyring up-to-date
14 ----------------------------
16 Regularly refresh your GnuPG keyring from the keyservers. This can be
17 done with a simple cronjob. An example of crontab line to do this is:
19 0 12 * * * /usr/bin/gpg --refresh-keys > /dev/null 2>&1
21 This would refresh your keychain every day at noon.
23 Install the monkeysphere software on your system
24 ------------------------------------------------
26 If you haven't installed monkeysphere yet, you will need to [download
27 and install] (/download) before continuing.
29 Make sure that you have the GnuTLS library version 2.6 or later
30 installed on your system. If you can't (or don't want to) upgrade to
31 GnuTLS 2.6 or later, there are patches for GnuTLS 2.4 available in
32 [the Monkeysphere git repo](/community).
34 Keeping your `known_hosts` file in sync with your keyring
35 -----------------------------------------------------------
37 With your keyring updated, you want to make sure that OpenSSH can
38 still see the most recent trusted information about who the various
39 hosts are. This can be done with the monkeysphere-ssh-proxycommand
40 (see next section) or with the `update-known_hosts` command:
42 $ monkeysphere update-known_hosts
44 This command will check to see if there is an OpenPGP key for each
45 (non-hashed) host listed in the `known_hosts` file, and then add the
46 key for that host to the `known_hosts` file if one is found. This
47 command could be added to a crontab as well, if desired.
50 Using `monkeysphere-ssh-proxycommand`(1)
51 ----------------------------------------
53 The best way to handle host keys is to use the monkeysphere ssh proxy
54 command. This command will make sure the `known_hosts` file is
55 up-to-date for the host you are connecting to with ssh. The best way
56 to integrate this is to add the following line to the "Host *" section
57 of your `~/.ssh/config` file:
59 ProxyCommand monkeysphere-ssh-proxycommand %h %p
61 The "Host *" section specifies what ssh options to use for all
62 connections. If you don't already have a "Host *" line, you can add it
67 On a line by itself. Add the ProxyCommand line just below it.
69 Once you've completed this step - you are half-way there. You will now
70 be able to verify servers participating in the monkeysphere provided
71 their keys have been signed by someone that you trust.
73 FIXME: We should setup a way for someone to download a test gpg key and
74 then connect to a test server that is signed by this gpg key so users
75 can establish that they are setup correctly.
77 The remaining steps will complete the second half: allowing servers to
78 verify you based on your OpenPGP key.
81 Setting up an OpenPGP authentication key
82 ----------------------------------------
84 First things first: you'll need to create an "authentication" subkey
85 for your current key, if you don't already have one. If you already
86 have a GPG key, you can add an authentication subkey with:
88 $ monkeysphere gen-subkey
90 If you have more than one secret key, you'll need to specify the key
91 you want to add the subkey to on the command line.
94 Using your OpenPGP authentication key for SSH
95 ---------------------------------------------
97 Once you have created an OpenPGP authentication subkey, you will need
98 to feed it to your ssh agent.
100 The GnuTLS library supports this operation as of version 2.6, but
101 earlier versions do not. With a recent version of GnuTLS installed,
102 you can feed your authentication subkey to your ssh agent by running:
104 $ monkeysphere subkey-to-ssh-agent
106 FIXME: using the key with a single ssh connection?
111 Now that you have the above setup, you will need to establish an
112 acceptable trust path to the admin(s) of a monkeysphere-enabled server
113 that you will be connecting to. You need to do this because the admin
114 is certifying the host, and you need a mechanism to validate that
115 certification. The only way to do that is by indicating who you trust
116 to certify hosts. This is a two step process: first you must sign the
117 key, and then you have to indicate a trust level.
119 The process of signing another key is outside the scope of this
120 document, however the [gnupg
121 README](http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/branches/STABLE-BRANCH-1-4/README?root=GnuPG&view=markup)
122 details the signing process and you can find good [documentation
123 ](http://www.debian.org/events/keysigning) online detailing this
126 If you have signed your admins' key, you need to denote some kind of
127 trust to that key. To do this you should edit the key and use the
128 'trust' command. For the Monkeysphere to trust the assertions that are
129 made about a host, you need full calculated validity to the host
130 certifiers. This can be done either by giving full trust to one
131 host-certifying key, or by giving marginal trust to three different
132 host-certifiers. In the following we demonstrate how to add full trust
133 validity to a host-certifying key:
136 $ gpg --edit-key 'Jane Admin'
137 gpg (GnuPG) 1.4.9; Copyright (C) 2008 Free Software Foundation, Inc.
138 This is free software: you are free to change and redistribute it.
139 There is NO WARRANTY, to the extent permitted by law.
142 pub 4096R/ABCD123A created: 2007-06-02 expires: 2012-05-31 usage: SC
143 trust: unknown validity: full
144 sub 2048R/01DECAF7 created: 2007-06-02 expires: 2012-05-31 usage: E
145 [ full ] (1). Jane Admin <jane_admin@example.net>
148 pub 4096R/ABCD123A created: 2007-06-02 expires: 2012-05-31 usage: SC
149 trust: unknown validity: full
150 sub 2048R/01DECAF7 created: 2007-06-02 expires: 2012-05-31 usage: E
151 [ full ] (1). Jane Admin <jane_admin@example.net>
153 Please decide how far you trust this user to correctly verify other users' keys
154 (by looking at passports, checking fingerprints from different sources, etc.)
156 1 = I don't know or won't say
158 3 = I trust marginally
160 5 = I trust ultimately
161 m = back to the main menu
165 pub 4096R/ABCD123A created: 2007-06-02 expires: 2012-05-31 usage: SC
166 trust: full validity: full
167 sub 2048R/01DECAF7 created: 2007-06-02 expires: 2012-05-31 usage: E
168 [ full ] (1). Jane Admin <jane_admin@example.net>
169 Please note that the shown key validity is not necessarily correct
170 unless you restart the program.
173 Key not changed so no update needed.
176 Note: Due to a limitation with gnupg, it is not currently possible to
177 limit the domain scope properly, which means that if you fully trust
178 an admin, you'll trust all their certifications.
180 Because the Monkeysphre relies on GPG's definition of the OpenPGP web
181 of trust, it is important to understand [how GPG calculates User ID
182 validity for a key](/trust-models).
188 Users can also maintain their own `~/.ssh/authorized_keys` files with
189 the Monkeysphere. This is primarily useful for accounts on hosts that
190 are not already systematically using the Monkeysphere for user
191 authentication. If you're not sure whether this is the case for your
192 host, ask your system administrator.
194 If you want to do this as a regular user, use the
195 `update-authorized_keys` command:
197 $ monkeysphere update-authorized_keys
199 This command will take all the user IDs listed in the
200 `~/.monkeysphere/authorized_user_ids` file and check to see if
201 there are acceptable keys for those user IDs available. If so, they
202 will be added to the `~/.ssh/authorized_keys` file.
204 You must have indicated reasonable ownertrust in some key for this
205 account, or no keys will be found with trusted certification paths.
207 If you find this useful, you might want to place this command in your
208 crontab so that revocations and rekeyings can take place