SSH keeps hanging up...

Frank Sorenson frank at
Sat May 24 19:36:02 MDT 2008

Hash: SHA1

Lonnie Olson wrote:
> On Wed, May 21, 2008 at 11:07 PM, Kimball Larsen
> <kimball at> wrote:
>> I occasionally have to remotely admin a server at the office from home.
>> I have it set up to only allow a few hosts access via ssh, and my home
>> static IP is on the permitted list. (using hosts.allow, hosts.deny)
>> I can connect to and log into the server just fine.  The session works great
>> as long as I am actively doing something in the shell.  However, if I let it
>> sit idle for (it seems) < 1 minute, the session seems to just lock up.
> Many consumer routers/DSL modems do not handle long running SSH
> connections well.  They sometimes tend to kill the connection
> prematurely.  You can experiment with the SSH options TCPKeepAlive,
> and ServerAlive in the client to see if you can avoid it.  However
> more often than not the problem is caused by the router itself.
> --lonnie

I've had pretty good success using these options in the sshd_config:
	ClientAliveInterval 60
	ClientAliveCountMax 3

- --
Frank Sorenson - KD7TZK
Linux Systems Engineer, DSS Engineering, UBS AG
frank at
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora -


More information about the PLUG mailing list