Convert GPG key to ssh key

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Dec 8 17:46:48 CET 2014


On 12/08/2014 11:05 AM, Salih Kardan wrote:

> I am just trying to convert gpg key to ssh key to be able use it in
> authorized_keys file and I am using *`gpgkey2ssh $key_id`  *command.
> However this command does not work properly and gives this error :

> gpg: error reading key: public key not found
> gpgkey2ssh: gpgkey2ssh.c:278: main: Assertion `(algorithm_id == 1) ||
> (algorithm_id == 17)' failed.
> Aborted (core dumped)

the gpgkey2ssh script isn't particularly well-documented or
well-supported, unfortunately.

Is they key you're looking to convert an RSA key or a DSA key?
The above suggests that it is not. (see the list of publickey algorithms
for OpenPGP [0]).

Are you trying to convert a specific subkey?  are you identifying the
subkey explicitly?

You may also be interested in the "openpgp2ssh" conversion script in the
monkeysphere package [1].

Regards,

	--dkg

[0] https://tools.ietf.org/html/rfc4880#section-9.1
[1] http://web.monkeysphere.info/



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20141208/be73f554/attachment.sig>


More information about the Gnupg-users mailing list