Created
December 13, 2013 22:45
-
-
Save danmactough/7952715 to your computer and use it in GitHub Desktop.
Make it easy to create an ssh tunnel
This file contains hidden or 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
#!/bin/bash | |
if [ $# -ne 3 ] | |
then | |
echo "Usage: `basename $0` remote remote-port local-port" | |
exit 1 | |
fi | |
ssh -N -L $3:localhost:$2 $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment