I need help on this. I'm trying to execute this line from the command line and getting this error about host key. my mount point is there and I verify the hosts key is there as well any help on this will much appreciated.
su oracle -c '/usr/bin/rsync -zarR --delete --exclude "lost+found" --links --rsh="ssh -i /home/oracle/.ssh/rsync_lowZone_priv" hostname:/u02 /'
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at io.c(600) [receiver=3.0.6]
Thank you
Try to connect first simply using ssh only, then post adding it to known hosts try sshpass, etc. as required.
In my case, I had done a clean new install of linux distro and installed sshpass and it started giving errors, they all went away as soon as I connected first via ssh and added the remote server's IP in the known hosts.
I solved same problem with this command:
rsync --rsh="/usr/bin/sshpass -p "password" ssh -o StrictHostKeyChecking=no -l root" /source/file/path [email protected]:/destination/file/path
Note: Be sure about each side has sshpass installation before usage.
In my case I was able to just 'ssh user@host' first and it offered to auto-generate the key for me which was then saved for subsequent sessions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With