Skip to content

Instantly share code, notes, and snippets.

@nailor
Last active December 31, 2015 15:59
Show Gist options
  • Save nailor/8010755 to your computer and use it in GitHub Desktop.
Save nailor/8010755 to your computer and use it in GitHub Desktop.
Denote hosts that need to be tunneled with +
Host *
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p
ForwardAgent yes
ForwardX11 no
Host tunnel
Hostname nönönö
DynamicForward localhost:1080
ProxyCommand none
Host +*
ProxyCommand ssh -qx tunnel 'nc -w 600 $(echo %h|sed s/^+//) %p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment