Created
October 29, 2014 11:16
-
-
Save awilliams/7b6f3f9e4bc042501736 to your computer and use it in GitHub Desktop.
sshtunnel helper
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
#!/usr/bin/env bash | |
# ARG1 = remote host, ie db.example.com | |
# ARG2 = port to forward, ie 8080 | |
set -eu | |
echo "Tunneling $1 -> http://sshtunnel:$2" | |
#open /Applications/Google\ Chrome.app/ "http://sshtunnel:$2/" | |
ssh -C $1 -L $2:localhost:$2 -N |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment