I use Dyndns to provide a domain name to outside clients, e.g. ralph.com, so that when my provider changes my IP address, they can still access my site. This works. However, when I try to administer the server using ssh remotely, I get messages about invalid ssh key and “man in the middle” attacks. I am unable to connect to the server to correct the ssh key problem. What can I do to either connect when this happens, or prevent this from happening?
Asked
Active
Viewed 391 times
-1
-
1This should be posted on ServerFault, not SO, as it's not about programming specifically. – underscore_d Nov 13 '17 at 15:06
-
Turned out it was a “programming question” since I created an expression in a shell script to allow me to log in remotely. – John Wooten Nov 14 '17 at 18:18
1 Answers
1
The only thing you can do is to disable the host key verification.
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
See here for more details : http://linuxcommando.blogspot.fr/2008/10/how-to-disable-ssh-host-key-checking.html

jseguillon
- 393
- 1
- 10
-
Thanks. I created an alias on my portable that uses that. I can use it when normal ssh fails. This has only happened once in several years. It allows me to log in, remove the old entry in known_hosts and then ssh again and have it work. That way I only drop strict checking for the short time I’m fixing the problem. – John Wooten Nov 14 '17 at 18:16