sshnet / sshnet/SSH.NET

SSH.NET UploadFile and SshCommand stops running after an connectivity interruption

Open
#894 0 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

With the SSH.NET Script that I am writing I want to Upload some specific large Files and start a time consuming PowerShell Script. To Upload the Files I am using UploadFile from SftpClient und to start my .ps1-File I use CreateCommand and Execute from SshCommand.

My Problem is, that the UploadFile as well as the execution of the ps1-Script will not continue to run my c# Script when the Connection is restored after an interruption.
Is there a way to resume/restore the ssh Connection so that the Upload and SshCommand continues to run, so that my other c# commands get executed

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 examining SftpClient.UploadFile and SshCommand.Execute, then reproduce an interruption while a large upload or PowerShell command is active. Determine the expected behavior for the restored connection and whether the operation should resume; the issue is done when that behavior is implemented or clearly documented and verified for both operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.