Skip to content

Instantly share code, notes, and snippets.

@keevie
Created December 12, 2023 19:10
Show Gist options
  • Save keevie/f030e791f3be4a5d7284011fb9672cc6 to your computer and use it in GitHub Desktop.
Save keevie/f030e791f3be4a5d7284011fb9672cc6 to your computer and use it in GitHub Desktop.
if [[ $# -eq 0 ]] ; then
echo 'usage:'
echo 'bash ./tunnel.sh SUBDOMAIN LOCAL_PORT'
echo 'example: bash ./tunnel.sh daniel 8000'
echo 'you need our ssh key, kingfisher-alb in your ~/.ssh directory'
exit 0
fi
port=$RANDOM
echo "server is forwarding port $port on your local"
echo "server is available at https://$1.woodpecker.frameable.com"
ssh -i ~/.ssh/kingfisher-alb \
-o StrictHostKeyChecking=no \
-tR $port:localhost:"$2" \
[email protected] \
./SirTunnel/sirtunnel.py \
"$1".woodpecker.frameable.com \
$port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment