如果你也频繁以下遇到主机公钥校验警告,可以修改 ssh 配置将它禁用掉。
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:**************.
Please contact your system administrator.
Add correct host key in /home/hobin/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/hobin/.ssh/known_hosts:2
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,password).
添加以下 ssh 配置禁用:
$ sudo vi /etc/ssh/ssh_config
#Host *
#Host 10.1.*
Host 10.1.1.2
UserKnownHostsFile=/dev/null
StrictHostKeyChecking no