OMFG I AM TIRED OF typing MY PASSWD@#$^@#%^#@$^

Here’s how to generate ssh keys you can use to automatically login to a remote server.

1: First, on either machine, create the keys. a) Run the command, “ssh-keygen -t rsa” b) Accept the default options by basically pushing enter through them 2: Now you should have a id_rsa file and an id_rsa.pub file. a) Move the id_rsa (your private key file) to the client computer in the ~/.ssh directory of the user who will you will be logging into the server. b) Move the id_rsa.pub file to the ~/.ssh directory of the user (on the server) who you will login as when you connect to the remote server. 3: On the server, copy the contents of the id_rsa.pub file (the key) into a file (also in ~/.ssh) called “authorized_keys” 4: Make sure permissions on both the id_rsa and id_rsa.pub are set to 600 and the user for which the files belong to is the owner.

That’s it. Now when you run the ssh command, you don’t have to type a password!

NOTE: This is not recommended enless the client PC is very secure. If someone were to get that private id_rsa file, you are screwed.

Mario Loria is a builder of diverse infrastructure with modern workloads on both bare-metal and cloud platforms. He's traversed roles in system administration, network engineering, and DevOps. You can learn more about him here.