Assume you want to create an ssh tunnel somewhere and want to keep it up. cron is your friend here.
Enter this entry into your crontab using 'crontab -e'. homedir is wherever yourhosting provider dumped you.
* * * * * /homedir/boot/BOOT 2>/homedir/boot/BOOT.errors >/homedir/boot/BOOT.log
Create a directory for this. [not required, personal preference]
$ mkdir ~/boot
Create the boot file with these contents:
-----------------------------------
ps ax | grep -q "33306:[l]ocalhost:3306 destination_server" case $? in 1) nohup ssh -R 33306:localhost:3306 destination-server & ;; esac-----------------------------------