Skip to content

Instantly share code, notes, and snippets.

@dksifoua
Last active September 23, 2019 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dksifoua/7e39d87d51d0f762ed1f57e1d05f357c to your computer and use it in GitHub Desktop.
Save dksifoua/7e39d87d51d0f762ed1f57e1d05f357c to your computer and use it in GitHub Desktop.
## SSH
> gcloud compute ssh spark-cluster-m --zone=us-east1-c --ssh-flag="-D" --ssh-flag="-N" --ssh-flag="10000"
The flag -D is to allow dynamic port forwardinig
The flag -N is to instruct gcloud to not open a remote shell
The flag 10000 is the port on which we want to open the ssh connection
## Start new browser session that uses the SOCKS proxy through the ssh tunnel created.
> "DIR of chrome.exe" "http://spark-cluster-m:8080" --proxy-server="socks5://localhost:10000" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE localhost" --user-data-dir=/tmp/spark-cluster-m
The option --host-resolver-rules is to avoid any DNS resolves by chrome
The option --user-data-dir allows chrome to start a brand new session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment