1.当换了主机连接的时候,如果ip地址不一样,连接的时候会报如下的错误:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ECDSA key sent by the remote host is
SHA256:X7t3q9KPoEBAjfkxTcMHguxbz9hnP9+cnJro8nRAZTk.
Please contact your system administrator.
Add correct host key in /Users/rs/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/rs/.ssh/known_hosts:5
ECDSA host key for 172.16.36.148 has changed and you have requested strict checking.
Host key verification failed.
解决办法:
连接机进入~/.ssh/文件夹 编辑known_hosts文件,删除文件相应地址的错误的密钥文件保存
重新连接即可