I keep getting the usual "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed." message when trying to connect with ubuntu.
I know what I did to get it but now I can't get it back right. I was having an issue with the known_hosts file earlier so I deleted it like I have done before and then tried to reconnect so the file would be remade.
Now I am getting that error and I have no known_host file to edit and remove the bad key. I have seen codes about resetting the file and all that but what if the file is not created?
You should delete the key causing the “Warning: Remote host identification has changed” error, then save your changes. You might also want to delete the entire known_hosts file, especially if you only use SSH for one or two sites. To do this, you can run rm . ssh/known_hosts in a Terminal window.
Windows with PuTTYSearch for regedit.exe and open it. Navigate to HKEY_CURRENT_USER/SOFTWARE/SimonTatham/PuTTy/SshHostKeys. Right click the offending key and click delete.
A remote host is a computer outside your firewall with which you want to connect. Connecting with a remote host through an Internet Session requires that you have: Configured a NAT rule that translates a public IP address to your internal network.
Disable with SSH Command You can define the StrictHostKeyChecking=no command line argument to ssh command to skip the host key checking.
I assume this is a message from your ssh client when trying to connect to a remote host. (You should really post the full error message and give more context.) In either case, to get rid of the error, the best way to delete the offending entry in your known_hosts file is to run:
ssh-keygen -R server.example.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With