Preventing SSH timeouts . Some clarification needed

query <[email protected]> Tue, 8 Jun 2010 15:06:18 +0530
Newsgroups org.kernel.vger.linux-admin
Message-ID <[email protected]>
Hi ,

   We are seeing some dropped SSH connections because of which  some
of the process are failing . The main likely reason for the connection
drops is that both the client and server remains 100% busy during a
certain time interval and during that time interval we see those
occassional connection closed by the server.

===
 ssh_exchange_identification: Connection closed by remote host^M
  Return_status (65280)
  Exit_value (255)
  End_time (03 Jun 2010 22:41:41)
====

One work around I could see is adding a  timeout value using
ClientAliveInterval option in /etc/ssh/sshd_config on the server side
. Assume I have set the timeout value to 300 .


" The above option as per the sshd man page tells that it sets a
timeout interval in seconds after which if no data has been received
from the client, sshd(8) will send a message through the encrypted
channel to request a response from the client. "

Let's take a situation where the SSH client is 100% busy or idle and
it had communicated to the server for around 300 seconds , then in
this case if the above option is there , the server should send a
message to the client after 300 secs . The following two scenarios are
coming to my mind.

1)  if the server is also 100% busy during that time and could not
send the message to the client , will the ssh connection will be
dropped .
2) or Suppose the server was somewhat free after 350 secs , in that
case will it drop the connection or it will send a message to the
client to check whether the client is active or not since it could not
send the message at 300 s as it was busy during the time .


Please clarify the ssh behaviour for the above scenarious . I hope  I
am clear with the question and the above scenarious makes sense .


Thanks
Zaman