Skip to content

Instantly share code, notes, and snippets.

@datwright
Created November 8, 2011 22:03
Show Gist options
  • Save datwright/1349416 to your computer and use it in GitHub Desktop.
Save datwright/1349416 to your computer and use it in GitHub Desktop.
SSH Tunnelling
Say a server is only accessible from your production server. And let's say you have SSH access to the production server. GOOD NEWS. You can connect to that server.
Server
Address: ftp.something.com
Port: 3306
Production server
Address: ssh.whatever.com
Username: tony
On your local command line, run this:
ssh [email protected] -L 6969:ftp.something.com:3306 -N
Sweet! Now open up that client of yours and connect to:
localhost:6969
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment