The virtual machine instance is up and running and can get the serial port login: prompt, but cannot connect via ssh. What would google's reasoning be for this behavior?
The VM instance does NOT have an external IP address by design.
My google cloud shell instance does not have a 10.240.0.0/16 IP address that my VM instance has, so i assume that is why i cannot ssh via cloud shell. Why would an instance need internet access from within the webbrowser based Cloud Shell?
ERROR: (gcloud.beta.compute.ssh) Instance [instance-centos7] in zone [us-zone-somewhere] does not have an external IP address, so you cannot SSH into it. To add an external IP address to the in stance, use [gcloud compute instances add-access-config].
Have restarted the Cloud Shell instance in the hopes it would be rebuilt with the correct ip addresses.
Project wide ssh keys are NOT blocked.
In the web browser, all SSH options are disabled and greyed out.
I can tail the serial port output to verify it stops and starts but not interact with it because i did not set a password.
Over the years, i have had several virtual instances that did not have a public IP address, but was able to connect fine in order to secure the machine before allowing access from the internet.
Based on the 10.240.0.0/16 ip subnet, it appears i have a legacy network.
Wanted a virtual machine host base machine that does not have direct access to the internet but which LXC containers would get a public IP.
NETWORKING
>VPC network
>VPC networks
to see if you are using a legacy network or not. Look in theMode
column.gcloud
commands. Sogcloud ssh
commands should work just as if you ran it on the machine where you normally rungcloud
. That doesn't give you access to ssh to machines without a public IP though. I think the recommended approach if you want to do that is either a bastion VM with a public IP or a VPN.ERROR: (gcloud.beta.compute.ssh) Instance [instance-centos7] in zone [us-zone-somewhere] does not have an external IP address, so you cannot SSH into it. To add an external IP address to the in stance, use [gcloud compute instances add-access-config].