[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rsync won't stop password prompt



Quoting Rob Brenart <debian@oculardata.com>:

I'm trying to script an rsync process and I keep getting the password prompt... here's my "script"

rsync -avz -e /usr/bin/ssh --password-file=/home/username/pwd.rsync /home/user/test/ host:/home/username/test

And it works fine, but it prompts me for a password even though I'm using --password-file

I also tried putting
export RSYNC_PASSWORD=pwd

but that didn't have an effect either.

Any help?
You may want to try using rsync with ssh.
I think the sarge version of rsync will automatically use ssh.
The key to ssh, rsync and no passwords is to have manually generated ssh keys with a blank password. That way, when you ssh to another host, it just logs in.
Combine it with rsync and away you go.
A simple command like:
# rsync -a host:/foo/ /foo/bar/
should work fine with ssh.

Check the ssh man page for more info on creating custom keys if you haven't been down that way before.

Cheers,
Mike



Reply to: