Help Center/ Elastic Cloud Server/ Troubleshooting/ Remote Login/ Remote Login Errors on Linux/ What Do I Do If "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" Is Reported When I SSH Into a Linux ECS?
Updated on 2026-07-07 GMT+08:00

What Do I Do If "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" Is Reported When I SSH Into a Linux ECS?

Symptom

When you log in to a Linux ECS using SSH, the error message "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" is displayed, as shown in the following figure.

Possible Causes

When the SSH connection is set up for the first time, the public key of the server is saved in ~/.ssh/known_hosts in the client. However, if the server has been reinstalled or the authentication information has changed, the public key of the server does not match that of the client. As a result, the preceding error occurs.

Solution

  1. Log in to the ECS.
  2. Run the following command to delete the old public key:

    ssh-keygen -R Server IP address