get around rsync password prompt

Hey there, I'm trying to do a very simple rsync to back up my computer to an external drive connected via usb every night, but it keeps asking for a password. I tried using the password file flag, but it looks like that is only a daemon. Does anyone have any ideas? This has eaten up a lot of my time unfortunately. I would really appreciate it. Thanks so much.

here is a sample of my rsync

time sudo rsync -aE --progress /Users/afrancis/Desktop/1/ /Users/afrancis/Desktop/2

every time, it asks for a password. is there any way to automate that so i can schedule it?

Aaron

you can work with "expect" to automate this...

E.g.:
Automating rsync with a Simple Expect Script

or else does the .rhosts file apply to rsync as well as rsh and rlogin?

Use launchd, make it a launchd item and make it run once a day at midnight or whatever and it will run as root.

Hi,
if You're not too worried about the security issues (if for example You have an only local communication and no acces from the outside) You may want to consider creating password less ssh-keys, that way You don't have to enter a password or passphrase every time.

Best regards,
Lakris