Temporarily ignore my `~/.ssh/known_hosts` file?

You can use ssh -o StrictHostKeyChecking=no to turn off checking known_hosts momentarily. But I’d advise against this. You should really check why the host key has changed.

Another option is to add a specific entry to your ~/.ssh/config for the host in question. This might be valid approach if you have a certain host which generates new host keys every time it reboots and it gets rebooted for a valid reason several times a day.

Host <your problematic host>
  StrictHostKeyChecking no

Leave a Comment