You can Watch all our Tutorials and Training Videos for Free on ourYouTube Channel

How to Fix SSH Host key verification failed on Linux

ssh host key verification, how to fix host key verification failed, host key verification error on linux, host key verification failed issue

How to Fix SSH Host key verification failed on Linux

Are you getting SSH Host key verification failed errors when you trying to connect the server using ssh connection as shown below.

No need to panic about this errors, its a warning of hostname mismatching in the existing hostname in the known_hosts file. Just look at the last three line from the output which will give you the clear explaination.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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.
The fingerprint for the ECDSA key sent by the remote host is
dc:7e:da:2d:14:aa:09:83:c9:dd:69:70:84:7d:2a:af.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:3
remove with: ssh-keygen -f "/root/.ssh/known_hosts" -R linux1
ECDSA host key for linux1 has changed and you have requested strict checking.
Host key verification failed.

This post will help you How to Fix SSH Host key verification failed on Linux.

How to Fix SSH Host key verification failed on Linux


Here is a solution to solve the errors.

Solution 1 : Just copy the command "ssh-keygen -f "/root/.ssh/known_hosts" -R linux1" as shows in the error and execute it.

Solution 2 : Open the /root/.ssh/known_hosts, search the hostname "linux1" as shows in the error and delete the lines.

Hope the post helped you to fix SSH Host key verification failed on Linux

Keep practicing and have fun. Leave your comments if any.

Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.
whatsapp logo