sshnet / sshnet/SSH.NET

client.DownloadFile('/my/absolute/path', stream) throwing empty ssh.net exception (staus code "Failure")

Open
#720 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.4k
Forks
993
Avg merge
9d 21h
Merged PRs (30d)
1

Description

_client.DownloadFile("/absolute/path/to/file.csv", stream)

I confirmed file, path, authentication, filname is ok.
I can download this file using other clients.
The destination supports multiple ftp servers, the old servers still work using ssh.net
the new server where these files get replicated are throwing this vague exception.
new servers work in other clients.

after stepping through this code locally, i can narrow it down to GetSftpException => response.StatusCode "Failure".

image

so it throws this generic exception with no message

image

stepped through it like 20x. can't see why the status code gets assigned a "Failiure" :(

using your latest source code as of today

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing client.DownloadFile("/absolute/path/to/file.csv", stream) against the newer server, then inspect GetSftpException and the response.StatusCode handling mentioned in the report. Compare the failing server response with a working SSH.NET server and other clients. Done should identify why the response is reported as Failure and establish a specific fix or clearer error behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.