How do you bypass this question or add a flag that auto answers this?
Because I am trying to write a script, and this question keeps stopping the process of rsync since there is no way to answer this in the script when prompted.
Set the StrictHostKeyChecking
option to no
, either in the config file or via -o
.
Use e
option of rsync
to pass options to ssh
:
-e "ssh -o StrictHostKeyChecking=no"