Disabling ssh timeouts?

Jose Garcia Juanino jjuanino at gmail.com
Wed May 13 15:44:26 UTC 2009


El miércoles 13 de mayo a las 17:26:10 CEST, Steve Kargl escribió:
> On Wed, May 13, 2009 at 04:54:33PM +0200, Jose Garcia Juanino wrote:
> > El miércoles 13 de mayo a las 07:03:33 CEST, Steve Kargl escribió:
> > > 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.
> > > 
> > >
> > > Running /usr/home/sgk/gcc/gcc4x/gcc/testsuite/gfortran.dg/dg.exp ...
> > > 
> > > 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 have fixed that problems with ServerAliveInterval option. Give it a
> > try:
> > 
> > ssh -o "ServerAliveInterval 60" -l <user> <host>
> > 
> > (screen is a goog idea, as other people have pointed out, but sometimes
> > it is not posible to install programs on the server)
> > 
> 
> Thanks for the tip about ServerAliveInterval.
> 
> Also, thanks, everyone for the tip about screen.

A last tip, if ServerAliveInterval does not work as expected:

$ ssh -l <user> <host>
$ gccCompilation > /tmp/gccCompilation.log 2>&1 < /dev/null

At this point, it would be possible to exit from the ssh session with
"exit" or CTRL+D. Yo only must to guaranteed this process will not
output anything to stdout, and will not read anything from stdin.

Best regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090513/63395bca/attachment.pgp


More information about the freebsd-questions mailing list