I'm using Tamir.SharpSsh
to upload a file to a ssh server with the code below but I'm getting System.IO.IOException: Pipe closed.
Any clue why?
SshTransferProtocolBase scp = new Scp(SSH_HOST, SSH_USER);
scp.Password = SSH_PASSWORD;
scp.Connect();
foreach (string file in files)
{
string remotePath = "incoming/" + new FileInfo(file).Name;
scp.Put(file, remotePath);
}
scp.Close();
Regards /Niels
For future references: Apparently the server only accepted Sftp connections. So I changed to:
SshTransferProtocolBase scp = new Sftp(SSH_HOST, SSH_USER);
I had exactly the same problem ("Pipe Closed") when trying to transfer files.
Changing to
Sftp scp = new Sftp(SSH_HOST, SSH_USER);
solved the problem.
Thanks
Stefano
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With