使用scp 经常会遇到的错误
# scp -r 192.168.2.12:/buding192.168.2.11:/Password: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOINGSOMETHING NASTY!Someone could be eavesdropping on you rightnow (man-in-the-middle attack)!It is also possible that the RSA host keyhas just been changed.The fingerprint for the RSA key sent by theremote host is8f:ef:05:40:bd:85:bd:67:2a:57:5e:9d:8b:84:d3:b7.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:1RSA host key for 192.168.2.11 has changedand you have requested strict checking.Host key verification failed.lostconnection
解决方法
这是操作系统重装或则openssh-server重装引起的,执行以下命令即可
ssh-keygen -R 192.168.2.11如果不行可将/root/.ssh/known_hosts 文件内容清空再执行。