e96a497eafed2de796288d9fff84a5cf79a2cc55
[monkeysphere.git] / man / man8 / monkeysphere-host.8
1 .TH MONKEYSPHERE-SERVER "8" "March 2009" "monkeysphere" "User Commands"
2
3 .SH NAME
4
5 monkeysphere\-host - Monkeysphere host admin tool.
6
7 .SH SYNOPSIS
8
9 .B monkeysphere\-host \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\-host\fP is a Monkeysphere server admin utility for
19 managing the host's OpenPGP host key.
20
21 .SH SUBCOMMANDS
22
23 \fBmonkeysphere\-host\fP takes various subcommands:
24 .TP
25 .B import\-key FILE NAME[:PORT]
26 Import a pem-encoded ssh secret host key from file FILE.  If FILE is
27 `\-', then the key will be imported from stdin.  Only RSA keys are
28 supported at the moment.  NAME[:PORT] is used to specify the
29 fully-qualified hostname (and port) used in the user ID of the new
30 OpenPGP key.  If PORT is not specified, then no port is added to the
31 user ID, which means port 22 is assumed.  `i' may be used in place of
32 `import\-key'.
33 .TP
34 .B show\-key
35 Output information about host's OpenPGP and SSH keys.  `s' may be used
36 in place of `show\-key'.
37 .TP
38 .B set\-expire [EXPIRE]
39 Extend the validity of the OpenPGP key for the host until EXPIRE from
40 the present.  If EXPIRE is not specified, then the user will be
41 prompted for the extension term.  Expiration is specified as with
42 GnuPG (measured from today's date):
43 .nf
44          0 = key does not expire
45       <n>  = key expires in n days
46       <n>w = key expires in n weeks
47       <n>m = key expires in n months
48       <n>y = key expires in n years
49 .fi
50 `e' may be used in place of `set\-expire'.
51 .TP
52 .B add\-hostname HOSTNAME
53 Add a hostname user ID to the server host key.  `n+' may be used in
54 place of `add\-hostname'.
55 .TP
56 .B revoke\-hostname HOSTNAME
57 Revoke a hostname user ID from the server host key.  `n\-' may be used
58 in place of `revoke\-hostname'.
59 .TP
60 .B add\-revoker KEYID|FILE
61 Add a revoker to the host's OpenPGP key.  The key ID will be loaded
62 from the keyserver.  A file may be loaded instead of pulling the key
63 from the keyserver by specifying the path to the file as the argument,
64 or by specifying `\-' to load from stdin.  `r+' may be be used in place
65 of `add-revoker'.
66 .TP
67 .B revoke\-key
68 Generate (with the option to publish) a revocation certificate for the
69 host's OpenPGP key.  If such a certificate is published, your host key
70 will be permanently revoked.  This subcommand will ask you a series of
71 questions, and then generate a key revocation certificate, sending it
72 to stdout.  If you explicitly tell it to publish the revocation
73 certificate immediately, it will send it to the public keyservers.
74 USE WITH CAUTION!
75 .TP
76 .B publish\-key
77 Publish the host's OpenPGP key to the public keyservers.  `p' may be
78 used in place of `publish-key'.  Note that there is no way to remove a
79 key from the public keyservers once it is published!
80 .TP
81 .B help
82 Output a brief usage summary.  `h' or `?' may be used in place of
83 `help'.
84 .TP
85 .B version
86 show version number
87
88
89 Other commands:
90 .TP
91 .B diagnostics
92 Review the state of the monkeysphere server host key and report on
93 suggested changes.  Among other checks, this includes making sure
94 there is a valid host key, that the key is not expired, that the sshd
95 configuration points to the right place, etc.  `d' may be used in
96 place of `diagnostics'.
97
98 .SH SETUP HOST AUTHENTICATION
99
100 To enable host verification via the monkeysphere, an OpenPGP key must
101 be made out of the host's ssh key, and the key must be published to
102 the Web of Trust.  This is not done by default.  The first step is to
103 import the host's ssh key into a monkeysphere-style OpenPGP key.  This
104 is done with the import\-key command.  When importing a key, you must
105 specify the path to the host's ssh RSA key to import, and a hostname
106 to use as the key's user ID:
107
108 # monkeysphere\-host import\-key /etc/ssh/ssh_host_rsa_key host.example.org
109
110 On most systems, the ssh host RSA key is stored at
111 /etc/ssh/ssh_host_rsa_key.
112
113 Once the host key has been imported, it must be published to the Web
114 of Trust so that users can retrieve the key when sshing to the host.
115 The host key is published to the keyserver with the publish\-key
116 command:
117
118 $ monkeysphere\-host publish\-key
119
120 In order for users logging into the system to be able to identify the
121 host via the monkeysphere, at least one person (e.g. a server admin)
122 will need to sign the host's key.  This is done using standard OpenPGP
123 keysigning techniques, usually: pull the key from the keyserver,
124 verify and sign the key, and then re-publish the signature.  Please
125 see http://web.monkeysphere.info/signing-host-keys/ for more
126 information.  Once an admin's signature is published, users logging
127 into the host can use it to validate the host's key without having to
128 manually check the host key's fingerprint.
129
130 .SH ENVIRONMENT
131
132 The following environment variables will override those specified in
133 the config file (defaults in parentheses):
134 .TP
135 MONKEYSPHERE_LOG_LEVEL
136 Set the log level.  Can be SILENT, ERROR, INFO, VERBOSE, DEBUG, in
137 increasing order of verbosity. (INFO)
138 .TP
139 MONKEYSPHERE_KEYSERVER
140 OpenPGP keyserver to use. (pool.sks\-keyservers.net)
141 .TP
142 MONKEYSPHERE_PROMPT
143 If set to `false', never prompt the user for confirmation. (true)
144
145 .SH FILES
146
147 .TP
148 /etc/monkeysphere/monkeysphere\-host.conf
149 System monkeysphere\-host config file.
150 .TP
151 /var/lib/monkeysphere/host/ssh_host_rsa_key.pub.gpg
152 A world-readable copy of the host's public key in OpenPGP format,
153 including all relevant self-signatures.
154
155 .SH AUTHOR
156
157 This man page was written by:
158 Jameson Rollins <jrollins@fifthhorseman.net>,
159 Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
160 Matthew Goins <mjgoins@openflows.com>
161
162 .SH SEE ALSO
163
164 .BR monkeysphere (1),
165 .BR monkeysphere\-authentication (8),
166 .BR monkeysphere (7),
167 .BR gpg (1),
168 .BR ssh (1),
169 .BR sshd (8)