2 .Dd $Mdocdate: June 11, 2008 $
7 .Nd translate OpenPGP keys to SSH keys
9 .Nm openpgp2ssh < mykey.gpg
11 .Nm gpg --export $KEYID | openpgp2ssh $KEYID
13 .Nm gpg --export-secret-key $KEYID | openpgp2ssh $KEYID
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.
20 If the data on standard input contains no subkeys, you can invoke
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
28 will accept as few as the last 8 digits of the fingerprint as a key
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.
36 If the input contains an OpenPGP RSA or DSA secret key, it will be
37 converted to the equivalent PEM-encoded private key.
42 framework for providing a PKI for SSH.
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
50 only works with RSA or DSA keys, because those are the
51 only ones which work with ssh.
53 Assuming a valid key type, though,
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!
60 .Nm gpg --export-secret-key $KEYID | openpgp2ssh $KEYID | ssh-add -c /dev/stdin
62 This pushes the secret key into the active
66 which know how to talk to the
68 can now rely on the key.
71 and this man page were written by Daniel Kahn Gillmor
72 <dkg@fifthhorseman.net>.
75 Currently only exports into formats used by the OpenSSH.
76 It should support other key output formats, such as those used by
79 Secret key output is currently not passphrase-protected.
82 currently cannot handle passphrase-protected secret keys on input.
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.
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
97 .Xr monkeysphere-server 8