$ ssh -N <user>@<yourserver> -L <localport>/localhost/<serverport>
so if I'm bob at bobsbookwonderland.com, and I run a test server there on its localhost 5000 that I want to access from home, I'd type (from home):
$ ssh -N email@example.com -L 5000/localhost/5000
and then on my local machine I'd just point my web browser to localhost:5000 as if I were running the test server locally.
$ ssh -N -L <localport>:localhost:<serverport> <user>@<yourserver>
$ ssh -N -L 5000:localhost:5000 firstname.lastname@example.org
-g Allows remote hosts to connect to local forwarded ports.