Skip to content

Instantly share code, notes, and snippets.

@danmactough
Created December 13, 2013 22:45
Show Gist options
  • Save danmactough/7952715 to your computer and use it in GitHub Desktop.
Save danmactough/7952715 to your computer and use it in GitHub Desktop.
Make it easy to create an ssh tunnel
#!/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