tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shell-quoting issue for sshx/scpx on MS Windows


From: Michael Albinus
Subject: Re: Shell-quoting issue for sshx/scpx on MS Windows
Date: Tue, 13 Apr 2021 19:52:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim,

>> That's possible, yes. But besides the POSIX shell, Tramp needs on the
>> remote side also some POSIX tools, like find, grep, stat, you name it.
>>
>> Might be worth to try it, but since I don't run a (remote) MS Windows
>> machine, I have no chance to test.
>
> Git hopefully provides enough on MS Windows. I've attached a list of
> all the executable files in "C:/Program Files/Git/usr/bin" in case you
> want to see what's available. I think the first thing would be for me
> to try adding support for the necessary ANSI escape response to
> satisfy MS Windows' OpenSSH server; I'll see if I can figure out how
> to do that when I get the chance. I'll let you know how that goes.

Thanks for the list, it looks good. Alternatively, there is the mingw
project, which offers also POSIX programs. I haven't tried either.

In order to make progress, I have installed MS Windows 10 in a virtual
machine, and I have bought an MS Windows license. This allows me to test
ssh and scp on MS Windows myself. Sadly, the sshd daemon does not start,
I need to figure out what's up.

Anyway, the Tramp test suite does not run through. Copying files with a
space in their file name, via scp, does not work. I guess it needs kind
of quoting, but I don't know which. See

--8<---------------cut here---------------start------------->8---
scp albinus@gandalf:/home/albinus/.emacs 
"c:/Users/albinus/AppData/Local/Temp/foo bar baz"
--8<---------------cut here---------------end--------------->8---

Quoting a local file name works.

--8<---------------cut here---------------start------------->8---
scp "c:/Users/albinus/AppData/Local/Temp/foo bar baz" 
albinus@gandalf:/home/albinus/tmp
--8<---------------cut here---------------end--------------->8---

This works also. "/home/albinus/tmp/foo bar baz" has appeared on the
remote machine.

--8<---------------cut here---------------start------------->8---
scp "c:/Users/albinus/AppData/Local/Temp/foo bar baz" 
"albinus@gandalf:/home/albinus/tmp/blub bla"
scp: ambiguous target
--8<---------------cut here---------------end--------------->8---

Doesn't work. Do you have an idea, which kind of quoting for the remote
target I need?

> - Jim

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]