Reputation: 131
gcloud compute config-ssh
works fine for listing all my VMs into the ssh config file, but I am not able to use this config file when the access from the external IP has been blocked due to firewall or other security reasons.
Is there any way to populate the config file with all internal IPs?
Currently I can't even list the internal IPs. The only way seems to be to edit the generated config file and change all the external IP addresses manually.
Upvotes: 1
Views: 760
Reputation: 40136
I suspect the command assumes the use-case of gcloud
running off GCP (outside of the internal network) and provides a convenience script to give domain names to otherwise unnamed public (external) IPs.
If you're using gcloud
where you can access the VMs by the private (internal) IPs, you should be able to access the hosts by Google-provided internal DNS names without having to use this command.
Upvotes: 1