Google Cloud会自动更改服务器的密钥吗?

我是新的Google Cloud用户。 今天我意识到我不能连接任何我的服务器与此错误消息:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ 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/roberto/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /home/roberto/.ssh/known_hosts:9 remove with: ssh-keygen -f "/home/roberto/.ssh/known_hosts" -R 10.10.10.10 ECDSA host key for 10.10.10.10 has changed and you have requested strict checking. Host key verification failed. 

Google会自动更新/更改其服务器的ssh密钥吗?

每当您使用Google云端控制台连接到您的GCE虚拟机时,将会生成一个新的SSH密钥,并在几分钟后过期。 但是,您收到的警告消息可能是由于不同的原因。

看看这个post的类似问题。

运行ssh-keygen -f "/home/roberto/.ssh/known_hosts" -R 10.10.10.10命令可以解决你的问题。

删除本地机器上的catched密钥:

 ssh-keygen -R 10.10.10.10 

它可能无法正常工作,因此您可以按照以下错误的指示进行第二步操作:

 Add correct host key in /home/roberto/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /home/roberto/.ssh/known_hosts:9 remove with: ssh-keygen -f "/home/roberto/.ssh/known_hosts" -R 10.10.10.10 

检查主机是否不在/home/roberto/.ssh/known_hosts ,如果仍然存在,则手动从列表中删除主机。

如果没有这个工作,那么你应该知道以下几点:谷歌不会自动更改您的服务器的密钥。 你可以运行-vvv并发布输出。