Friday, November 12, 2010

My SSH key

I created a SSH key for authenticating me and establishing a secure connection between my pc and the project hosting server. Otherwise also, if your SSH servers are visible over the Internet, you should use public key authentication instead of passwords if at all possible!

I created a key pair using RSA public key cryptography algorithm using 3 simple commands on the terminal:

Note: The ssh-keygen command automatically creates ~/.ssh and assigns appropriate permissions to it, thus reducing the 3 commands to just 1. Thanks Marius for correcting.
ssh-keygen -t rsa
also, I for better security, I considered using
ssh-keygen -t rsa -b 4096 

Then I was asked for a filename and location and a pass-phrase after which it was done! :)


  1. Just a note: ssh-keygen creates ~/.ssh with the correct permissions automatically, if it doesn't already exist, so the setup can be simplified to a single command.

    SSH keys rule.

  2. Thanks Marius. :) I have incorporated this information.