@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:VLVNnU9re7+TE+C5cV18bCbw+fPnIQBrpz8UAXRKGyo.
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:1
RSA host key for 172.17.0.2 has changed and you have requested strict checking.
Host key verification failed.
这个报错是指对应ip在本地保存的公钥与连接时对应ip服务端发送过来的公钥不一致,ssh安全机制限制连接,这是一种防止通过修改ip地址冒充其他主机的安全机制。
因此,如果确定对应的ip主机没有被冒充,那可以清除本地对应ip的公钥,连接时重新获取一次公钥,本地公钥的的保存位置是家目录下的.ssh/know_hosts,清除对应ip记录即可。
[root@dk01 ~]# cat .ssh/known_hosts
172.17.0.2 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGolkWAWe0Z5cUjOXJ5+b5j1gBpR++Ai+ZL1clUKzTLTE3tlKSGM3WR2Gb+r1AFdGTlmgid7/pnQDP60hPqWJVM=