Scp error: Host key verification failed. remote host identification has changed!

Source: Internet
Author: User
Tags scp command

1 scp error: remote host identification has changed!

[root@xx ~]# scp yum-3.4.3.tar.gz 10.xx.xx.12:/root@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    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 the RSA host key has just been changed.The fingerprint for the RSA key sent by the remote host isxxxxxxxxx.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:20RSA host key for 10.xx.xx.12 has changed and you have requested strict checking.Host key verification failed.lost connection[root@cache-2 ~]# 


2. An error is reported for google and RSA. If you do not need to re-create the RSA Key, or delete the corresponding ip information record in known_hosts of the Client, select the latter one.


3. First find the known_hosts path.
[Root @ xx tmp] # find/-name known_hosts
/Root/. ssh/known_hosts

4. Back up the system file and modify
[Root @ cache-2 tmp] #
[Root @ cache-2 tmp] #
[Root @ cache-2 tmp] # cp/root/. ssh/known_hosts/root/. ssh/bak.20140526.known _ hosts
[Root @ cache-2 tmp] #
[Root @ cache-2 tmp] # vim/root/. ssh/known_hosts

Find
10. xx. xx.12 ssh-rsa keys + 1 GFnFv + c + keys/keys + m6OW7fzUdZnqfQaF/keys/NfqL1GozShiKF4 + keys // keys/046laeIX1DGw =
Delete it.


5. Run the scp command and enter the password. The transfer is successful.
[Root @ xx ~] # Scp yum-3.4.3.tar.gz 10. xx. xx.12:/root
Root@10.xx.1x.12's password:
Yum-3.4.3.tar.gz 100% 1114KB 1.1 MB/s
[Root @ xx ~] #

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.