In Linux, creating a public/private SSH key is easy. Alternatively, you can also use the DSA (Digital Signing Algorithm) technology to create the public/private key. Note: there has been much debate about the security of DSA and RSA. In my opinion, unless you are very particular and love to delve into the technical detail between the two technologies, it doesn’t matter which of the two you choose. Both will work fine. Scroll down the config file and make sure the following attributes are set correctly: Press Ctrl + O to write and save the file, then Ctrl + X to close the file. That’s it. You can now connect to your remote host with the following command: Image credit: Unsplash. All alterations and screenshots by Ramces Red. To change the file and folder permissions, access a local console for your remote machine, thrn go to your “/home” directory and run: chmod 700 /home/$USER/.ssh && chmod 600 /home/$USER/.ssh/authorized_keys. Lastly, restart the daemon to apply your new settings: sudo systemctl restart ssh. Aside from that, make sure that you specify the key you want to use to log in to your remote host by running: ssh -i /home/$USER/.ssh/filename username@remote.host.ip.address. Lastly, leave the old machine by pressing Ctrl + D and connect to your remote host with both your new and old keys.