Skip to content

Instantly share code, notes, and snippets.

@FooBarWidget
Created May 3, 2013 17:03
Show Gist options
  • Save FooBarWidget/5511336 to your computer and use it in GitHub Desktop.
Save FooBarWidget/5511336 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
if [[ "$1" = "" ]]; then
echo "Usage: showoff <LOCAL PORT>"
exit 1
else
echo "Showing off local port $1 at http://shell.phusion.nl:4000/ ..."
#ssh -tR 2839:localhost:$1 shell.phusion.nl "sudo ssh -l \$USER -L 83:127.0.0.1:2839 localhost 'echo Ready. && sleep 999d'"
exec ssh -nT -R :4000:localhost:$1 shell.phusion.nl 'echo Ready! Press Ctrl-C to stop. && sleep 999d'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment