I wrote a program which does this, along with the ability to restart an ssh tunnel. The web page http://www.swlink.net/~styma/SunAtHome/sshKeepAlive.html describes the program and how it works. The source is at http://www.swlink.net/~styma/SunAtHome/sample_files/sshr_cron.c.html The web page also has a link to a gzip'ed copy of the program. The way the program works, is you have your ssh tunnel tunnel some port to the echo server on the remote machine. The program is run from a cron job and opens a the tunnel, sends data down the tunnel, reads the echo'ed data and verifies that it got back what it read. It contains code to restart the tunnel (using keys not passwords) in the event something is wrong. It is known to work on both Fedora and Solaris sparc. Hope this helps. Bob Styma