SSH passwordless login in OpenSSH

You can login to a remote Linux server without entering password in 3 simple steps:

  1. create public and private keys on the source/local server:

    # ssh-keygen
  2. copy the public key from local to destination/remote host:

    # ssh-copy-id -i ~/.ssh/id_rsa.pub <remote ip>
  3. 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.