*************************************************************** *** How to SSH Tunnel through the INTARWAB using CHIMPUTORS *** *** An astute guide, by Josh. *** *************************************************************** ssh -2 -f -N -R 5555:127.0.0.1:22 beefhole Run this on machine behind firewall to tunnel to beefhole. This will create a port forward from 5555 on beefhole back to port 22 on the machine behind the firewall. Explaination: -2 = force SSH2 -f = Requests ssh go backround -N = do not executre a remote command (only forward ports, no shell) -R 5555:127.0.0.1:22 = Forward remote port 5555 to localhost port 22 ssh -C -L 5905:192.168.1.103:5900 beefhole Run this to forward a port on a remote private network to the local machine (VNC, in this example). Explaination: -C = Enable compression (very good for capped connections i.e. dsl/cable) -L 5905:192.168.1.103:5900 = Forward connections from the local machine on port 5905 (localhost:5 for vnc) to 192.168.1.103:5900 on the remote private network. ssh -C -g -2 -L 5905:10.80.117.237:5900 -p 5555 localhost Run this to forward a port over an existing SSH tunnel. In other words, you have a tunnel into a private network, but want to forward a port to another machine on that network. Explaination: -C = Enable compression (very good for capped connections i.e. dsl/cable) -g = Allow remote hosts to connect to a local forwarded port. -2 = Force SSH2 -L 5905:10.80.117.237:5900 = Forward connections from the local machine on port 5905 (localhost:5 for vnc) to 10.80.117.237:5900 on the remote private network. -p 5555 = Use port 5555 (the existing tunnel) for the SSH connection.