I have been using Linux and SSH for years now and I'm surprised I have not yet needed to create an SSH tunnel. The need for the tunnel was to connect to a remote PostGRES database that didn't allow remote connections.
What I did was create a tunnel from my local port 5432 to the remote server's port 5432 over SSH. The command looked like this:
ssh -L 5432:192.168.15.75:5432 root@192.168.15.75 -p 2222 -N
Where 192.168.15.75 is the remote machine. 5432 is the PostGRES port and 2222 is the SSH port.
It worked first try!
Steven Reimer
