1MONKEYSPHERE(1)                  User Commands                 MONKEYSPHERE(1)
2
3
4

NAME

6       monkeysphere - Monkeysphere client user interface
7
8

SYNOPSIS

10       monkeysphere subcommand [args]
11
12

DESCRIPTION

14       Monkeysphere  is  a  framework to leverage the OpenPGP web of trust for
15       OpenSSH and TLS key-based authentication.  OpenPGP keys are tracked via
16       GnuPG,  and  added to the authorized_keys and known_hosts files used by
17       OpenSSH for connection authentication.  Monkeysphere can also  be  used
18       by a validation agent to validate TLS connections (e.g. https).
19
20       monkeysphere is the Monkeysphere client utility.
21
22

SUBCOMMANDS

24       monkeysphere takes various subcommands:
25
26       update-known_hosts [HOST]...
27              Update  the known_hosts file.  For each specified host, gpg will
28              be queried for a key associated with  the  host  URI  (see  HOST
29              IDENTIFICATION  in  monkeysphere(7)), optionally querying a key‐
30              server.  If an acceptable key is found for  the  host  (see  KEY
31              ACCEPTABILITY  in  monkeysphere(7)),  the  key  is  added to the
32              user's known_hosts file.  If a key is found but is  unacceptable
33              for  the  host,  any  matching  keys are removed from the user's
34              known_hosts file.  If no gpg key is found for the host,  nothing
35              is  done.   If  no  hosts are specified, all hosts listed in the
36              known_hosts file will be processed.  This subcommand  will  exit
37              with  a status of 0 if at least one acceptable key was found for
38              a specified host, 1 if no matching keys were found at all, and 2
39              if  matching  keys were found but none were acceptable.  `k' may
40              be used in place of `update-known_hosts'.
41
42       update-authorized_keys
43              Update the authorized_keys file for the user executing the  com‐
44              mand  (see  MONKEYSPHERE_AUTHORIZED_KEYS in ENVIRONMENT, below).
45              First all monkeysphere keys are cleared from the authorized_keys
46              file.   Then, for each user ID in the user's authorized_user_ids
47              file, gpg will be queried for keys associated with that user ID,
48              optionally  querying a keyserver.  If an acceptable key is found
49              (see KEY ACCEPTABILITY in monkeysphere(7)), the key is added  to
50              the user's authorized_keys file.  If a key is found but is unac‐
51              ceptable for the user ID, any matching keys are removed from the
52              user's  authorized_keys  file.   If  no gpg key is found for the
53              user ID, nothing is done.  This subcommand will exit with a sta‐
54              tus of 0 if at least one acceptable key was found for a user ID,
55              1 if no matching keys were found at all, and 2 if matching  keys
56              were  found  but none were acceptable.  `a' may be used in place
57              of `update-authorized_keys'.
58
59       gen-subkey [KEYID]
60              Generate an authentication subkey for  a  private  key  in  your
61              GnuPG  keyring.   KEYID  is  the  key ID for the primary key for
62              which the subkey with "authentication" capability will be gener‐
63              ated.  If no key ID is specified, but only one key exists in the
64              secret keyring, that key will be used.  The length of the gener‐
65              ated  key  can  be specified with the `--length' or `-l' option.
66              `g' may be used in place of `gen-subkey'.
67
68       ssh-proxycommand [--no-connect] HOST [PORT]
69              An ssh ProxyCommand that can be used to trigger  a  monkeysphere
70              update of the ssh known_hosts file for a host that is being con‐
71              nected to with ssh.  This works by updating the known_hosts file
72              for  the  host first, before an attempted connection to the host
73              is made.  Once the known_hosts file has been updated, a TCP con‐
74              nection  to the host is made by exec'ing netcat(1).  Regular ssh
75              communication is then done over this netcat TCP connection  (see
76              ProxyCommand in ssh_config(5) for more info).
77
78              This command is meant to be run as the ssh "ProxyCommand".  This
79              can either be done by specifying the proxy command on  the  com‐
80              mand line:
81
82              ssh -o ProxyCommand="monkeysphere ssh-proxycommand %h %p" ...
83
84              or by adding the following line to your ~/.ssh/config script:
85
86              ProxyCommand monkeysphere ssh-proxycommand %h %p
87
88              The  script  can  easily be incorporated into other ProxyCommand
89              scripts by calling it with the "--no-connect" option, i.e.:
90
91              monkeysphere ssh-proxycommand --no-connect $HOST $PORT
92
93              This will run everything except the final exec of netcat to make
94              the TCP connection to the host.  In this way this command can be
95              added to another proxy command that does other stuff,  and  then
96              makes the connection to the host itself.
97
98              KEYSERVER  CHECKING: The proxy command has a fairly nuanced pol‐
99              icy for when keyservers are queried when processing a host.   If
100              the  host userID is not found in either the user's keyring or in
101              the known_hosts file, then the keyserver is queried for the host
102              userID.  If the host userID is found in the user's keyring, then
103              the keyserver is not checked.  This assumes that the keyring  is
104              kept  up-to-date,  in a cronjob or the like, so that revocations
105              are properly handled.  If the host userID is not  found  in  the
106              user's  keyring, but the host is listed in the known_hosts file,
107              then the keyserver is  not  checked.   This  last  policy  might
108              change  in  the  future, possibly by adding a deferred check, so
109              that hosts that  go  from  non-monkeysphere-enabled  to  monkey‐
110              sphere-enabled will be properly checked.
111
112              Setting  the  CHECK_KEYSERVER variable in the config file or the
113              MONKEYSPHERE_CHECK_KEYSERVER  environment  variable  to   either
114              `true'  or  `false'  will override the keyserver-checking policy
115              defined above and either always or never check the keyserver for
116              host key updates.
117
118
119       subkey-to-ssh-agent [ssh-add arguments]
120              Push  all  authentication-capable  subkeys  in your GnuPG secret
121              keyring into your running ssh-agent.  Additional  arguments  are
122              passed  through  to  ssh-add(1).   For  example,  to  remove the
123              authentication subkeys, pass an additional  `-d'  argument.   To
124              require  confirmation  on  each  use of the key, pass `-c'.  The
125              MONKEYSPHERE_SUBKEYS_FOR_AGENT environment can be used to  spec‐
126              ify  the  full fingerprints of specific keys to add to the agent
127              (space separated), instead of adding them all.  `s' may be  used
128              in place of `subkey-to-ssh-agent'.
129
130       keys-for-userid USERID
131              Output  to  stdout all acceptable keys for a given user ID.  `u'
132              may be used in place of `keys-for-userid'.
133
134       sshfprs-for-userid USERID
135              Output the ssh fingerprints of acceptable keys for a given  user
136              ID.
137
138       version
139              Show  the monkeysphere version number.  `v' may be used in place
140              of `version'.
141
142       help   Output a brief usage summary.  `h' or `?' may be used  in  place
143              of `help'.
144
145

ENVIRONMENT

147       The  following  environment  variables will override those specified in
148       the monkeysphere.conf configuration file (defaults in parentheses):
149
150       MONKEYSPHERE_LOG_LEVEL
151              Set the log level.  Can be SILENT, ERROR, INFO, VERBOSE,  DEBUG,
152              in increasing order of verbosity. (INFO)
153
154       MONKEYSPHERE_GNUPGHOME, GNUPGHOME
155              GnuPG home directory. (~/.gnupg)
156
157       MONKEYSPHERE_KEYSERVER
158              OpenPGP keyserver to use. (pool.sks-keyservers.net)
159
160       MONKEYSPHERE_CHECK_KEYSERVER
161              Whether  or  not  to  check  keyserver  when making gpg queries.
162              (true)
163
164       MONKEYSPHERE_KNOWN_HOSTS
165              Path to ssh known_hosts file. (~/.ssh/known_hosts)
166
167       MONKEYSPHERE_HASH_KNOWN_HOSTS
168              Whether or not to hash to the known_hosts file entries. (false)
169
170       MONKEYSPHERE_AUTHORIZED_KEYS
171              Path to ssh authorized_keys file. (~/.ssh/authorized_keys)
172
173       MONKEYSPHERE_PROMPT
174              If set to `false',  never  prompt  the  user  for  confirmation.
175              (true)
176
177       MONKEYSPHERE_STRICT_MODES
178              If  set to `false', ignore too-loose permissions on known_hosts,
179              authorized_keys, and authorized_user_ids files.   NOTE:  setting
180              this to false may expose you to abuse by other users on the sys‐
181              tem. (true)
182
183       MONKEYSPHERE_SUBKEYS_FOR_AGENT
184              A space-separated list of authentication-capable subkeys to  add
185              to the ssh agent with subkey-to-ssh-agent.
186
187

FILES

189       ~/.monkeysphere/monkeysphere.conf
190              User monkeysphere config file.
191
192       /etc/monkeysphere/monkeysphere.conf
193              System-wide monkeysphere config file.
194
195       ~/.monkeysphere/authorized_user_ids
196              A  list of OpenPGP user IDs, one per line.  OpenPGP keys with an
197              exactly-matching User ID (calculated  valid  by  the  designated
198              identity  certifiers), will have any valid authorization-capable
199              keys or subkeys added to the given user's authorized_keys file.
200
201

AUTHOR

203       Written by: Jameson Rollins <jrollins@finestructure.net>,  Daniel  Kahn
204       Gillmor <dkg@fifthhorseman.net>
205
206

SEE ALSO

208       monkeysphere-host(8),  monkeysphere-authentication(8), monkeysphere(7),
209       ssh(1), ssh-add(1), gpg(1)
210
211
212
213monkeysphere                       June 2008                   MONKEYSPHERE(1)
Impressum