SSH Port Forwarding (tunnel) in Linux for Proxy etc.
Dynamic:Dynamic port forwarding turns your SSH client into a SOCKS proxy server. To use dynamic port forwarding with the default SOCKS port:
yourRemoteServer ( )
- The -D option specifies dynamic port forwarding. 1080 is the standard SOCKS port. Although you can use any port number, some programs will only work if you use 1080.
- The -C option enables compression, which speeds the tunnel up when proxying mainly text-based information (like web browsing), but can slow it down when proxying binary information (like downloading files).
Static:For instance, to connect to mysql.i88.ca:3306 through tennel.i88.ca from your local port 3306
ssh -L 3306:mysql.i88.ca:3306 email@example.com
Both:You could add:
-N Do not execute a remote command. This is useful for just forwarding ports (protocol version 2 only).