SSH Login Without a Password
There are a few reasons you might want to set up password-less login via SSH.
Manual login
For manual login, typing your password over and over is a pain—especially if you're doing this frequently.
Security
In general, password security is hard. You pretty much need to use a password manager to do it right, and if you're using the command line a lot, it can be a little bit cumbersome and time-consuming to look up passwords every time you need to log in to a remote machine.
Automated scripting
If your automated scripts need to log in to a remote machine, the only sensible solution is password-less login.
So in this guide, we're going to learn how to log in to a remote machine using SSH without a password using public key authentication.
Public key authentication
Public key authentication allows us to log in to a remote machine using a cryptographic key rather than a password. To configure public key authentication, we generate a key pair, upload the public key to the remote server, then use our private key to authenticate. Keep reading to learn how to set this up.