Hi Ashley,
This is a nasty little hack that may help, but this is not going to
solve the overall problem.
Add the following to your /etc/ssh_conf
ServerAliveInterval = seconds # (make it less than your routers timeout
value in seconds)
The down side of this is ssh client will "disconnect" your session if
the ping fails, whereas otherwise ssh would remain connected even
during a router reboot, like I say, it's a nasty little hack.
I've got a Nokia770 and it basically disables the wireless receiver
every few seconds to conserve power which is really annoying, so I've
got to use a value of no more than 2 seconds.
FYI: From the ssh_config man page:
ServerAliveInterval
Sets a timeout interval in seconds after which if no data has been
received from the server, ssh will send a
message through the encrypted channel to request a response from the
server. The default is 0, indicating that
these messages will not be sent to the server. This option applies to
protocol version 2 only.
Albert.
Ashley M. Kirchner wrote:
I recently replaced my wireless router. I'm now using a Linksys
WRT54G and I noticed that my SSH connections are being closed after
roughly 10 minutes of idleness. When I trace my connection, I get
this just before it closes:
[SSH LOCAL ONLY] : RECV: TCP/IP close
[SSH LOCAL ONLY] : State Change: SSH_STATE_CONNECTION->SSH_STATE_CLOSED
[SSH LOCAL ONLY] : Connected for 607 seconds, 1401 bytes sent, 2231
bytes received
Is this something the new router is doing? Nothing on this machine
has changed and the connections getting closed started happening after
the new router was installed. Is anyone else on the list use the same
router and tell me if it's doing the same to you?
By the way, the same thing happens with my SMTP connection. If
Thunderbird happens to be set to check e-mail every 15 minutes, after
10 minutes the connection gets closed and Thunderbird has to reconnect
again.
Thanks.