tramp-devel
[Top][All Lists]
Advanced

[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:1.9.2.11) 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)
2.2.0-pre

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

Now, I can ssh to remotedomain.com 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:

(add-to-list
 'tramp-default-proxies-alist
 '(
   "remotedomain.com"
   "ubuntu"
   "/ssh:address@hidden:"
   )
)

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]