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.
also, I for better security, I considered usingssh-keygen -t rsa
ssh-keygen -t rsa -b 4096
Then I was asked for a filename and location and a pass-phrase after which it was done! :)
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.
ReplyDeleteSSH keys rule.
Thanks Marius. :) I have incorporated this information.
ReplyDelete