Here is a simple description how to make an ssh tunel:
ssh -f user@remote-machine.com -L localport#:remote-machine.com:remoteport# -N
-f run in background;
-L localport#:remote-machine.com:remoteport# which local port will be connected to wich remote port.
-N instructs OpenSSH to not execute a command on the remote system.