Open ganeshkamath89 opened 5 years ago
Please try changing the buffer size to 8K.
Code copied from above link:
using (var sftp = new SftpClient(connection))
{
sftp.BufferSize = 8192;
sftp.Connect();
// ...
}
The object of the class SshClient does not have an attribute for Buffer size. I tried hardcoding the values send and receive Buffer, but it did not help.
I am getting the following error @msdivy
SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Sending message 'ChannelCloseMessage' to server: 'SSH_MSG_CHANNEL_CLOSE : #0'.
SshNet.Logging Verbose: 1 : [2182A24196544768B0D31071155C76D0ABC19F90] Sending message 'ChannelOpenMessage' to server: 'SSH_MSG_CHANNEL_OPEN'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelOpenConfirmationMessage' from server: 'SSH_MSG_CHANNEL_OPEN_CONFIRMATION : #827'. SshNet.Logging Verbose: 1 : [2182A24196544768B0D31071155C76D0ABC19F90] Sending message 'ChannelRequestMessage' to server: 'SSH_MSG_CHANNEL_REQUEST : #0'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelSuccessMessage' from server: 'SSH_MSG_CHANNEL_SUCCESS : #827'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelDataMessage' from server: 'SSH_MSG_CHANNEL_DATA : #827'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelEofMessage' from server: 'SSH_MSG_CHANNEL_EOF : #827'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelRequestMessage' from server: 'SSH_MSG_CHANNEL_REQUEST : #827'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelCloseMessage' from server: 'SSH_MSG_CHANNEL_CLOSE : #827'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Sending message 'ChannelCloseMessage' to server: 'SSH_MSG_CHANNEL_CLOSE : #0'.
SshNet.Logging Verbose: 1 : [2182A24196544768B0D31071155C76D0ABC19F90] Sending message 'ChannelOpenMessage' to server: 'SSH_MSG_CHANNEL_OPEN'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelOpenConfirmationMessage' from server: 'SSH_MSG_CHANNEL_OPEN_CONFIRMATION : #828'. SshNet.Logging Verbose: 1 : [2182A24196544768B0D31071155C76D0ABC19F90] Sending message 'ChannelRequestMessage' to server: 'SSH_MSG_CHANNEL_REQUEST : #0'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelSuccessMessage' from server: 'SSH_MSG_CHANNEL_SUCCESS : #828'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelDataMessage' from server: 'SSH_MSG_CHANNEL_DATA : #828'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelEofMessage' from server: 'SSH_MSG_CHANNEL_EOF : #828'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelRequestMessage' from server: 'SSH_MSG_CHANNEL_REQUEST : #828'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Received message 'ChannelCloseMessage' from server: 'SSH_MSG_CHANNEL_CLOSE : #828'. SshNet.Logging Verbose: 5 : [2182A24196544768B0D31071155C76D0ABC19F90] Sending message 'ChannelCloseMessage' to server: 'SSH_MSG_CHANNEL_CLOSE : #0'. _session was null.
Exception Location Exception: _session was null. Exception is hit in this block of code: protected SemaphoreLight SessionSemaphore { get { return _session.SessionSemaphore; } } In file SSH.NET\src\Renci.SshNet\Channels\Channel.cs
Have a look at this: https://github.com/sshnet/SSH.NET/issues/400
Hi @msdivy, the suggestion given in this link caused my application to close sooner. I am running the code from the Development brunch.
We are using Dropbear with SSH.Net for an application.
Setup:
Changes attempted:
Environment:
Other test case combinations tried and working so far:
Has anybody faced this kind of disconnection?
Does anyone have any recommendation or workaround for this problem?