Skip to content

Instantly share code, notes, and snippets.

@artemave
Created June 7, 2010 08:55
Show Gist options
  • Save artemave/428399 to your computer and use it in GitHub Desktop.
Save artemave/428399 to your computer and use it in GitHub Desktop.
SSH reverse tunnels
# command line usage
local$ ssh -gR 8022:localhost:22 remote
remote$ scp -P 8022 file.tgz localhost:
# local ~/.ssh/config
Host remote
HostName remote.example.com
RemoteForward 8022 localhost:22
# remote ~/.ssh/config
Host local
HostName 127.0.0.1
Port 8022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment