Quantcast
Viewing all articles
Browse latest Browse all 6

Answer by vampolo for Open file via SSH and Sudo with Emacs

From the tramp multi-hops configuration webpage

 (add-to-list 'tramp-default-proxies-alist'(nil "\\`root\\'""/ssh:%h:"))      (add-to-list 'tramp-default-proxies-alist'((regexp-quote (system-name)) nil nil))

Then any

C-x C-f /sudo:remote-host:/file

will open file using sudo after logged with the same username of the user running emacs but on the remote machine.


Viewing all articles
Browse latest Browse all 6

Trending Articles



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