OMFG I AM TIRED OF typing MY [email protected]#$^@#%^#@$^
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 idrsa file and an idrsa.pub file. a) Move the idrsa (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 idrsa.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 idrsa.pub file (the key) into a file (also in ~/.ssh) called "authorizedkeys" 4: Make sure permissions on both the idrsa and idrsa.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.