Cannot use ssh without password prompt

"Mike Clay" <[email protected]>
Newsgroups gmane.os.openbsd.www
Message-ID <[email protected]>
I am trying to set up a cron job to perform nightly backups from one linux
server to another using rsync.  Everything is working fine except that I
cannot get it to work without first prompting for a password, which of
course kills the whole cron idea.  Googling, I have found about ten examples
that I have followed.  They are all the same.  My steps to sync server2 with
server1:



On server2, use ssh-keygen to generate a key pair.

scp the public key to server1

On server1, create .ssh/authorized_keys file containing the public key from
server2

Adjust permissions:  700 for .ssh directories on both machines, 600 for
authorized_keys on server1 and the private key on server2

The rsync invocation uses IP addresses, not machine names and explicitly
references the private key on server2

(e.g. rsync  -avz  -e  /usr/bin/ssh  -i ~user/server2-rsync-key
<user>@1.2.3.4:path-to-source/  path-to-dest)



Troubleshooting, I have also tried the following:

Used rsa keys instead of dsa

Renamed authorized_keys authorized_keys2

In /etc/ssh/sshd_config on server1:

AuthorizedKeysFile      <user>/.ssh/authorized_keys

PubkeyAuthentication    yes



What am I missing?



Mike Clay

Configuration Manager

ESPRH Solutions, Inc.

(214) 774-4213
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.