Just a Little script i wrote to log on to a server and set up a ssh tunnel mapping a remote VNC port to your local machine. If the connection is refused the script will keep trying at increased intervals.
To make the script work you need to create a credentials file and put the following in it:
set username "yoursshusername"
set passwd "yoursshpassword"
Remember to chmod the credentials file, just in case, because the details are stored in plain text. You will need to edit the script to point at your credentials file and server name.
#! /usr/bin/expect