Created
March 2, 2017 20:38
-
-
Save MartijnBraam/2e5c3e4ee23d2f76ac9834dec2ffb028 to your computer and use it in GitHub Desktop.
SSH jumphost shortcut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host *+* | |
ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') exec 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