Bug 421251 - Prevent disconnections by enabling ServerAliveInterval by default
Prevent disconnections by enabling ServerAliveInterval by default
Product: Fedora
Classification: Fedora
Component: openssh (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-12-12 06:45 EST by Nadav Har'El
Modified: 2008-04-04 13:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-04 13:32:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nadav Har'El 2007-12-12 06:45:34 EST
On the modern Internet, rarely do you get a "clean" TCP connection. Devices
between you and the server, like firewalls, NAT, load balancers, and so on, do
various things to your TCP connections. Unfortunately, one of the things these
devices often take the liberty to do is to disconnect "inactive" connections -
where inactive often means just a few minutes of inactivities.

The result is that nowadays, in most situations I came across, SSH connections
rarely survive more than a few minutes of inactivity. Did you stop typing for a
few minutes? Next time you try to type in that window, you'll realize it is gone.

Luckily, OpenSSH (since version 3.8) has exactly the option to fix this problem!
Put "ServerAliveInterval 120" (for example) in the ssh client config file, and
the client will send a do-nothing message every 2 minutes and will allow the
connection to keep working for hours.

I think that in today's Internet, like I explained above, most people will face
this problem, and this option should be enabled by default /etc/ssh/ssh_config
which fedora distributes. I can't think of any reason why this should not be the

By the way, if you don't want the "ServerAliveInterval 120" to also cause a
disconnection after 6 minutes of network inavailability (3 failed message
sending), you can increase ServerAliveCountMax to something higher than 3
(perhaps much higher than 3). See the ssh_config(1) manual for more information.

Note You need to log in before you can comment on or make changes to this bug.