Hi I have an rsync shell script that synchronizes one host with a remote host:
#!/bin/sh
rsync -avz fqdn:/foo/dir1
rsync -avz fqdn:/foo/dir2
rsync -avz fqdn:/foo/dir3
The remote host permits the rsync without a password with ssh pre shared keys but only when the above script uses the fully qualified domain, if I reference the IP of the remote host like this,
#!/bin/sh
rsync -avz 192.168.1.1:/foo/dir1
rsync -avz 192.168.1.1:/foo/dir2
rsync -avz 192.168.1.1:/foo/dir3
It will prompt me for a password for the remote host, why does it behave like this?
Ideally I want the IP reference in the case that the host can't resolve the remote host.