scp命令出现Host key verification failed问题
今天在使用scp命令时,出现了如下错误
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
b2:c5:a5:c8:d7:87:64:c2:a9:40:68:58:4a:2f:c7:e1.
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:4
RSA host key for 192.168.0.249 has changed and you have requested strict checking.
Host key verification failed.
lost connection
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
因为前两天我重装了ssh server,重装之前是可以用的,查了下资料,应该是密钥引起的问题
使用命令ssh-keygen -R hostname即可解决

浙公网安备 33010602011771号