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:
ssh-keygen -R <you_server_hostname_or_ip>
-
How do I disable ipv6 on Ubuntu 20.04
To disable IPv6 on your Ubuntu 20.04 system, open the /etc/sysctl.conf file in your favorite text editor and put the following lines at the end of the file: net.ipv6.conf.all.disableipv6 = 1 net.ip...
Questions -
Copy SSH key to clipboard
An SSH key is usually stored in the form of a file. To copy an SSH key to your clipboard, you can use one of the following options: Option 1 - Copy from terminal The first option is to print the ke...
Questions -
Error Permission denied (publickey) when I try to ssh
This error appears when trying to SSH into a server. The publickey in the brackets after the error message is misleading. One reason might be wrong configuration in sshd_config file and the second ...
Questions
Make your mark
Join the writer's program
Are you a developer and love writing and sharing your knowledge with the world? Join our guest writing program and get paid for writing amazing technical guides. We'll get them to the right readers that will appreciate them.
Write for usBuild on top of Better Stack
Write a script, app or project on top of Better Stack and share it with the world. Make a public repository and share it with us at our email.
community@betterstack.comor submit a pull request and help us build better products for everyone.
See the full list of amazing projects on github