Created
March 20, 2013 06:17
-
-
Save drbrain/5202693 to your computer and use it in GitHub Desktop.
Proxy SSH through hosts
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 /') nc $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /') | |
StrictHostKeyChecking no | |
UserKnownHostsFile /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment