I am trying to use Emacs TRAMP to access files over ssh on a server that does not provide /bin/sh
, and so I get the following error when I try to connect:
env: can't execute '/bin/sh': No such file or directory
Is there any way to tell TRAMP where the remote shell is for that server? (The "server" is a tethered Android phone, so sh in at /system/bin/sh
.)
See also the docstring for the
tramp-methods
variable. This part would appear noteworthy:Edit:
So here's a way you could create a new method based on an existing one ("scpc" in this example), and then give the custom method a different remote shell:
Note that in Emacs 23 (Tramp 2.1.20), this property was named
tramp-remote-sh
. In Emacs 24 (Tramp 2.2.3-24.1) it has been changed totramp-remote-shell
.And I'm guessing that you can use this method by default for your specified host with this: