Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

SSH timeouts



On Thu, 6 Apr 2006, Jerry Feldman wrote:

> On Wednesday 05 April 2006 11:37 am, gboyce wrote:
>
>> Have you tried decreasing /proc/sys/net/ipv4/tcp_keepalive_time?
>>
>> If it times out after 15 minutes, setting tcp_keepalive_time to 840 (14
>> minutes), could keep your connection alive.
> I changed the subject on this.
> From my desk at work (SuSE 10.0 retail/Linux COE) I can maintain a
> connection to home and the 2 BLU servers for days (I am currently connected
> for over 1 week to both). My connection at work goes through a proxy
> server.
>
> From home (SuSE 10.0 retail) via a Linksys WRT54GX4 I get disconnected after
> a fairly short time. My desktop uses a wired connection through the router.
>
> My settings in ~/.ssh are the same for both my home and my work systems
> except for known_hosts and authorized_keys (obviously).
> A while back, my connections to the Red Hat 7.1 host would remain up but my
> connection to the Fedora Core 2 host would time out after a few hours.
>
> One thing I have not had the time to do is to run ssh in verbose mode and
> see if I can track the problem. It's not really much more than a minor
> irritant since I use public key authentication.

SSHD's configuration file allows you to decide if you want to send 
keep-alive packets or not.  The default setting in the Linux kernel is to 
send keep-alive packets every 2 hours (I believe), which isn't frequent 
enough for some routers.

The only way I've found to adjust the keep-alive packet frequency is using 
/proc/sys/net/ipv4/tcp_keepalive_time, but that is a global setting rather 
than an application specific setting.  I've never seen adjusting it cause 
a problem though.

--
Greg




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org