f7a97557ac07fab42872d4b90e4c5246dc375733
[monkeysphere.git] / man / man8 / monkeysphere-server.8
1 .TH MONKEYSPHERE-SERVER "1" "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 ssh authentication.  OpenPGP keys are tracked via GnuPG, and added
15 to the authorized_keys and known_hosts files used by ssh 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 add-identity-certifier KEYID
56 Instruct system to trust user identity certifications made by KEYID.
57 A certifier domain can be specified with the `-n' or `--domain'
58 option.  A certifier trust level can be specified with the `-t' or
59 `--trust' option (possible values are `1' for `marginal' and `2' for
60 `full' (default is `2')).  A certifier trust depth can be specified
61 with the `-d' or `--depth' option (default is 1).  `a' may be used in
62 place of `add-identity-certifier'.
63 .TP
64 .B remove-identity-certifier KEYID
65 Instruct system to ignore user identity certifications made by KEYID.
66 `r' may be used in place of `remove-identity-certifier'.
67 .TP
68 .B list-identity-certifiers
69 List key IDs trusted by the system to certify user identities.  `l'
70 may be used in place of `list-identity-certifiers'.
71 .TP
72 .B help
73 Output a brief usage summary.  `h' or `?' may be used in place of
74 `help'.
75
76 .SH SETUP
77
78 In order to start using the monkeysphere, you must first generate an
79 OpenPGP key for the server and convert that key to an ssh key that can
80 be used by ssh for host authentication.  This can be done with the
81 \fBgen-key\fP subcommand:
82
83 $ monkeysphere-server gen-key
84
85 To enable host verification via the monkeysphere, you must then
86 publish the host's key to the Web of Trust using the \fBpublish-key\fP
87 command to push the key to a keyserver.  Then modify the sshd_config
88 to tell sshd where the new server host key is located:
89
90 HostKey /var/lib/monkeysphere/ssh_host_rsa_key
91
92 In order for users logging into the system to be able to verify the
93 host via the monkeysphere, at least one person (ie. a server admin)
94 will need to sign the host's key.  This is done in the same way that
95 key signing is usually done, by pulling the host's key from the
96 keyserver, signing the key, and re-publishing the signature.  Once
97 that is done, users logging into the host will be able to certify the
98 host's key via the signature of the host admin.
99
100 If the server will also handle user authentication through
101 monkeysphere-generated authorized_keys files, the server must be told
102 which keys will act as user certifiers.  This is done with the
103 \fBadd-certifier\fP command:
104
105 $ monkeysphere-server add-certifier KEYID
106
107 where KEYID is the key ID of the server admin, or whoever's signature
108 will be certifying users to the system.  Certifiers can be later
109 remove with the \fBremove-certifier\fP command, and listed with the
110 \fBlist-certifiers\fP command.
111
112 Remote user's will then be granted access to a local user account
113 based on the appropriately signed and valid keys associated with user
114 IDs listed in the authorized_user_ids file of the local user.  By
115 default, the authorized_user_ids file for local users is found in
116 ~/.config/monkeysphere/authorized_user_ids.  This can be changed in
117 the monkeysphere-server.conf file.
118
119 The \fBupdate-users\fP command can then be used to generate
120 authorized_keys file for local users based on the authorized user IDs
121 listed in the user's authorized_user_ids file:
122
123 $ monkeysphere-server update-users USER
124
125 sshd can then use these files to grant access to user accounts for
126 remote users.  If no user is specified, authorized_keys files will be
127 generated for all users on the system.  You must also tell sshd to
128 look at the monkeysphere-generated authorized_keys file for user
129 authentication by setting the following in the sshd_config:
130
131 AuthorizedKeysFile /var/lib/monkeysphere/authorized_keys/%u
132
133 It is recommended to add "monkeysphere-server update-users" to a
134 system crontab, so that user keys are kept up-to-date, and key
135 revokations and expirations can be processed in a timely manor.
136
137 .SH ENVIRONMENT
138
139 The following environment variables will override those specified in
140 the monkeysphere-server.conf configuration file (defaults in
141 parentheses):
142 .TP
143 MONKEYSPHERE_KEYSERVER
144 OpenPGP keyserver to use (subkeys.pgp.net).
145 .TP
146 MONKEYSPHERE_AUTHORIZED_USER_IDS
147 Path to user authorized_user_ids file
148 (%h/.config/monkeysphere/authorized_user_ids).
149 .TP
150 MONKEYSPHERE_RAW_AUTHORIZED_KEYS
151 Path to user-controlled authorized_keys file.  `-' means not to add
152 user-controlled file (%h/.ssh/authorized_keys).
153 .TP
154 MONKEYSPHERE_MONKEYSPHERE_USER
155 User to control authentication keychain (monkeypshere).
156
157 .SH FILES
158
159 .TP
160 /etc/monkeysphere/monkeysphere-server.conf
161 System monkeysphere-server config file.
162 .TP
163 /etc/monkeysphere/monkeysphere.conf
164 System-wide monkeysphere config file.
165 .TP
166 /var/lib/monkeysphere/authorized_keys/USER
167 Monkeysphere-generated user authorized_keys files.
168 .TP
169 /var/lib/monkeysphere/ssh_host_rsa_key
170 Copy of the host's private key in ssh format, suitable for use by
171 sshd.
172 .TP
173 /var/lib/monkeysphere/gnupg-host
174 Monkeysphere host GNUPG home directory.
175 .TP
176 /var/lib/monkeysphere/gnupg-authentication
177 Monkeysphere authentication GNUPG home directory.
178
179 .SH AUTHOR
180
181 Written by Jameson Rollins <jrollins@fifthhorseman.net>, Daniel Kahn
182 Gillmor <dkg@fifthhorseman.net>
183
184 .SH SEE ALSO
185
186 .BR monkeysphere (1),
187 .BR monkeysphere (5),
188 .BR gpg (1),
189 .BR ssh (1)