You can login to a remote Linux machine without entering a password.
First, we need to create public and private keys using ssh-key-gen on the localhost.
ssh-keygen
Now, we have two files in the .ssh directory “id_rsa” as private key file and “id_rsa.pub” as public key file.
Now, we need to copy the public key to the remote host
ssh-copy-id -i ~/.ssh/id_rsa.pub <your_remote_host_ip>
Let’s try to connect remote host without using a password.
ssh <your_remote_host_ip>
Ok, that’s it!