When automating a task, there's nothing more annoying than an "are you sure?"-question popping up.
If you want to automate an
chances are this is the first time you're connecting to your target.
Thus, you'll be presented with the following message:
$ ssh example.com The authenticity of host 'example.com (...)' can't be established. RSA key fingerprint is SHA256:P2VbGDRAAaPQTaBovKynIccHxse4aXNH0ZgGLyVTzQL. Are you sure you want to continue connecting (yes/no/[fingerprint])?
This check can be turned off with the
$ ssh -o StrictHostKeyChecking=no example.com
Caution: This is a security check to mitigate different attacks. Only turn this feature off if you understand the risks.