How can I use Emacs tramp to ssh to a remote host and edit a file as another user on an ad-hoc basis?

前端 未结 2 1885
[愿得一人]
[愿得一人] 2020-12-31 11:49

/multi used to work for me, now it\'s gone and I\'m frustrated.

What I want to do is, in my dream world:

/myuser@remotehost:sudo:anotheruser:/some/path/to/fi

2条回答
  •  温柔的废话
    2020-12-31 12:36

    As of this commit, TRAMP supports ad-hoc multiple hops again.

    Roughly speaking, you use it like this:

    /ssh:transituser@remotehost|sudo:user@remotehost:/some/file
    

    I haven't got it to work reliably with ido-mode yet, which is a shame, but it's a lot better than nothing! :-)

提交回复
热议问题