help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: remote file editing over ssh with emacs 22.3.1 on Windows


From: Anselm Helbig
Subject: Re: remote file editing over ssh with emacs 22.3.1 on Windows
Date: Mon, 11 May 2009 23:18:00 +0200
User-agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.7 Emacs/22.3 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Sun, 10 May 2009 09:37:48 +0100,
Chris Withers <chris@simplistix.co.uk> wrote:
> 
> Eli Zaretskii wrote:
> >> What do I actually type to sudo to a different user when opening a file 
> >> on a remote system?
> > 
> >    C-x C-f /sudo:USER@MACHINE:/PATH/TO.FILE RET
> > 
> > Or
> > 
> >    (setq tramp-default-method "sudo")
> >    C-x C-f /USER@MACHINE:/PATH/TO.FILE RET
> 
> Hmmm, okay, I only see one username here. How do I specify the username 
> to connect as and then the username to sudo to?

You do it something like this:

  (add-to-list 'tramp-default-proxies-alist
        '("\\`host.example.com\\'" nil "/ssh:remoteuser@%h:"))

And then

  C-x C-f /sudo:privilegeduser@host.example.com:/ <RET>

HTH, 

Anselm


-- 
Anselm Helbig 
mailto:anselm.helbig+news2009@googlemail.com


reply via email to

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