Passwordless Login for Linux Machines
For security reasons, passwordless login is generally implemented using public-private key pairs. Here, I’ll mark down the configuration method.
Log into the client machine and create a public-private key pair if you don’t already have one.
The public and private keys are stored in the
~/.ssh
directory.Log into the target server and open the
~/.ssh/authorized_keys
file.The authorized_keys file records the list of public keys authorized for login.
Copy the public key from the client machine into this file and save it.
Try SSH login to the target machine again, and you’ll find no password is required.