Skip to content

Instantly share code, notes, and snippets.

Created January 2, 2018 16:35
Show Gist options
  • Save anonymous/a493791de46427b59974d6290f36e55d to your computer and use it in GitHub Desktop.
Save anonymous/a493791de46427b59974d6290f36e55d to your computer and use it in GitHub Desktop.
ssh config
Host *+*
ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') nc -w1 $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment