Howto use ssh for Port Forwarding

edited on 17.01.2008

ssh -f -N root@rout-wilen.patschbo.ch -L 389:gomez:389
-f Requests ssh to go to background just before command execution
-N Do not execute a remote command
-L Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side
For more info read the manual from ssh (man ssh)

Check the Port (LDAP-389)

netstat -an | grep 389
tcp 0 0 127.0.0.1:389 0.0.0.0:* LISTEN
tcp6 0 0 ::1:389 :::* LISTEN