I would like to use rsync within a python script. I'm calling it using the
subprocess module, and authenticating using public keys stored at the
authorized_key file on the remote machine.
The only problem is that when I use rsync using a wrong remote user name, I get prompted for password, which obviously halts the backup script forever.
Can I force
rsync to exit with error if it can't authenticate, rather than prompting for password?