Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I know a bit about computer security, and well as about the concept of public and private keys. I also know that both GPG and (Open)SSH use the public/private key system. My question is, is there any reason that I would not want to use my GPG keys as authentication for SSH?

Please note that, while a have a little bit more experience with Linux, GPG, and SSH than the average computer user, I am by no means an expert. Please be patient and point out any mistakes that you might see.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

No, it wouldn't. To put things simply, GPG and SSH do not use the same key format, which is a practical hurdle right from the start. Furthermore, the two key pairs might not have the same validity — you might want to repudiate one and not the other, or to have different SSH keys on different accounts but the same GPG key everywhere.

There's nothing to be gained by using the same key anyway. You'd have to convert the GPG key into an SSH key (assuming your GPG key is an RSA key in the first place!). At this point, you might as well generate a different key, since no tool is going to check one against the other.

share|improve this answer
    
What are some of the differences between the key formats? Do the different formats employ different algorithms for generating public/private pairs? Does this have anything to do with RSA and DSA, which I repeatedly hear about? –  InkBlend Oct 25 '12 at 4:25
1  
@InkBlend Both SSH and GPG support multiple key types, yes. See the ssh-keygen for the key types supported by SSH and the GPG handbook for the key types supported by GPG. –  Gilles Oct 25 '12 at 9:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.