Search code examples
google-cloud-platformgoogle-compute-enginegcloud

Cannot ssh to Google Cloud VM Instance


I created a google compute engine VM instance from a snapshot but I could not SSH into the instance. Got a message below saying

We are unable to connect to the VM on port 22

Upon looking at the serial console logs, it seems stuck at login for localhost:

Debian GNU/Linux 8 localhost ttyS0

localhost login: 

Solution

  • As it was confirmed by @Stanley at the comment section, this issue was be an issue related to snapshot corruption.

    If you have similar issues you can follow the documentation or/and this 3rd party example to troubleshoot your VM instance via serial console. In addition, some step by step guidance you can find in this answer.