Skip to content

Instantly share code, notes, and snippets.

@timruffles
Last active August 29, 2015 14:14
Show Gist options
  • Save timruffles/141d16042132c31d3b82 to your computer and use it in GitHub Desktop.
Save timruffles/141d16042132c31d3b82 to your computer and use it in GitHub Desktop.
oauth local testing via ssh proxy
# ssh's into target box, forwards all incoming connections to :3000 to localhost :3030
# -R [bind_address:]port:host:hostport
# -N no remote command - just forward
# -g allows remote to connect to local
#
# you'll need to add `GatewayPorts yes` to your ssh config - e.g at `/etc/ssh/sshd_config` -
# and then restart sshd on the host machine (`service ssh restart` on ubuntu)
# some-host.com:443 -> localhost:4443
ssh -NgR 0.0.0.0:443:localhost:4443 some-host.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment