Re: Keeping ssh sessions alive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux