ssh -nNT -R <remote-port>:localhost:<local-port> -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" user@example.com
This will forward local-port
(from localhost) to remote-port
on example.com
, and set options to keep the connection alive