rsync without password, none of google (server fault) tutorials worked

Posted by Jake Armstrong on Server Fault See other posts from Server Fault or by Jake Armstrong
Published on 2012-12-18T12:51:57Z Indexed on 2012/12/19 11:04 UTC
Read the original article Hit count: 221

Filed under:
|
|
|
|

I need to use rsync for a daily backup operation and in the past (on different servers) I managed to just use a rsa key etc, but now none of google (serverfault) tutorials work at all.

It keeps asking me for a password.

I have webmin and ssh/root access to both servers.

My steps:

  1. create a key on server 1
  2. send key.pub to server 2
  3. add key.pub to .ssh/authorized_keys
  4. chmod 700 .ssh/authorized_keys
  5. go back to server 1 and try rsync and it keep asking for password...

rsync command: rsync -avz -e ssh file.txt root@server2:/root

EDIT: well, I cleaned up everything and this time, instead of inserting a custom name to the key I used the standard one on server1. sent the .pub to server2 and it worked as a charm... So the answer is that server1's ssh wasn't even using the right key...

© Server Fault or respective owner

Related posts about linux

Related posts about ssh