Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Client KeepAliveInterval and SendKeepAlive

$
0
0
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.Connect();
  oClient.KeepAliveInterval = new TimeSpan(0, 0, 60);
  SshCommand oCommand = oClient.CreateCommand(someCommandHere);
  oClient.SendKeepAlive();
  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 ssh.net 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!

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>