Created
October 3, 2018 13:05
-
-
Save yossale/25760edb6869d1aa18ff6b3c8a19e95a to your computer and use it in GitHub Desktop.
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
alias ssh-tunnel='function _ssh_tunnel(){ set -x; port=$(gshuf -i 39152-65530 -n 1); ssh -f -N -L$port:$1:22 ec2-user@<DMZ_IP> -i ~/.ssh/dmz.pem ; ssh -i ~/.ssh/prod.pem [email protected] -p $port ;};_ssh_tunnel' | |
# to run: | |
ssh-tunnel <SOME PROD IP> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment