Login to server without password


Storing passwords for servers you run is one of those tasks that needs to be done safely and, in a way that can it can be found when you need it.

However, logging in to your server when you need to type in you password over and over again is not only boring, but takes time and effort.

Not to mention that storing server passwords with teams puts you in a danger of having somebody else handling them without care.

There is an option to do this easily and without using passwords. Just follow these steps:

  1. Copy your computers public key: pbcopy < ~/.ssh/id_rsa.pub
  2. Login to server and edit following file: vim ~/.ssh/authorized_keys
  3. Append key you copied and save the file :wq
  4. Make sure you do following: chmod 640 ~/.ssh/authorized_keys
  5. Check if ~/.ssh is 700.

After you added your key, you will be able to login to the server without using passwords. :)

Happy hacking!