From http://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html
$ ssh -R 9000:localhost:3000 user@example.com
$ ssh -L 9000:localhost:5432 user@example.com $ psql -h localhost -p 9000
$ ssh -L 9000:imgur.com:80 user@example.com