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