How do I fix "REMOTE HOST IDENTIFICATION HAS CHANGED" when I SSH to my VPS?

1 min read|Updated Nov 23, 2026

Short answer

After a reinstall your VPS has a new host key, but your computer remembers the old one. Run ssh-keygen -R followed by the server's IP, connect again and accept the new key.

  1. 01

    Remove the old key

    Run ssh-keygen -R 203.0.113.18 with your server's IP. It works the same on macOS, Linux and Windows PowerShell.

  2. 02

    Connect again

    ssh [email protected], answer yes to trust the new key, then enter the password from the server page.

  3. 03

    "Host not found in known_hosts"?

    If you use another port, run ssh-keygen -R "[203.0.113.18]:2222". Otherwise the warning names the file and line, like known_hosts:7. Delete that line by hand.

Only accept a new key when you know why it changed: a reinstall, a new server or a new IP. If nothing changed on your side, ask support before you log in.

Did this solve it?

The full guide

Can't SSH Into Your VPS? Fixes for 6 Common Errors

8 min read

Related questions

Still stuck? Message support