SSH disconnects

Just wondering why my SSH sessions get disconnected so quickly?

If I have an SSH session open to the dreamhost server where my account resides, and don’t do anything for a few minutes, then it gets disconnected (Connection reset by peer).

Does anyone else have this? I’m using ssh on Gentoo Linux and don’t get this problem connecting to other Debian, RedHat and FreeBSD servers in various parts of the 'net.

Not sure what the timeout is, but not long enough to grab a bite to eat…

I would suspect some sort of network problem. This normally shouldn’t (and doesn’t) happen in my experience. You could also make sure the machine hasn’t recently been rebooted or crashed by checking the output of “uptime” when you reconnect.

Maybe try sending extended ping or mtr results to me via support so I can take a look at them - let them run for a good long while.

mtr -r -n -c2000 [your domain or machine]*
would be a good start. I imagine mtr can be installed from portage if it’s not already installed on your system. If you let me know your IP, I can also run some traces back to you and make sure the return route is looking OK as well (you can do this for me by running the same command from your DH server back to your home machine).

Just put ATTN: william in the subject line and I’ll keep an eye out for it.

  • note - this will print out the first line of output and then sit for a good long while… this is normal when running in “report” mode rather than in display mode.

Thanks for the helpful replies. I’ve just sent you the network stats and tried playing with the keepalive settings in SSH…

Anyway that mtr program looks good, I had no problems installing it.

FYI, just one thing I noticed, when I do a report (to anywhere, not just Dreamhost) there’s a high chance that the later hops will ‘lose’ the last packet. So with -c 2, 50% packet loss is common, with -c 10, 10% loss is common… but with -c 2000 it’s very marginal. :slight_smile: