I seem to have encountered the same or similar issue in ubuntu focal/20.04 when using the image ubuntu-minimal-2004-focal-v20210928 on GCP. Creating a new custom GCP image using this as the base image and running:
apt-get update
apt-get upgrade -y
created a custom image that exhibited the same issues with GCP OS login. Rebooting the VM also resolved the ssh connection issues. Placing a hold ('apt-mark hold cloud-init') on the cloud-init package before running the upgrade also seemed to resolve the issue.
I seem to have encountered the same or similar issue in ubuntu focal/20.04 when using the image ubuntu- minimal- 2004-focal- v20210928 on GCP. Creating a new custom GCP image using this as the base image and running:
apt-get update
apt-get upgrade -y
created a custom image that exhibited the same issues with GCP OS login. Rebooting the VM also resolved the ssh connection issues. Placing a hold ('apt-mark hold cloud-init') on the cloud-init package before running the upgrade also seemed to resolve the issue.