serverssh-keysdyndns

Remote ssh fails when server ip changes


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?


Solution

  • 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