On Wed, May 10, 2023, at 2:38 PM, Sam Varshavchik wrote:
I switched wifi routers. The new model, a Linksys WRT3200ACM kills my
idle
SSH sessions.
I found my old "hold" script, maybe it would work:
#!/bin/sh
#
# For holding open a connection that the sonic wall wants to time
# out.
if [ $# -lt 1 ];then
echo
echo "This script will try to hold open a shell session that may"
echo "otherwise be timed out by a sonicwall firewall or other idle"
echo "timeout functions. It will simple send a " " (without a CR)"
echo "every 15 minutes for as many hours as you specify on the command"
echo "line. Note that you have to background it if you want use of"
echo "the curser while it is running."
echo
echo "Usage: hold 3&"
echo "(hold open the connection for 3 hours)"
echo
exit
fi
loopcount=`expr $1 \* 4`
while [ $loopcount -gt 0 ]
do
sleep 900 #sleep 15 minutes
echo -ne " \b" # the smallest thing that will keep it open (is it?)
loopcount=`expr $loopcount - 1`
done