LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-29-2015, 08:28 AM   #1
leniviy
Member
 
Registered: Jul 2009
Distribution: Archlinux
Posts: 69

Rep: Reputation: 4
The root cause of the need of ssh keepalives


Many people complain that their ssh connections are reset after some idle time and the solution is to use ServerAliveInterval on client and ClientAliveInterval on server.

But what is the cause of an idle connection being cut, when keepalives not enabled? Who cuts them? The OS or sshd? Where is it configured?
 
Old 09-29-2015, 08:41 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
On the remote host, look for
Code:
export TMOUT=xx[x]
in ~/.bashrc or other system profile file, or...(.profile, etc.)
Locally, I use
Code:
.ssh/config
Host *
ServerAliveInterval 120
ServerAliveCountMax 30
ConnectTimeout 30
I stay connect for days of 'inactivity'.

Hope that helps.

Another trick is to run something indefinately, like
Code:
watch -n 10 w
and the system thinks you are doing stuff, so TMOUT won't kick in.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you help decipher Apache2 server-status output? Are KeepAlives Misconfigured? transient Linux - Server 3 05-23-2012 09:34 AM
root terminal has different bash config when I ssh in vs su from another ssh account stardotstar Linux - General 4 07-01-2010 06:24 PM
GRE keepalives. How can a SUSE 9.0 Linux box send GRE keepalives? dlef Linux - Networking 1 06-28-2005 12:00 PM
Flooded with keepalives lantern Linux - Networking 2 03-31-2005 08:27 AM
configure terminal to send keepalives for ssh naijaguy Linux - Newbie 3 03-22-2005 04:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration