1OPENPGP2SSH(1)            BSD General Commands Manual           OPENPGP2SSH(1)
2

NAME

4     openpgp2ssh — translate OpenPGP keys to SSH keys
5

SYNOPSIS

7     openpgp2ssh < mykey.gpg
8
9     gpg --export $KEYID | openpgp2ssh $KEYID
10
11     gpg --export-secret-key $KEYID | openpgp2ssh $KEYID
12

DESCRIPTION

14     openpgp2ssh takes an OpenPGP-formatted primary key and associated subkeys
15     on standard input, and spits out the requested equivalent SSH-style key
16     on standard output.
17
18     If the data on standard input contains no subkeys, you can invoke
19     openpgp2ssh without arguments.  If the data on standard input contains
20     multiple keys (e.g. a primary key and associated subkeys), you must spec‐
21     ify a specific OpenPGP key identifier as the first argument to indicate
22     which key to export.  The key ID is normally the 40 hex digit OpenPGP
23     fingerprint of the key or subkey desired, but openpgp2ssh will accept as
24     few as the last 8 digits of the fingerprint as a key ID.
25
26     If the input contains an OpenPGP RSA public key, it will be converted to
27     the OpenSSH-style single-line keystring, prefixed with the key type
28     (`ssh-rsa').  This format is suitable (with minor alterations) for inser‐
29     tion into known_hosts files and authorized_keys files.
30
31     If the input contains an OpenPGP RSA secret key, it will be converted to
32     the equivalent PEM-encoded private key.
33
34     openpgp2ssh is part of the monkeysphere(7) framework for providing a PKI
35     for SSH.
36

CAVEATS

38     The keys produced by this process are stripped of all identifying infor‐
39     mation, including certifications, self-signatures, etc.  This is inten‐
40     tional, since ssh attaches no inherent significance to these features.
41
42     openpgp2ssh will produce output for any requested RSA key.  This means,
43     among other things, that it will happily export revoked keys, unverifi‐
44     able keys, expired keys, etc.  Make sure you do your own key validation
45     before using this tool!
46

EXAMPLES

48     gpg --export-secret-key $KEYID | openpgp2ssh $KEYID | ssh-add -c
49     /dev/stdin
50
51     This pushes the secret key into the active ssh-agent(1).  Tools such as
52     ssh(1) which know how to talk to the ssh-agent(1) can now rely on the
53     key.
54

AUTHOR

56     openpgp2ssh and this man page were written by Daniel Kahn Gillmor
57     <dkg@fifthhorseman.net>.
58

BUGS

60     openpgp2ssh only works with RSA keys.  DSA keys are the only other key
61     type available in both OpenPGP and SSH, but they are currently unsup‐
62     ported by this utility.
63
64     openpgp2ssh only accepts raw OpenPGP packets on standard input.  It does
65     not accept ASCII-armored input.  openpgp2ssh Currently only exports into
66     formats used by the OpenSSH.  It should support other key output formats,
67     such as those used by lsh(1) and putty(1).
68
69     Secret key output is currently not passphrase-protected.
70
71     openpgp2ssh currently cannot handle passphrase-protected secret keys on
72     input.
73

SEE ALSO

75     pem2openpgp(1), monkeysphere(1), monkeysphere(7), ssh(1),
76     monkeysphere-authentication(8), monkeysphere-host(8)
77
78BSD                              June 22, 2019                             BSD
Impressum