-1

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?

John Wooten
  • 685
  • 1
  • 6
  • 21

1 Answers1

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