Persistent connection - Amazon ec2 server

I'm a relative NewB. I have an Amazon ec2 server set up as a 'reverse SSH tunnel'. A remote site is connecting to the Amazon server via SSH (using autoSSH), and my local computer then connects to the Amazon server - thus providing me with a connection to the remote site. From time to time, the remote device goes down, and that also 'breaks' the connection from my local computer to the Amazon server. I can get the remote device to automatically reconnect to the Amazon server, but my local computer and program does not automatically reconnect (and I can't force it to do so). Is there any way I can keep the local computer's connection to the Amazon server alive for 10 minutes or so? I would like the system to automatically re-connect (both ends) whenever possible. Can this be done, and if so, how?

Members online