# Warning: Remote Host Identification Has Changed

## What does it mean

You may wonder what `WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED` error
means. SSH connection uses keys, files stored on the computer, to authenticate
the server and the client. One part of the key works as a fingerprint of the
host. This makes sure that the connection is accurate anthat d you are not part
of the `machine-in-the-middle` attack.

If the client thinks that the host's fingerprint is different than what it
thinks is correct, the `Warning: Remote host identification has changed` is
displayed after login.

**Important note:**

You should not attempt to fix the issue unless you are 100% confident that the
issue is not malicious.

## How to fix the error

The solution is differed depending on the system.

### Windows

Open a file explorer and try opening the `%USERPROFILE%\.ssh` or
`%USERPROFILE%\ssh` folder. In this folder, look for the `known_hosts` file. If
you found the file, open it and delete the key that is causing the issue.

It is possible, that the `known_hosts` file doesn't exist on your system. In
this case, you need to look in the documentation of the SSH client that you are
using where the list of known hosts is stored and apply the previous approach.

### Mac

On a mac, the solution is much easier. Simply run the following command, to
generate the key again:

```bash
ssh-keygen -R <you_server_hostname_or_ip>
```
