server-side method instead of your client-side (so a tradeoff there), but this is what i usually use:
i put this in my .bashrc (if statement is so that it won't run during batch ssh or scp logins):
if test "xterm" = "$TERM" ; then
/home/myname/bin/keepalive &
fi
and /home/myname/bin/keepalive is just (periodically print a space and a backspace):
#!/bin/bash
while test 1 ; do sleep 600; echo -ne " \b"; done
Only side effect is that if a vi is left open, it appears to make the character under the cursor disappear (but really doesn't) .. ctrl-L to refresh the screen "fixes" it if i even notice it.