Skip to content

Conversation

@BeauJBurroughs
Copy link

fix for SCP upload to Windows 11 Open SSH fails with no such file or directory error #929

fix for SCP upload to Windows 11 Open SSH fails with no such file or directory error hierynomus#929
@hierynomus
Copy link
Owner

Might be worthwhile adding some tests to prove that this doesn't break things

@robertpatrick
Copy link

are we waiting on something specific to review and merge this fix?  Seems like a simple fix for a critical issue...

@hierynomus
Copy link
Owner

I'm wondering why this change? There are different Escape modes, have you tried the DoubleQuote escape mode... I don't see how the refenced issue is solved, there's no tests added that provide any explanatory code on why this works... So yes, it's waitring.

@robertpatrick
Copy link

I'm wondering why this change? There are different Escape modes, have you tried the DoubleQuote escape mode... I don't see how the refenced issue is solved, there's no tests added that provide any explanatory code on why this works... So yes, it's waitring.

I have a related issue open with lots of details but no one has bothered to offer a solution.

#929 (comment)

@evilC
Copy link

evilC commented Sep 19, 2025

Bump. Please fix!

I'm wondering why this change? There are different Escape modes, have you tried the DoubleQuote escape mode

Is this something we can do in our code to work around the issue, or are you referring to how the PR should be coded?

@robertpatrick
Copy link

@hierynomus one reason the current code doesn't work is that quoting command-line args with single quotes does not work in the Windows cmd shell (it does work in PowerShell).

C:\Temp>cd 'foo bar'
The system cannot find the path specified.

C:\Temp>cd "foo bar"

C:\Temp\foo bar>

@robertpatrick
Copy link

robertpatrick commented Oct 26, 2025

I understand your comment about the DoubleQuote escape mode now. The problem is that it requires some refactoring because the SCPFileTransfer.upload() method I am currently using doesn’t expose this option. I will try it out but I shouldn’t be forced to use a different API to get the upload to work when the SSH server is running on Windows. If this were my code, I would want it to “just work” by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants