Quantcast
Channel: Open file via SSH and Sudo with Emacs - Stack Overflow
Viewing all articles
Browse latest Browse all 6

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

$
0
0

I had some troubles with the selected answer. However, it worked when I added this line to .emacs:

(add-to-list 'tramp-default-proxies-alist '(".*""\\`root\\'""/ssh:%h:"))

And then executed the following:

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

It was slightly confusing because at one point I was prompted for the "root" password, but entering my user's password granted me access. It also universally works on all hosts on the network. Also, I can still do this to not be root:

/ssh:ssh-host:file-on-ssh-host


Viewing all articles
Browse latest Browse all 6

Trending Articles



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