Does Google Cloud change the server’ ssh keys automatically

google-cloud-platformgoogle-compute-engine

I'm a new Google Cloud user. Today I've realized I can't connect any of my servers with this error message:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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.

Does Google automatically update/change the ssh keys of their servers?

Best Answer

Yes actually, Google Does change your hostkey in some cases.

For example, hostkey will change during host maintenance migrations if that is enabled.
The key will change if any changes are made requiring recreating the instance are needed: something as dumb as setting a scope, adding a service account, or even the lovely setting a description on an instance will force a replacement of a VM and the host key will change.

Related Topic