Skip to content
MtrXTools

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

The server's SSH host key is different from last time

Seen in OpenSSH client, git over SSH

The host key the server presented does not match the one saved in known_hosts, which can mean a rebuilt server or an interception attempt.

Common causes

  • The server was reinstalled or replaced, or a new VM reused the same IP or name.
  • The provider rotated its host key (GitHub replaced its RSA host key in March 2023).
  • Less commonly, something is intercepting the connection.

How to fix it

  1. Confirm the new fingerprint out of band (provider docs, console, or the server admin) before trusting it.
  2. Then remove the stale entry: ssh-keygen -R hostname (and the IP if it is listed), and reconnect.
  3. Never disable StrictHostKeyChecking to make the warning go away.

Got a different message? Paste it into the error explainer.

Related errors

All 31 Dev tools & SSH errors