Re: rsync won't stop password prompt
-----BEGIN PGP SIGNED MESSAGE-----
Rob Brenart wrote:
> 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
- --password-file only works if you are connecting to an rsync daemon
running on "host". I'm not totally sure about this, but since you have
specified the "-e ssh" option, I'm guessing that you are running rsync
with ssh as transport. In this case it is ssh, not rsync, that
authenticates you. The best way I know of to do scripts lke this is to
create a key-pair for ssh, and add the public key to authorized_keys
file on "host".
"man ssh" has more on this. Of course you could also run rsync as daemon
on "host" with "rsync --daemon", but this is not recommended unless you
are on a trusted network, or run a public anonymous rsync service.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----