Cause and solution of host key verification failed during SSH connection

Source: Internet
Author: User
Host key Verification Failed. [root @ cache001 swftools-0.9.0] # SSH 192.168.1.90



@ Warning: remote host identification has changed! @



It is possible that someone is doing something nasty!

Someone cocould be eavesdropping on you right now (man-in-the-middle attack )!

It is also possible that the RSA host key has just been changed.

The fingerprint for the RSA key sent by the remote host is

05: 25: 84: Ea: DD: 92: 8d: 80: Ce: AD: 5b: 79: 58: Fe: C9: 42.

Please contact your system administrator.

Add correct host key in/root/. Ssh/known_hosts to get rid of this message.

Offending key in/root/. Ssh/known_hosts: 10

RSA host key for 192.168.1.90 has changed and you have requested strict checking.

Host key verification failed. ============================================== = public Key that has accessed the computer) are recorded in ~ /. Ssh/known_hosts. When you access the same computer next time, OpenSSH checks the public key. If the public key is different, OpenSSH will issue a warning to avoid attacks such as DNS hijack.
SSH checks the public_key of the host based on Stricthostkeychecking variable. By default, Stricthostkeychecking = Ask. The three configuration values are as follows:

1.
Stricthostkeychecking = No

# The most insecure level. Of course, there are not so many annoying prompts. We recommend that you use it for relatively secure Intranet testing. If the key connecting to the server does not exist locally, it is automatically added to the file (known_hosts by default) and a warning is given.

2.
Stricthostkeychecking = ask # The default level. The prompt is displayed. If the connection and key do not match, a prompt is displayed and logon is rejected.

3.
StrictHostKeyChecking=yes  #The most secure level. If the connection does not match the key, the connection is rejected and no detailed information is displayed.

-------------
Solution 1 -------------

For me, I want to perform some tests on the Intranet and select the lowest security level for convenience. In. Ssh/config (or/etc/ssh/ssh_config), configure:

Stricthostkeychecking nouserknownhostsfile/dev/null
(Note: For ease of use, set knownhostfile to/dev/null and do not store it in known_hosts)


--------------- Solution 2 ---------------
vi ~/.ssh/known_hosts

Delete the RSA information of the corresponding IP address --------------- solution 3 ---------------

rm known_hosts
From: http://cqfish.blog.51cto.com/622299/157163 http://www.51testing.com /? Uid-225738-action-viewspace-itemid-234384

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.