scp执行报错WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

linux环境执行scp时会遇到报错WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!,如下

[root@subsname home]# scp AAA.scd root@192.***.*.88:/home/
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:GzJ591j2hA4kisv3vWpDXrsCIa14QZNw4Ke0VlxfZhQ.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /root/.ssh/known_hosts:9
RSA host key for 192.***.*.88 has changed and you have requested strict checking. 
Host key verification failed.
lost connection

解决方案:修改上述报错中的文件/root/.ssh/known_hosts,将对应IP 88行删除,保存后,重新执行scp即可。

[root@subsname home]# vi /root/.ssh/known_hosts
192.***.*.*** ecdsa-sha2-nistp256 BBBBE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNUDPny897mVOwLgqypbD+8PZNcEyddNy+6HkzjI3UW3Wta5lYmOzuqEIa24tB9bbjf4MBB/dkycY17vAEQ/a6o=
192.***.*.*** ecdsa-sha2-nistp256 BBBBE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJ7Whx4HPlqbpjdsq0nsf98OBXIbu9+yia7nSAD6i479HHrtWuIsC+QaC/6p/dApbp9Na3NTDsGyKwhmpr2Jvb4=
192.***.*.88 ecdsa-sha2-nistp256 BBBBE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFkupWUxI5l60sFB7+lO6ZjpTVo9+bnlpWF5osJEoCpPRqOmt48QpVxKSQzgaZUD/GGBdNN+lL5Ke1Am+bPbrL8=
上一篇:vsftpd虚拟用户创建实例(转载)


下一篇:IDEA使用GsonFormat完成JSON和JavaBean之间的转换,springboot分层架构