How to Fix SSH Host key verification failed on Linux

How to Fix SSH Host key verification failed on Linux, Troubleshoot Host key verification failed, solve Host key verification failed, troubleshooting ssh issue on linux, linux solution, solution to fix errors host key verification failed.

How to Fix SSH Host key verification failed on Linux

Are you getting 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.
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.

Thanks for reading our post. share with your friends. We appreciate your feedback, Leave your comments if any.

We have more articles to be updated soon. To not miss any updates, Follow us on social networking sites and Subscribe us on our Youtube channel.
November 29, 2015

Post a Comment

[disqus][facebook][blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget