Score:0

Cannot connect by SSH to my Compute Engine Instances

ua flag

I'm not able to connect to any compute instance in GCP by web and ssh. I try to access and I'm getting this error:

We are unable to connect to the VM on port 22. Learn more about possible causes of this issue.

I'm trying to connect by serial console also, but I haven't got the default credentials of the instance. I know that I can add users by userdata, but there are production instances and I cannot restart it... I don't know what's happening that, because I have other project with same configuration, same cloud-init and I'm able to connect by SSH on it..

Is there any solution?

jp flag
https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-ssh
herny avatar
ua flag
Hello, I just did the test and I got this result of the test: Network Connectivity Test Result: UNREACHABLE
Score:0
ht flag

If your VM does not have external IP address, then the SSH connection to the VM is through AdminProxy, which requires a firewall rule configured to allow the proxy IP range.

To check if you have configured this range in the firewall you can go to Security -> Identity Aware Proxy -> SSH and TCP resources, find the VM and see the Error to show more details of what needs to be configured.

You can use links bellow for more information about firewall rules on GCP.

https://cloud.google.com/vpc/docs/firewalls https://cloud.google.com/appengine/docs/standard/java/creating-firewalls https://cloud.google.com/appengine/docs/flexible/java/creating-firewalls

John Hanley avatar
cn flag
Your last two links are for a different Google Cloud product and do not apply.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.