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: Sun, 11 Apr 2021 12:51:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim,

>> Accessing an ssh server on MS Windows via Tramp will fail in general,
>> because Tramp expects a POSIX shell on the server side. If I read the
>> docs correctly, the ssh server on MS Windows opens a powershell.
>
> You can actually set the default ssh shell on MS Windows to be a POSIX
> shell by setting a registry value[1]. I've tried this and it works
> well when using PuTTY or ssh via the command line, though the ANSI
> escapes are still there, and I haven't been able to get it to work
> through Tramp yet.
>
> The ubiquity of Git has a nice side effect here: every MS Windows
> system with Git installed has sh.exe and dozens of other common POSIX
> programs in .../Git/usr/bin. In theory, Tramp (or the user) just needs
> to change the `tramp-remote-shell' property from "/bin/sh" to
> "C:/Program Files/Git/usr/bin/sh.exe"[2] when connecting to an MS
> Windows server. If the ANSI escape issue is resolved, setting
> `tramp-remote-shell' might be enough to allow connecting to MS Windows
> servers via sshx. I'm still not 100% sure the ANSI escapes are the
> problem, but if so, this would hopefully reduce the amount of effort
> required to make this work.

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.

> - Jim

Best regards, Michael.



reply via email to

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