Client KeepAliveInterval and SendKeepAlive

Nov 19, 2013 at 12:19 AM
I was hoping someone could give me an example of how to use these 2 commands and exactly what they mean? I'm relatively new to SSH but have a decent understanding... I believe.

Such as, if I have a code block like this:
using(SshClient oClient = new SshClient(host,username,password)
  oClient.KeepAliveInterval = new TimeSpan(0, 0, 60);
  SshCommand oCommand = oClient.CreateCommand(someCommandHere);
  string result = oCommand.Execute();
oClient.KeepAliveInterval is doing what exactly? Is it telling the ssh client to send keep alive messages to the server every 60 seconds? Or is that what SendKeepAlive() does? Does SendKeepAlive() send a message once? Or does it send every 60 seconds.

I'm trying to solve a connection timeout issue when transferring large files usually over 5GB in size. I've monitored the secure log on the server that the client is connecting to, but from what Ive seen the client is the one disconnecting. Ive set the ClientAliveCountMax to 99999 on the Server to stop any disconnects but that doesnt appear to be stopping the timeouts.

I'd really appreciate a better explanation of what those 2 commands are doing so I can figure out whats happening. Thanks!