I have a number of automated scripts that use SSH authentication when connecting to a remote host (mobile robot in my case). The problem I have is that this robot is sometimes located in our lab, and other times at home. Another complication is that the robot is sometimes connected via WiFi, ethernet, or both. This means the robot's IP address, even though it is reserved on each network, changes or it can have more than one, and the robot has multiple ECDSA key fingerprints.

The problem I'm having is that because SSH and SCP warning me that the identity of the host cannot be authenticated and the script stops to wait for my input, or in the case of my IDE it simply crashes.

What is a good arrangement to suppress these warning/inputs? Should I be deleting entries from my known_hosts file?


Use SSH certificates (aka ssh keys signed using ssh keys). It is well described in the manual page for sshd.

With certificates, you will be able to verify authenticity of the host regardless its IP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.