[GLLUG] SSH problem

Charles Ulrich charles at bityard.net
Thu Jul 3 16:54:01 EDT 2008


On 7/3/08, Stanley C. Mortel <mortel at cyber-nos.com> wrote:
> I'm having some trouble shelling into a remote server.  Sometimes it just
>  won't connect, and when it does, if I don't keep up some activity, it seems
>  to lose the connection.  I'll go to type something on the command line and
>  nothing happens.  I have to close the terminal window and reconnect.  When
>  I do that, it looks like I'm in another session, since the up arrow brings
>  back a different command history.  I've looked at the logs but nothing is
>  there.  Even when I set the logging level higher.  When I'm on-site there
>  does not seem to be a problem.  If I do X forwarding and have some
>  graphical program open, I don't seem to lose the connection.
>
>  I'm sort of at a loss here.  I checked the remote firewalls (there are two
>  on that end), but didn't find anything that suggested they were terminating
>  a connection, or even that there was a setting to control such a thing.  I
>  uninstalled and reinstalled openssh client and server, and openssl.  Is it
>  possible that their ISP is doing something funny?  There have been some
>  intermittent issues with slow network response there, that I'm still
>  troubleshooting, but again, when I'm there I don't lose the connection.

Either your ISP or the remote location might have a router that
automatically drops TCP connections (without even the courtesy of a
RST packet) after they've been idle for some time. This is pretty poor
policy because while it might keep their routing tables a bit cleaner,
it's a pain for people who use the Internet for things besides web and
email.

You might try an OpenSSH setting called ClientAliveInterval in
/etc/ssh/sshd_config. It sends a bit of traffic to the SSH client if
the connection's been idle for a certain length of time.

Charles


More information about the linux-user mailing list