Dropping SSH connections over the internet

Rashkae ubuntu at tigershaunt.com
Fri Jan 11 04:23:00 UTC 2008


Alex Janssen wrote:
> I regularly connect from home to a Linux box hidden behind a router at 
> work via SSH.  Most times it is reliable. Other times the connection 
> just stops.  I guess my packets just stop getting to the server.  I can 
> logon immediately with another shell, so the server appears to be ok.  
> Some times the second connection will be interrupted as well.  Then I 
> can start a third and so on.  Other nights, it is rock solid.  I can 
> transfer files with scp and login multiple times to run a bunch of apps.
> Anyone got any ideas?  I'd like to know if there is something I could do 
> about it, within reason.
> 
> Thanks,
> Alex
> 


This is probably your home router dropping the connection. (or more 
specifically, dropping the network address translation)  They are 
infamous for doing so, especially if the connection is idle.

You can try adding ServerAliveInterval 15 to your ssh command line, or 
in the ~/.ssh/config file.   If the problem persists, I would try 
connecting your linux box directly to the net and bypassing the router 
to test if that's the source of your troubles.




More information about the ubuntu-users mailing list