[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

editing a remote file which requires sudo

From: Terrence Brannon
Subject: editing a remote file which requires sudo
Date: Mon, 25 Oct 2010 10:44:31 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20101013 Thunderbird/3.1.5

I know this is an oft-asked question, and I've looked at the mailing list posts as well as several blogs. But nothing I am reading seems to quite work for me.

Here is my situation

(tramp-version t)

(emacs-version t)
GNU Emacs (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-09-26 on ubuntu

Now, I can ssh to as the user 'ubuntu' and when on that machine (because my public key on my local machine is in the .ssh/authorized_keys for that user 'ubuntu'). Then, I can type sudo $EDITOR file.txt and edit a file owned by root

I would like to be able to edit those same files from my local emacs, using some combination of syntax and configuration.

Here is the configuration I tried:


and here is the syntax I tried:

C-x C-v /sudo:address@hidden:/etc/nagios3/conf.d/generic-host_nagios2.cfg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]