Skip to content

Instantly share code, notes, and snippets.


Niccolo Dejito ncdejito

View GitHub Profile
ncdejito /
Last active Apr 21, 2020 — forked from jibs/
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.

You can’t perform that action at this time.