TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:16130] keepalive in ssh?



Jon Schewe wrote:
> 
> I've discovered that with port forwarding over ssh I can get access to the
> internal web at my work, however I'm trying to figure out how to keep the
> connection open.  ssh seems to want to time out every now and then and I want
> to be able to restart it, but when I do from cron, things tend to get lost.
> 
> Anyone got any ideas?

I've had similar problems, and I think it might be a good idea to look
at changing the value in the file /proc/sys/net/ipv4/tcp_keepalive_time,
which controls how often keepalive signals are sent.  It's usually set
to 7200 (2 hours), so you might want to put it down to 300 (5 minutes)
or something else fairly low

-- 
 _  _  _  _ _  ___    _ _  _  ___ _ _  __   Gravity brings me down. 
/ \/ \(_)| ' // ._\  / - \(_)/ ./| ' /(__                              
\_||_/|_||_|_\\___/  \_-_/|_|\__\|_|_\ __)                             
 [ Mike Hicks | http://umn.edu/~hick0088/ | mailto:hick0088@umn.edu ]