Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ( 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

In ssh connections, keys are exchanged.

key1 is the private key and 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 '14 at 18:02
Didn't even link to the English version for the second one. – ealdent Aug 31 '15 at 15:10

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

share|improve this answer
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.… – 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 '14 at 18:10

You must log in to answer this question.

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