Setting up passphrase-less login to your SSH servers is a convenient way of logging into your servers without being annoyed for a passphrase. In today’s post, I’ll take you through generating a key, distributing your identity and logging on.
Generating your key
If you haven’t done so already, you’ll need to generate some authentication keys for yourself. You can do this with ssh-keygen.
The output of which will look like this:
Now that this process has completed, you’re given a public key and private secret key in your .ssh/ folder.
Distribute your identity
To deploy your public key to other servers so that you can authenticate using your private key, you can use ssh-copy-id.
You’ll want to swap out remote-user for the user that you’re associating your key to and remote-host with the machine that you want to connect to.
Another way that you can establish your key into the remote machine’s authorized set is as follows:
You’ll then be taken through the verification process, which is just supplying your remote password:
Conclusion
You’re free to login. Of course, if you don’t set a pass phrase for your keys you won’t be hassled all the time to unlock them. If you do set a pass phrase, your overall solution will be just a bit more secure.