ssh ServerAlive probes


I am working on an application that needs to be able to rapidly detect a lost connection between an ssh client and ssh server. I am using ssh to do local and remote port forwarding, and sending data across the forwarded ports. I was originally relying upon the TCPKeepAlive probes, but found that I could not consistently detect a lost detection. Using the ServerAliveInterval and ServerAliveCountMax options, however, I am able to consistently detect a lost connection. The problem is, if I am using a low-bandwidth connection (cellular modem), and I am pushing a significant amount of data across, it seems that this hinders the communication between the client and server with the ServerAlive messages. In other words, when I am actually USING the connection, my application can mistakenly detect the connection as lost because the ServerAliveInterval x ServerAliveCountMax is exceeded without a response from the server. I was surprised at this behavior, since I expected the ServerAlive probes to only start after data flow between the client and server machines across that connection had ceased, but perhaps I am misunderstanding. I do not have much leeway as to how the server is configured. Can someone recommend a way to be able to both (1) quickly detect a lost connection [which, seems to require the interval and countmax be small], but not mistakenly detect the connection as lost when it is being used?

Thank you for any assistance.


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Relevant Pages

  • Re: .Net Scalability problem
    ... LoadRunner will peak out a server with a few virtual users. ... To get an idea of load, ... Fire off the test client and watch the number of ... > So I think that the MTC generate concurrent connection and per ...
  • Re: Connection lost at same time every hour (sometimes)
    ... After making the two following alterations on the server the problem seems ... After analyze your ipconfig on SBS and client, ... Then, other connection is good, ...
  • Re: server disconnection - very often
    ... Reason of permanent popups is VMware server aplication on clients. ... Run CEICW to configure the network of SBS: ... Two network adapters - manual router connection to broadband ... Uninstall VMware on client. ...
  • Re: Lan setup 2 nic
    ... The external nic only has TCP/IP enabled. ... Ipconfig of the server is looking good, but the client is still missing the ... > connection so we have a 2 nic with router setup now. ...
  • Re: Regular disconnections from remote web workplace
    ... I can connect to office server and all office clients from home at all times ... be physically working right up until the connection is lost. ... If I enter http://companyip from a client I receive the login screen for the ... Click Services tab and select Hide All Microsoft Services and Disable ...