Martin.xu

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

今天用scp传输文件遇到如下报错:

root@localhost.localdomain:[/root/.ssh]scp -r ~/.ssh/id_rsa.pub root@10.9.10.1:/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 is
ff:76:bf:06:23:b9:f3:4f:e9:90:55:f6:db:18:41:09.
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:3
RSA host key for 10.9.10.1 has changed and you have requested strict checking.
Host key verification failed.
lost connection

解决办法如下:

先查看下这个文件内容cat ~/.ssh/known_hosts
10.1.67.201 ssh-dss AAAAB3NzaC1kc3MAAAEBAPmCkhbuGasPVXvZBIp1R6NpNEh0e4zfUkaxeCfXzeZD7klYmxOYdWyisaFeKfbj4L3pdDRmx9cdhlOJAwT4KAhOLEJpMK3atisxUkyWCLbHPcnlU1nyRTWG2Yu7Y5I
kMJxP16dE9Yr4NSgGwre+cFHNLnWzKowjMiXUSsbeHXskiIEj3IFJX/CpGUz89nw2tcCRuiOaeTGsEa20GtFl4FOStHgIusY9lMiyq2n7sDTUdWiz3UNVUzxMxOq5Q/g+WxKpEpVR1mv3qLXLlBaeLoMYjihXWaTsPC+HCGVhckGymczNQZI/lrplYOJsaKh0yHfKZRZ1PoAg+kURKOTz1a8AAAAVAMLe2U517nG4baP0cNiz7cmbCMiNAAABAQDigFCviI/6/lDlQ09Kzcl37JFrFp5027zvKkwSmCFYfypWYqM0Tf4Bgx6im0CewGIDXkvOIGKe10TP7WRS/e3OK6/ad/Vkqwf4NvIfVDGIc67MZWLkKOBiJr+4NZQ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Qgp6Eej9qgKxYXspbN4jth2pxJzF2fcwkzqbj36+OSMK6G4sqZfTRghXVl3cdkRf1u/fTKprwAYlnHFjDS+huxYZmRtoWzBVFuCdbG1+CBAT9fnCJwbvPa4IwewV4SmiAmsEDG8l9S6DKdJJYX0ga3OrYP+X6zlTLbCQ== 

编辑此文件vim ~/.ssh/known_hosts

删除10.1.1.61的相关rsa的信息即可.

posted on 2017-03-20 20:16  Martin.xu  阅读(252)  评论(0编辑  收藏  举报