This is one of the things every command line geek needs every once in a while. Note that you should never do this on a public computer. If you have not generated an RSA key yet, do it with this command:
ssh-keygen -t rsa
You can decide whether to use a password or not. Then, display the key with
Copy the key to clipboard and log in with ssh to your server you want to have passwordless. On the remote server, run
Paste the key to that file and save it (in nano it’s CTRL+O and to quit use CTRL+X). If you prefer vim, use it instead of nano. If .ssh directory cannot be found, create it with
mkdir ~/.ssh and edit the authorized_keys as above.
After this, you can ssh into the machine without having to type a password.
Want to write with me?
Do you know something about tech, nerdy stuff, movies, code, AI, Internet phenomena, social media or anything related to geeky subjects? Join and write with me! I'm currently doing this alone and my time is not sufficient for upkeeping the blog by myself, so all pieces of articles are welcome. Contact me and get your user account.