How To: SSH Port Forwarding on Mac OSX
As long as you have SSH access, you can still access ports on a remote server which are blocked via a firewall. You simply need to use a function of the SSH protocol called Port Forwarding (or Tunneling). This process allows you to open a port on your local machine, which is forwarded via SSH to the required port on the remote machine:
localhost:8000 == forwarded to ==> remote:3306
The above example would allow you to connect to localhost on port 8000 which would then be tunneled to the remote host on port 3306 (mysql).
But how to set this up? There is a set of commands which you can enter on a terminal, which will create the tunnel for you:
ssh -L 8000:localhost:3306 username@remoteserver
However I prefer to use iSSH which is a great little Mac utility that creates the tunnel for you. Simply enter the remote address, port and click ‘Connect’ and your tunnel is setup:


April 18th, 2009 at 9:24 pm
Hi. I can’t seem to find ‘iSSH’ utility on my macbook, if i did, i’d still need help finding the ‘remote address’, any hints? i’m using OSX 10.5.6.
Also, i would have tried terminal but again I don’t know the remote server.
I’m using a HeuweiE220 mobile modem. I’d be greatful for your help.
thanx.
P.
June 12th, 2010 at 7:15 am
The iSSH utility can be downloaded here:
http://macserve.org.uk/projects/issh/