Re: dlink router dropping ssh ?

From: Bipin Sehgal (bsehgal@uiuc.edu)
Date: 03/20/03


From: bsehgal@uiuc.edu (Bipin Sehgal )
Date: Thu, 20 Mar 2003 18:06:55 GMT

In the last exciting episode Darren Tucker wrote:
| In article <slrnb5puof.7p3.bsehgal@aa10.aae.uiuc.edu>,
| Bipin Sehgal <bsehgal@uiuc.edu> wrote:
| >I recently set up a home network using a dlink 604 router. After adding
| >this router, my idle ssh connections keep getting disconnected. However
| >if I keep some activity running on the connection, it stays alive. I
| >have checked all settings on the router and there isn't any place to
| >specify the idle timeout on the router.
| >
| >Does anyone know of a solution to fix this.
|
| That depends on which ssh implementation you're using. If it's
| openssh:
|
| $ man sshd_config
| [snip]
| ClientAliveInterval
| Sets a timeout interval in seconds after which if no data has
| been received from the client, sshd will send a message through
| the encrypted channel to request a response from the client. The
| default is 0, indicating that these messages will not be sent to
| the client. This option applies to protocol version 2 only.
|
| PuTTY can do this on the client side (Connection->Seconds between
| keepalives)
|
| --
| Darren Tucker (dtucker at zip.com.au)
| GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
| Good judgement comes with experience. Unfortunately, the experience
| usually comes from bad judgement.

This did not help. Anyway, I got a round about way of handling this. I
am now using port forwarding (port 22) while establishing the first
ssh connection. Subsequest ssh connections are made o my localhost. At
the same time I keep a script running on the first ssh connection that
prints something on the screen every 10 minutes to keep the connections
alive.

I no longer have to worry about idle connections timing out as there is
only one connection and the script keeps it alive.

I know that it is a crude solution however, it might just help others
with the same problem

Bipin



Relevant Pages

  • Re: SSH connection closed
    ... WRT54G and I noticed that my SSH connections are being closed after ... roughly 10 minutes of idleness. ... If you can't fix the router, you can try working around it in the ...
    (Fedora)
  • Re: sshd - time out idle connections
    ... I'm facing this unusual demand at work where we need to time out idle SSH connections for security purposes. ... ClientAliveCountMax ... Normally sshd bypasses login, but the sshd config parameter UseLogin can change that, although it disables X11Forwarding. ... I've already tried using login.conf 's idle timeout option and was sad indeed that it didn't apply to SSH connections. ...
    (freebsd-questions)