131b8c75ed786cff2027d89734fe36ec45a48a52
[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 version
82 Show the monkeysphere version number.  `v' may be used in place of
83 `version'.
84 .TP
85 .B help
86 Output a brief usage summary.  `h' or `?' may be used in place of
87 `help'.
88
89
90 Other commands:
91 .TP
92 .B diagnostics
93 Review the state of the monkeysphere server host key and report on
94 suggested changes.  Among other checks, this includes making sure
95 there is a valid host key, that the key is not expired, that the sshd
96 configuration points to the right place, etc.  `d' may be used in
97 place of `diagnostics'.
98
99 .SH SETUP HOST AUTHENTICATION
100
101 To enable host verification via the monkeysphere, an OpenPGP key must
102 be made out of the host's ssh key, and the key must be published to
103 the Web of Trust.  This is not done by default.  The first step is to
104 import the host's ssh key into a monkeysphere-style OpenPGP key.  This
105 is done with the import\-key command.  When importing a key, you must
106 specify the path to the host's ssh RSA key to import, and a hostname
107 to use as the key's user ID:
108
109 # monkeysphere\-host import\-key /etc/ssh/ssh_host_rsa_key host.example.org
110
111 On most systems, the ssh host RSA key is stored at
112 /etc/ssh/ssh_host_rsa_key.
113
114 Once the host key has been imported, it must be published to the Web
115 of Trust so that users can retrieve the key when sshing to the host.
116 The host key is published to the keyserver with the publish\-key
117 command:
118
119 $ monkeysphere\-host publish\-key
120
121 In order for users logging into the system to be able to identify the
122 host via the monkeysphere, at least one person (e.g. a server admin)
123 will need to sign the host's key.  This is done using standard OpenPGP
124 keysigning techniques, usually: pull the key from the keyserver,
125 verify and sign the key, and then re-publish the signature.  Please
126 see http://web.monkeysphere.info/signing-host-keys/ for more
127 information.  Once an admin's signature is published, users logging
128 into the host can use it to validate the host's key without having to
129 manually check the host key's fingerprint.
130
131 .SH ENVIRONMENT
132
133 The following environment variables will override those specified in
134 the config file (defaults in parentheses):
135 .TP
136 MONKEYSPHERE_LOG_LEVEL
137 Set the log level.  Can be SILENT, ERROR, INFO, VERBOSE, DEBUG, in
138 increasing order of verbosity. (INFO)
139 .TP
140 MONKEYSPHERE_KEYSERVER
141 OpenPGP keyserver to use. (pool.sks\-keyservers.net)
142 .TP
143 MONKEYSPHERE_PROMPT
144 If set to `false', never prompt the user for confirmation. (true)
145
146 .SH FILES
147
148 .TP
149 /etc/monkeysphere/monkeysphere\-host.conf
150 System monkeysphere\-host config file.
151 .TP
152 /var/lib/monkeysphere/host/ssh_host_rsa_key.pub.gpg
153 A world-readable copy of the host's public key in OpenPGP format,
154 including all relevant self-signatures.
155
156 .SH AUTHOR
157
158 This man page was written by:
159 Jameson Rollins <jrollins@fifthhorseman.net>,
160 Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
161 Matthew Goins <mjgoins@openflows.com>
162
163 .SH SEE ALSO
164
165 .BR monkeysphere (1),
166 .BR monkeysphere\-authentication (8),
167 .BR monkeysphere (7),
168 .BR gpg (1),
169 .BR ssh (1),
170 .BR sshd (8)