Hacker News new | comments | show | ask | jobs | submit login

The right way to do it is:

    $ ssh -N -L <localport>:localhost:<serverport> <user>@<yourserver>

    $ ssh -N -L 5000:localhost:5000 bob@bobsbookwonderland.com 

(the : is standard syntax used on platforms, including OSX and PuTTY, and some platforms don't support getopt arguments after the first non-flag argument)

Another useful setting is

    -g      Allows remote hosts to connect to local forwarded ports.
if you want to allow non-local connections.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact