You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are connecting to a proprietor device which is running on Linix to download file(s) over ssh using the ScpClient.
We are currently using SSH.NET-2023.0.1 version.
When we are downloaing huge file and during this time if the proprietor device is switched off, then ScpClient's Download function is blocked. On debugging we could see that the program hangs at the call to Monitor.Wait(_buffer); on line 229 of PipeStream.cs.
I used RemotePathTransformation options None and ShellQuote, but it didn't work.
private void Download(string remoteFilePath, string fileName)
{
// Use Scp to download the file
using (ScpClient scp = new ScpClient(IPAddress, UserName, Password))
{
scp.OperationTimeout = TimeSpan.FromMilliseconds(Timeout);
scp.ErrorOccurred += new EventHandler<Renci.SshNet.Common.ExceptionEventArgs>(OnActionErrorOccurred);
scp.RemotePathTransformation = RemotePathTransformation.ShellQuote;
scp.Connect();
using (Stream dlFile = System.IO.File.OpenWrite(fileName))
{
scp.Download(remoteFilePath, dlFile);
}
scp.Disconnect();
}
}
Looking for some support.
The text was updated successfully, but these errors were encountered:
We are connecting to a proprietor device which is running on Linix to download file(s) over ssh using the ScpClient.
We are currently using SSH.NET-2023.0.1 version.
When we are downloaing huge file and during this time if the proprietor device is switched off, then ScpClient's Download function is blocked. On debugging we could see that the program hangs at the call to Monitor.Wait(_buffer); on line 229 of PipeStream.cs.
I used RemotePathTransformation options None and ShellQuote, but it didn't work.
Looking for some support.
The text was updated successfully, but these errors were encountered: