How can I allow the user "postgres" on one server to rsync to another?

view story

http://serverfault.com – I'm trying to get this command to work as the user postgres (so I can ship wal files): rsync -a /tmp/test postgres@server2:/tmp/test But I get the error: Permission denied (publickey). I've run ssh-keygen eval `ssh-agent` and ssh-add as postgres user on server1. keygen created /var/lib/postgresql/.ssh/id_rsa and id_rsa.pub and I can see that it's sent by using ssh -vvv postgres@server2. On server2 I've created /var/lib/postgresql/.ssh/authorized_keys put the contents of id_rsa.pub form server1 in it. It's owned by postgres user and group and chmod 600. The .ssh directory is also owned b (HowTos)