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