Better to use, e.g.:
ssh -fN -o ServerAliveInterval="240" -R 2222:localhost:22 example.com
(And on example.com ssh -p 2222 localhost)This lets you easily keep the tunnel open long-term. Why?
-f Background the ssh process (don't need nohup)
-N Don't run any command
-o... Make ssh do the work of keeping the session alive forever