while true; do ssh -t -n -R 127.0.0.1:2233:127.0.0.1:22 user@remote.host.com "while true; do ps -ef; sleep 1; done" ; sleep 1; done
2. Run the the above script in a detached screen session:
screen -S tunnel -d -m /path/to/tunnel.sh
That's all. This creates a background screen session, which runs the tunnel.sh script, which loops an ssh command to keep it up and running.