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
23 multiple keys (e.g. a primary key and associated subkeys), you must
24 specify a specific OpenPGP keyid (e.g. CCD2ED94D21739E9) or
25 fingerprint as the first argument to indicate which key to export.
26 The keyid must be exactly 16 hex characters.
28 If the input contains an OpenPGP RSA or DSA public key, it will be
29 converted to the OpenSSH-style single-line keystring, prefixed with
30 the key type. This format is suitable (with minor alterations) for
31 insertion into known_hosts files and authorized_keys files.
33 If the input contains an OpenPGP RSA or DSA secret key, it will be
34 converted to the equivalent PEM-encoded private key.
39 framework for providing a PKI for SSH.
41 The keys produced by this process are stripped of all identifying
42 information, including certifications, self-signatures, etc. This is
43 intentional, since ssh attaches no inherent significance to these
47 only works with RSA or DSA keys, because those are the
48 only ones which work with ssh.
50 Assuming a valid key type, though,
52 will produce output for
53 any requested key. This means, among other things, that it will
54 happily export revoked keys, unverifiable keys, expired keys, etc.
55 Make sure you do your own key validation before using this tool!
57 .Nm gpg --export-secret-key $KEYID | openpgp2ssh $KEYID | ssh-add -c /dev/stdin
59 This pushes the secret key into the active
63 which know how to talk to the
65 can now rely on the key.
68 and this man page were written by Daniel Kahn Gillmor
69 <dkg@fifthhorseman.net>.
72 currently only exports into formats used by the OpenSSH.
73 It should support other key output formats, such as those used by
76 Secret key output is currently not passphrase-protected.
79 currently cannot handle passphrase-protected secret keys on input.
81 It would be nice to be able to use keyids shorter or longer than 16
85 only acts on keys associated with the first primary key
86 passed in. If you send it more than one primary key, it will silently
91 .Xr monkeysphere-server 8