Tweak to man pages.
[monkeysphere.git] / man / man1 / openpgp2ssh.1
1 .\"  -*- nroff -*-
2 .Dd $Mdocdate: June 11, 2008 $
3 .Dt OPENPGP2SSH 1
4 .Os
5 .Sh NAME
6 openpgp2ssh
7 .Nd translate OpenPGP keys to SSH keys
8 .Sh SYNOPSIS
9 .Nm openpgp2ssh < mykey.gpg 
10 .Pp
11 .Nm gpg --export $KEYID | openpgp2ssh $KEYID
12 .Pp
13 .Nm gpg --export-secret-key $KEYID | openpgp2ssh $KEYID
14 .Sh DESCRIPTION
15 .Nm
16 takes an OpenPGP-formatted primary key and associated
17 subkeys on standard input, and spits out the requested equivalent
18 SSH-style key on standard output.
19 .Pp
20 If the data on standard input contains no subkeys, you can invoke
21 .Nm
22 without arguments.  If the data on standard input contains multiple
23 keys (e.g. a primary key and associated subkeys), you must specify a
24 specific OpenPGP key identifier as the first argument to indicate
25 which key to export.  The key ID is normally the 40 hex digit OpenPGP
26 fingerprint of the key or subkey desired, but
27 .Nm
28 will accept as few as the last 8 digits of the fingerprint as a key
29 ID.
30 .Pp
31 If the input contains an OpenPGP RSA or DSA public key, it will be
32 converted to the OpenSSH-style single-line keystring, prefixed with
33 the key type.  This format is suitable (with minor alterations) for
34 insertion into known_hosts files and authorized_keys files.
35 .Pp
36 If the input contains an OpenPGP RSA or DSA secret key, it will be
37 converted to the equivalent PEM-encoded private key.
38 .Pp
39 .Nm
40 is part of the
41 .Xr monkeysphere 1
42 framework for providing a PKI for SSH.
43 .Sh CAVEATS
44 The keys produced by this process are stripped of all identifying
45 information, including certifications, self-signatures, etc.  This is
46 intentional, since ssh attaches no inherent significance to these
47 features.
48 .Pp
49 .Nm
50 only works with RSA or DSA keys, because those are the
51 only ones which work with ssh.
52 .Pp
53 Assuming a valid key type, though, 
54 .Nm
55 will produce output for
56 any requested key.  This means, among other things, that it will
57 happily export revoked keys, unverifiable keys, expired keys, etc.
58 Make sure you do your own key validation before using this tool!
59 .Sh EXAMPLES
60 .Nm gpg --export-secret-key $KEYID | openpgp2ssh $KEYID | ssh-add -c /dev/stdin
61 .Pp
62 This pushes the secret key into the active
63 .Xr ssh-agent 1 . 
64 Tools such as 
65 .Xr ssh 1
66 which know how to talk to the 
67 .Xr ssh-agent 1
68 can now rely on the key.
69 .Sh AUTHOR
70 .Nm
71 and this man page were written by Daniel Kahn Gillmor
72 <dkg@fifthhorseman.net>.
73 .Sh BUGS
74 .Nm
75 Currently only exports into formats used by the OpenSSH.
76 It should support other key output formats, such as those used by
77 lsh(1) and putty(1).
78 .Pp
79 Secret key output is currently not passphrase-protected.
80 .Pp
81 .Nm
82 currently cannot handle passphrase-protected secret keys on input.
83 .Pp
84 Key identifiers consisting of an odd number of hex digits are not
85 accepted.  Users who use a key ID with a standard length of 8, 16, or
86 40 hex digits should not be affected by this.
87 .Pp
88 .Nm
89 only acts on keys associated with the first primary key
90 passed in.  If you send it more than one primary key, it will silently
91 ignore later ones.
92 .Sh SEE ALSO
93 .Xr monkeysphere 1 ,
94 .Xr ssh 1 ,
95 .Xr monkeysphere-server 8