This service will be undergoing maintenance at 03:30 UTC, 2016-05-27. It is expected to last about 2 hours

Bug 421251

Summary: Prevent disconnections by enabling ServerAliveInterval by default
Product: [Fedora] Fedora Reporter: Nadav Har'El <nyh>
Component: opensshAssignee: Tomas Mraz <tmraz>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-04 13:32:30 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

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
default.

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.