8

I have someone's ssh public key and I want to encrypt a message with it so that he is the only one who can read it. However, a simple import with gpg --import doesn't work because the format is different.

How can I convert the public key (in the format as they appear in authorized_keys) to a format that gpg can import?

1

1 Answer 1

5

The two keys each serve a different purpose, and as a result are not interchangeable.

Specifically, SSH keys are basic asymmetric key pairs, much of the values that PGP keys require, are not present in SSH.

You could substitute the missing certificate value by self-signing the SSH key, but this seems flakey, and cannot guarantee it will import into GPG.

Best to obtain a generated GPG key from this person.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .