REMOTE HOST IDENTIFICATION HAS CHANGED!
Here's an even more simplified example:
Let's say you are trying to SSH into a remote server and you encounter the error message "Warning: remote host identification has changed." To resolve this issue, you can follow these steps:
1. Verify the new SSH key: Contact the server administrator to verify the authenticity of the new SSH key. Alternatively, you can check the key fingerprint against a trusted source.
2. Remove the old SSH key: Open a terminal window and run the following command, replacing `hostname` with the hostname or IP address of the remote server:
For example
ssh-keygen -R hostname
ssh-keygen -R 192.168.0.10
This command will remove the old SSH key from your `known_hosts` file.
3. Connect to the server: Try connecting to the remote server again using SSH. You should see a message asking you to verify the new SSH key. Check that the fingerprint of the new key matches the one you verified in step 1, and then type "yes" to add the key to your `known_hosts` file. You should now be able to connect to the remote server without encountering any errors.
That's it! Just three simple steps to resolve the "remote host identification has changed" error when trying to SSH into a remote server.
Here's a more simplified example:
Let's say you are trying to SSH into a remote server with the IP address of `192.168.0.10`, but you encounter the error message "Warning: remote host identification has changed." This means that the SSH key for this server has changed since the last time you connected to it.
To resolve this issue, you can do the following:
1. Verify the new SSH key: Contact the server administrator to verify the authenticity of the new SSH key. Alternatively, you can check the key fingerprint against a trusted source. For example, you can check the server's website or documentation to see if it provides the SSH key fingerprint.
2. Remove the old SSH key: Open a terminal window and navigate to your local machine's `.ssh` directory. The location of this directory may vary depending on your operating system, but it is typically located in your home directory. Once you are in the `.ssh` directory, you can edit the `known_hosts` file using a text editor such as `nano` or `vim`. Find the line that corresponds to the old SSH key for the remote server (in this case, `192.168.0.10`) and delete it. Save the file and exit the text editor.
3. Connect to the server: Try connecting to the remote server again using SSH. You should see a message asking you to verify the new SSH key. Check that the fingerprint of the new key matches the one you verified in step 1, and then type "yes" to add the key to your `known_hosts` file. You should now be able to connect to the remote server without encountering any errors.
More about : SSH-KEYGEN , SSH-COPY-ID , RSA , DSA & ECDSA