$ ssh -ND 9999 username@example.com
-N Do not execute a remote command. This is useful for just forwarding ports -D [bind_address:]port Specifies a local "dynamic" application-level port forwarding.