> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Fix "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"

> Fix "REMOTE HOST IDENTIFICATION HAS CHANGED" and "Host key verification failed": check the new fingerprint on the console, then run ssh-keygen -R.

"REMOTE HOST IDENTIFICATION HAS CHANGED" means the server's SSH host key differs from the one your computer saved on an earlier visit. After you rebuild or reinstall a server this is expected, because the new system has new keys. Confirm the new fingerprint on the server's console, then remove the old entry with `ssh-keygen -R 203.0.113.10` and connect again.

```text theme={null}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
...
Offending ED25519 key in /home/you/.ssh/known_hosts:3
  remove with:
  ssh-keygen -f '/home/you/.ssh/known_hosts' -R '203.0.113.10'
Host key verification failed.
```

| Difficulty | Time | Works on | Needs |
| - | - | - | - |
| Beginner | 5 minutes | OpenSSH on Linux, macOS and Windows 10/11; PuTTY | Console access to check the fingerprint |

## Before you start

* A **host key** identifies the server, like an ID card. Your computer stores it in `~/.ssh/known_hosts` on the first connection and checks it every time after.
* The warning protects you from connecting to an impostor. Don't remove the old key until you know why it changed.
* This is a message on **your computer**. The commands run there, not on the server.

## Why did the host key change?

From most to least likely:

1. **You rebuilt or reinstalled the server.** A fresh system creates new host keys. See [rebuild and reinstall your VPS](https://help.freakhosting.com/portals/vps-panel/how-to-rebuild-and-reinstall-your-vps.md).
2. **The IP now belongs to a different server**, for example after you cancelled one server and ordered another, or a domain now points to a new machine.
3. **Someone regenerated the server's host keys**, for example with `ssh-keygen -A` after deleting them.
4. **Someone is intercepting the connection.** Rare, but this is what the warning exists for. If none of the reasons above apply, check before you go on.

## Step 1: Check the real fingerprint on the server

Open the [VNC console](https://help.freakhosting.com/portals/vps-panel/how-to-enable-and-use-vnc-console-access.md) (on a dedicated server, use KVM/IPMI access via a [ticket](https://freakhosting.com/clientarea/submitticket.php)), log in and run:

```bash theme={null}
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub
```

```text theme={null}
256 SHA256:TDHHnA3o9s8YJGUpQnkmgKE1HJHmFMH0Fvfvns9hUa4 root@web01 (ED25519)
```

The warning on your computer shows the fingerprint the server sent (`The fingerprint for the ED25519 key sent by the remote host is SHA256:...`). If both match, the change is genuine. If the warning names an ECDSA or RSA key, check `ssh_host_ecdsa_key.pub` or `ssh_host_rsa_key.pub` instead.

## Step 2: Remove the old key from your computer

> [tab] Linux / macOS
>
> ```bash theme={null}
> ssh-keygen -R 203.0.113.10
> ```
>
> If you connect on a custom port, the entry includes it:
>
> ```bash theme={null}
> ssh-keygen -R '[203.0.113.10]:2222'
> ```
>
> If you also connect by name, remove that entry too: `ssh-keygen -R example.com`.

> [tab] Windows (PowerShell)
>
> The built-in OpenSSH client uses the same command:
>
> ```powershell theme={null}
> ssh-keygen -R 203.0.113.10
> ```
>
> The file is `C:\Users\you\.ssh\known_hosts`.

> [tab] PuTTY
>
> PuTTY shows a security alert with the new fingerprint instead of refusing. After you have checked the fingerprint in Step 1, choose **Accept** to store the new key. PuTTY keeps host keys in the Windows registry, not in `known_hosts`.

```text theme={null}
# Host 203.0.113.10 found: line 3
/home/you/.ssh/known_hosts updated.
Original contents retained as /home/you/.ssh/known_hosts.old
```

## Step 3: Connect and accept the new key

```bash theme={null}
ssh alex@203.0.113.10
```

```text theme={null}
The authenticity of host '203.0.113.10 (203.0.113.10)' can't be established.
ED25519 key fingerprint is SHA256:TDHHnA3o9s8YJGUpQnkmgKE1HJHmFMH0Fvfvns9hUa4.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
```

Compare the fingerprint with Step 1 and type `yes`. You can also paste the fingerprint from Step 1 instead of `yes`; SSH then checks the match for you.

## How to check it worked

Connect again. You should get straight to the login without any warning.

## Frequently asked questions

### Can I turn the check off with `StrictHostKeyChecking no`?

Don't. It accepts any key, including an attacker's. If you often rebuild test servers, use `StrictHostKeyChecking accept-new` in your [SSH config](https://help.freakhosting.com/portals/other/how-to-use-ssh-config-file-shortcuts.md): it saves keys for new hosts automatically but still blocks changed ones.

### Can I keep the same host keys after a rebuild?

Yes, if you back up `/etc/ssh/ssh_host_*` before the rebuild and restore them afterwards (then restart SSH). Keep the private key files at permissions `600`.

### Is "Host key verification failed" alone the same problem?

Usually. Without the big warning, it can also mean you answered `no` to the first-connection question, or ran SSH in a script with no terminal to ask. Connect once interactively and accept the key.

## Related guides

> [card] [VPS and dedicated server guides](https://help.freakhosting.com/portals/other/vps-and-dedicated-server-guides.md)
>
> Every guide in this section.

> [card] [Connect with SSH](https://help.freakhosting.com/portals/other/how-to-connect-to-a-linux-server-with-ssh.md)
>
> First connection and fingerprints.

> [card] [SSH config shortcuts](https://help.freakhosting.com/portals/other/how-to-use-ssh-config-file-shortcuts.md)
>
> Per-host settings, including accept-new.

> [card] [Permission denied (publickey)](https://help.freakhosting.com/portals/other/how-to-fix-ssh-permission-denied-publickey.md)
>
> The next error after a rebuild.

> [card] [Use PuTTY](https://help.freakhosting.com/portals/other/how-to-use-putty-to-connect-to-your-server.md)
>
> Connect from Windows with PuTTY.

***

> [!NOTE]
>
> **Checked against the official OpenSSH [ssh](https://man.openbsd.org/ssh), [ssh\_config](https://man.openbsd.org/ssh_config) and [ssh-keygen](https://man.openbsd.org/ssh-keygen) manuals** on 4 November 2026; the warning, `ssh-keygen -R` (including a custom port), the first-connection prompt and fingerprint checks were reproduced with a test SSH server on Ubuntu 24.04 LTS (OpenSSH 9.6). The Windows and PuTTY steps were not tested.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.