[BUGS] SSH timeout
Andrew
andrew at ugh.net.au
Tue Jan 1 05:19:11 EST 2008
On 31 Dec 2007, at 12:26, Jerahmy Pocott wrote:
> On this remote 4.2 stable box I'm having an issue with SSH timing out
> or something.. It seems to be when I'm running a long command where I
> don't provide any input for a few hours, like buildworld or a large
> tar, cp, etc. I come back to find the message:
>
> Read from remote host x.x.x.x: Connection reset by peer
> Connection to x.x.x.x closed.
>
> Looking at the various configuration files there doesn't seem to be
> any timeout set, I was wondering if maybe some default is compiled in?
> Of course it could be a gateway closing the connection I guess.. But
> I'v never had this problem on older boxes.. Maybe I'm not looking in
> the right spot?
A number of firewalls and NAT gateways timeout connections if there is
no traffic for a while and produce symptoms you are seeing. If that's
the problem you are seeing then try switching on ServerAliveInterval
in your ssh config.
> My current work around has been to run any long processes in the
> background and pipe their output to a file, but this doesn't always
> capture all the messages, especially with things like buildworld..
If you redirect stderr and stdout you should get everything. e.g. make
buildworld >& ~/make.out (for csh based shells).
Don't forget about screen either.
Andrew
More information about the BUGS
mailing list