sshnet / sshnet/SSH.NET

Partial file transfer using SCP

Open
#869 3 comments 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

Hi everyone,

I am using SCP to to upload file to a router, I noticed that intermittently, sometimes file transfer to the device is a partial but SCP claims to be successful. when last time I faced this problem, I added a delay of 5ms in subsequent packet transfer. It worked well for months and I started seeing this issue again. Most of the time last packet is dropped or missed. Below are some application logs:

Scp connection succeeded
Sending SCP Path without Quotes
SCP data packet send delay : 5.
Source stream length 86763.
Total data send 16384. Last data read 16384.
Total data send 32768. Last data read 16384.
Total data send 49152. Last data read 16384.
Total data send 65536. Last data read 16384.
Total data send 81920. Last data read 16384.
Total data send 86763. Last data read 4843.
Uploading finished. Total uploaded 86763

File size on device : 83815

Is this a known problem already?

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

No source file or test is identified. Start by reproducing the SCP upload to a router using the reported 86,763-byte transfer and compare the received size with the client logs; done means the complete file arrives reliably and the transfer does not report success for a partial file.

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.