-   Linux - Software (
-   -   Rsync and SSH (

Phaethar 03-22-2004 11:38 AM

Rsync and SSH
I'm trying to set up a job that I can run through Cron that will copy all data from 1 PC to another. It's going to be at a different location, so I want to get it set up to use SSH. I've been able to get all the config files set up, and it copies all the right data... only problem is that it always asks me for a password before it will move any data. I'm trying to figure out why it's doing that. From reading the man pages, it sounds like I just need to add the "auth users = <username>" and the "secrets file = /location" options to the rsyncd.conf file. I've put them both in, and have the secrects file set up with the username:password listed on the first line, just as it says. The command I'm running looks like this:


rsync --verbose --progress --stats --compress --rsh="ssh" --recursive --times --perms --links --delete /source/* hostname:/destination
It then prompts me for the username for the user. After it's entered, it runs perfectly, copying everything over that's changed. The destination system is running in daemon mode.. and I just don't know why it continues to ask for a password. Is there a way to store the UN/PW in a file somewhere so I can automate this? Thanks for any advice.

Hangdog42 03-22-2004 01:22 PM

Don't use a username and password. Use public key authentication as described here

linuxboy69 03-22-2004 03:27 PM

I use rsync to copy information from our production server to our webservers using rsync without authentication using ssh keys on a cron. It is great and very fast.

Phaethar 03-22-2004 04:18 PM

Thanks for the tip Hangdog42, I set it up using the public key authentication and everything works great now. I have things running every 20 minutes, and it's very fast so far.

Thanks again. :D

All times are GMT -5. The time now is 01:29 AM.