Skip to content

Instantly share code, notes, and snippets.

@agmm
Created July 11, 2020 16:16
Show Gist options
  • Save agmm/d13b069b5190a34a140ac742a7d58954 to your computer and use it in GitHub Desktop.
Save agmm/d13b069b5190a34a140ac742a7d58954 to your computer and use it in GitHub Desktop.
gcloud command to forward a local port to the remote machine

This command should be run on the local machine.

gcloud compute ssh [user@]machineName -- -NL LOCALPORT:localhost:REMOTEPORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment