Quantcast
Viewing latest article 4
Browse Latest Browse All 6

Answer by Dave Bacher for Open file via SSH and Sudo with Emacs

Update: Although this answer solved the original problem, it was written for emacs 20 or 21. For emacs 24, I recommend you use phils's answer because it offers more explanation and is up to date.


I think multi-hop filenames in tramp is what you're looking for.

The first hop would be ssh and the second would be sudo.


Update: Recent versions of emacs support multiple hops using proxies:

(add-to-list 'tramp-default-proxies-alist ("my-sudo-alias" nil "/ssh:user@ssh-host"))

Then invoke by opening:

/sudo:my-sudo-alias:file-on-ssh-host

Viewing latest article 4
Browse Latest Browse All 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>