Skip to content

Instantly share code, notes, and snippets.

@danmactough
Created December 13, 2013 22:44
Show Gist options
  • Save danmactough/7952705 to your computer and use it in GitHub Desktop.
Save danmactough/7952705 to your computer and use it in GitHub Desktop.
Make it easy to create a reverse ssh tunnel
#!/bin/bash
if [ $# -ne 3 ]
then
echo "Usage: `basename $0` remote remote-port local-port"
exit 1
fi
ssh -N -R $2:localhost:$3 $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment