cannot SSH to new, completely default GCE instance

2,873 views
Skip to first unread message

Patrick Dougall

unread,
Jun 23, 2016, 3:55:15 PM6/23/16
to gce-discussion
I create a new GCE instance form cloud like normal
`gcloud compute instances create [NAME]`

Then wait up to 10 minutes for it to boot.  Check that it is booted in the only way I see, that there is a green checkmark next to the name (that happened way before 10 minute, but I have no idea why it's not working so I just kept waiting and trying).

every minute or so I try to ssh in via gcloud
`gcloud compute ssh [NAME]`
returns `ssh: connect to host [IP ADDRESS] port 22: Operation timed out`

or through clicking "ssh" in the browser when on my instance page
returns "We are unable to connect to the VM on port 22. Learn more about possible causes of this issue"
I have gone to that page many times.  I have nothing but the default settings on the machine, so none of the suggestions seem to be applicable.


I've been trying for an hour now.  Please, all I want to do is format my persistent disk to use postgres on GKE!
https://cloud.google.com/compute/docs/disks/add-persistent-disk tells me I have to SSH into some machine instance to format the disk, I really would rather not, it seems ridiculous to have to as the persistent disk seems like a primary offering.  But as the docs say I must then please help me do so!  I have no other way!


Paul Nash

unread,
Jun 23, 2016, 5:09:09 PM6/23/16
to Patrick Dougall, gce-discussion
Hi Patrick, sorry to hear about these troubles. Could you please share the full command options you're attempting to run, including for example the zone that you are requesting to run in, and whether you selected the OS image or other options?

--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/626a297f-a4ca-4007-8231-372da54371cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Paul R. Nash | Product Manager, Compute Engine | paul...@google.com | 206-876-1620

Message has been deleted

Patrick Dougall

unread,
Jun 23, 2016, 11:45:47 PM6/23/16
to gce-discussion, pat...@densityanalysis.com
well I replied with a post that got deleted.  I assume because I had too many detail?  So here are fewer detail, but I have configured gcloud correctly in regards to region and other basic configs.

I've sense deleted the old machine and tried a different way (hardcoding IPs in the SQL whitelist) but it's (kind of obviously) not going to work out.
This is now precisely what I've done:

`gcloud compute instances create bootstrap-disk-2`
`gcloud compute disks create testing-disk-2 --size 200 --type pd-standard`
`gcloud compute instances attach-disk bootstrap-disk-2 --disk testing-disk-2`

Patrick Dougall

unread,
Jun 24, 2016, 12:13:06 AM6/24/16
to gce-discussion

Kamran (Google Cloud Support)

unread,
Jun 24, 2016, 5:40:48 PM6/24/16
to gce-discussion, pat...@densityanalysis.com

Hello Patrick,

It seems this is an issue related to GCE firewall rules of your VM's network. Please examine GCE firewall rules carefully to make sure that there is a rule for SSH protocol. If there is no rule exist for the SSH port and protocol (tcp:22), you can add a new firewall rule using gcloud command or via Google Cloud Console. 
For more information about Compute Engine networks and firewalls visit this article.

Sincerely,

Paul Nash

unread,
Jun 24, 2016, 5:44:10 PM6/24/16
to Kamran (Google Cloud Support), gce-discussion, Patrick Dougall
Kamran took the words out of my mouth - thanks! :)

Patrick, I agree that from the GCE side, this seems to be a firewall rules problem. At some point, the default rule that exists to allow port 22 on all VMs in your project's network must have been modified or deleted. Follow Kamran's instructions to put it back, and you should be in good shape.


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages