I don't know why, but i found the default buffer size of the client connection is 16k, and when the upload starts, with files over 16kb, the client waits to the buffer will be free again, but this never occur and the timeout is throwing.
To solve that, I'm setting the buffer size to a minor value and it's works fine:
To solve that, I'm setting the buffer size to a minor value and it's works fine:
AuthenticationMethod am = new PasswordAuthenticationMethod(tbUser.Text, tbPsw.Text);
ConnectionInfo ci = new ConnectionInfo(tbHost.Text, int.Parse(tbPort.Text), tbUser.Text, new AuthenticationMethod[] { am });
_sftpClient = new SftpClient(ci);
_sftpClient.BufferSize = 1024 * 8 - 50;
_sftpClient.Connect();
Hope it helps







