Disabling ssh timeouts?

Tim Judd tajudd at gmail.com
Wed May 13 13:11:12 UTC 2009


On Tue, May 12, 2009 at 11:29 PM, Steve Kargl <
sgk at troutmask.apl.washington.edu> wrote:

> On Tue, May 12, 2009 at 11:14:26PM -0600, Tim Judd wrote:
> > On Tue, May 12, 2009 at 11:03 PM, Steve Kargl <
> > sgk at troutmask.apl.washington.edu> wrote:
> >
> > > Is there anyway to disable sshd from timing out a connection?
> > > I've tried setting  ClientAliveCountMax and ClientAliveInterval
> > > and TCPKeepAlive in sshd.conf, but no combination that I've
> > > tried has worked.
> > >
> > >
> > > Read from remote host troutmask.apl.washington.edu: Connection reset
> by
> > > peer
> > > Connection to troutmask.apl.washington.edu closed.
> > >
> > > The only way I'v efound to complete a run of the GCC testsuite
> > > is to sit at the terminal and hit enter every so often.  Also
> > > note, nohup and backgrounding the job does not inhibit sshd
> > > dropping the connection and losing all testsuite results.
> > >
> >
> > I had this problem at a hotel recently.  I think it was the router saying
> > "stale connection here, cut it off"..  Only way around it I got to work
> was
> > setting PuTTY (Win32 app) connection keepalive to some value (I used 90
> > seconds).
> >
> > Is your ISP or gateway one that actively and annoyingly cleans up stale
> > connections?
>
> The ISP is comcast.net.  As long as I'm doing something
> interactively over the net, comcast.net doesn't time
> out the connection.  The system resetting the connection
> is my system at work.  It is my work system that I want
> to disable sshd's reset feature.
>
> --
> Steve
>


As I said before, it could also be the gateway at the client, or the gateway
at the server.  I was making the change on a client to keep it active, so
check your /etc/ssh/ssh_config


I have cisco routers that would potentially do it too, and it's all about
the config.


More information about the freebsd-questions mailing list