Last active
August 29, 2015 14:18
-
-
Save aaronaddleman/be69bbf815fd048b0638 to your computer and use it in GitHub Desktop.
bash function for mapping ports over jump host
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
# $1 = username | |
# $2 = left_port | |
# $3 = right_port | |
# $4 = final_port | |
function p2p { | |
ssh -At $1@hostone -L $2:localhost:$3 ssh -At hosttwo -L $2:localhost:$3 -At ssh hostthree -L $2:localhost:$4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment