Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Running "ssh-keygen -t dsa" generates two files, a private and public key. Its simple enough to comprehend that the private key is used to identify yourself to the outside world, which only sees your public key.

However, I've also seen ".pem" files used as well, and I use them myself. Whats the relationship between the .pem file and pub files. I was hoping for a simple answer, but other questions (http://serverfault.com/questions/9708/what-is-a-pem-file-and-how-does-it-differ-from-other-openssl-generated-key-file) seem to indicate that there is no simple explanation for why a pem file might be better/worse in different scenarios to a pub file.

share|improve this question

2 Answers 2

In ssh connections, keys are exchanged.

key1 is the private key and key.pub is the public key.

Read more at: Public-key cryptography

The .pem files are certificates (in base64) , exchanged in HTTPS protocol (TLS/SSL). Read more at: X.509

share|improve this answer
    
Seriously? Wikipedia links? Hardly better than linking to google search results... –  odigity Jul 15 at 18:02

Check here and here for a good explanation about the various formats and the tool used to generate the keys.

share|improve this answer
2  
certainly i could read these two articles but this answer is borderline tldr –  jayunit100 Jan 2 '13 at 20:22
    
well, i guess when in rome -- theres also this one. serverfault.com/questions/461528/… –  jayunit100 Jan 2 '13 at 20:23
    
The first link in this answer is to the same alternative question linked from the body of this question. However, it was useful... –  odigity Jul 15 at 18:10

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.