SSH login failure: Host Key verification failed solution

Source: Internet
Author: User
Tags ssh


Today, during SSH login, display login failed, Host key verification failed. The error prompts are as follows:

~ zfs$ ssh root@192.168.1.103
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ warning:remote HOST Identification has changed! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT is POSSIBLE This SOMEONE is doing something nasty!
Someone could is eavesdropping on your right now (Man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the "RSA key sent by" The remote host is
F7:11:42:03:40:CD:34:C3:0F:0E:80:36:22:04:DE:BC.
Please contact your system administrator.
Add correct host key in/users/zfs/.ssh/known_hosts to get rid of the.
Offending RSA Key in/users/zfs/.ssh/known_hosts:17
RSA host key for 192.168.1.103 has changed and your have requested strict.
Host Key verification failed.

So immediately Baidu a bit, said is because the public key is not the same, so unable to log in, prompting information is key validation failure.
The solution is:

Delete the original public key information in the/root/.ssh/known_hosts file
SSH report "Host Key verification failed." In general, the main problem is the following:
/root/.ssh/known_hosts the target host key value in the record is incorrect. This is the most common case, as long as the corresponding host records can be deleted to return to normal.
To run the command:

Rm-rf/root/.ssh/known_hosts can be.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.