How to prevent rsync (using ssh as remote shell) from facing a password prompt
You can configure the SSH client to not attempt password authentication:
rsync -e 'ssh -o PasswordAuthentication=no' ...
There is also a BatchMode
option which disables password authentication and decreases the timeout:
rsync -e 'ssh -o BatchMode=yes' ...