7 Comments

  1. You can also try the one command:

    cat .ssh/id_rsa.pub | ssh username@remotemachine ‘cat >> .ssh/authorized_keys’

  2. Another common problem is that SELinux blocks password-less SSH login after re-installing Linux but keeping the old home, you may need to do a `restorecon -Rv /home`. You can take a look at the directory ownership and SELinux labels by `ls -lZ`.

  3. Express Way:
    user_a@Server_A>ssh-keygen -t rsa -b 4096 -N “” -f ~/.ssh/id_rsa
    user_a@Server_A> ssh-copy-id -i ~/.ssh/id_rsa.pub user_b@Server_B

Leave a Reply

Your email address will not be published. Required fields are marked *