I'm using Linux and I'm trying to tramp into a Windows machine.
I'm trying to set the remote-shell
option of tramp because tramp's default of /bin/sh
doesn't work for a Windows remote host. I'd like to set tramps remote shell to:
C:\Program Files\Git\bin\sh.exe
I've tried to add this to /home/username/.emacs
:
(require 'tramp)
(add-to-list 'tramp-connection-properties
(list (regexp-quote "/sshx:myusername@mywindowshost:")
"remote-shell" "C:\Program Files\Git\bin\sh.exe"))
I've also tried every way I could find or imagine to escape this space in the middle, and the slashes also. In the end that path is never understood.
I don't know anything about Emacs Lisp. I thought it would escape slashes like most other languages.
I can change the default shell of OpenSSH on Windows. I've set it to use cmd, powershell, or "C:\Program Files\Git\bin\sh.exe". They all work for connecting via ssh. Unfortunately tramp insists on using /bin/sh instead of the default. And no matter the OpenSSH shell set, the string with the space in the middle of "Program Files" is never understood like intended.