I run rsync from a script and that's working fine but of course this will only work if the machine has the necessary SSH keys installed. Sometimes the script is run on other machines and the process hangs because it is waiting for a password.
I'd like to tell rsync that whenever it requires interactive authentication it should just fail and exit instead of waiting. However I was unable to find such an option in the man page.
So I'm not looking for a way to tell rsync the right password but a way to prevent any interaction if that means rsync termination.
Alternatively is there a way to know (from another process) if rsync is waiting for a password/abort the password prompt?