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