Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
port forwarding with a google cloud instance

Google cloud's ssh command lets you pass standard ssh flags. To, for example, forward local port 8088 to port 8088 on a vm instance, all you need to do is:

gcloud compute ssh cholo@deploy-test --ssh-flag="-L 8080:localhost:8080"  --zone "us-central1-a"

Now browsing to localhost:8088 works as it would with standard ssh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.