Jan 11, 2012 at 1:43 PM
Edited Jan 11, 2012 at 1:44 PM
I've just started using SSH.NET after a lot of difficulty with sharpSSH. Thanks for the work.
I've been trying to SCP some files to an embedded device running Dropbear and have been seeing exceptions.
I'm just doing something like this and getting socket exceptions
var scp = new ScpClient(remoteHost, login, password);
bool status = false;
scp.Upload(new FileInfo(Source), Target);
status = true;
} catch(Exception e)
_logger.Warn("Exception in SCP transfer: " + e.Message);
I looked into this further and it seems to be to do with the Tx message size being too big for DropBear.
The default BufferSize for ScpClient looks to be 32kB. When I reduce this buffer size down to 8kB the file transfers ok.
Just in case anybody else sees this, add:
scp.BufferSize = 8*1024;
Dynamic Devices Ltd