You can login to a remote Linux server without entering password in 3 simple steps:
-
create public and private keys on the source/local server:
# ssh-keygen
-
copy the public key from local to destination/remote host:
# ssh-copy-id -i ~/.ssh/id_rsa.pub <remote ip>
-
test passwordless login:
# ssh <remote ip>
If all went well you should not be asked for a password. You can find your key on the remote system in ~/.ssh/authorized_keys
Thie above commands were executed as root user and the mechanism is done for root@local -> root@remote.