Hacker News new | ask | show | jobs
by ProfDreamer 2142 days ago
multi-hops[0] should probably be mentioned as well. Using those one can for example open a file using sudo via ssh:

    /ssh:you@remotehost|sudo:remotehost:/path
Doing any further actions on a file opened that way also applies the hops there as well. For the example above opening a shell or running a shell-command would run those through sudo on the remote host.

[0]: https://www.gnu.org/software/emacs/manual/html_node/tramp/Ad...

1 comments

It's worth mentioning that this is not limited to SSH followed by sudo. It can also be used to edit remote files through a bastion host, by just adding more SSH hops to the file path.