tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp (2.1.15-pre); [Feature Request] Multihop sudo


From: Michael Albinus
Subject: Re: tramp (2.1.15-pre); [Feature Request] Multihop sudo
Date: Wed, 21 Jan 2009 12:12:25 +0100
User-agent: Gnus/5.101 (Gnus v5.10.10) Emacs/21.3 (hpux)

David Abrahams <address@hidden> writes:

> So I'd like a way to ssh in as 'dave' and then do a sudo on the remote
> machine (through tramp of course), where it would ask for a password as
> usual.

>From the Tramp manual, section 4.8 "Connecting to a remote host using
multiple hops":

  PROXY can contain the patterns `%h' or `%u'.  These patterns are
  replaced by the strings matching HOST or USER, respectively.

  If you, for example, wants to work as `root' on hosts in the domain
  `your.domain', but login as `root' is disabled for non-local access,
  you might add the following rule:

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

  Opening `/sudo:randomhost.your.domain:' would connect first
  `randomhost.your.domain' via `ssh' under your account name, and perform
  `sudo -u root' on that host afterwards.  It is important to know that
  the given method is applied on the host which has been reached so far.
  `sudo -u root', applied on your local host, wouldn't be useful here.

  This is the recommended configuration to work as `root' on remote
  Ubuntu hosts.

> Ideally there would be a customization interface that simply
> allowed me to list the servers that should be treated in that way when I
> use the sudo method.

That is on the todo list already. Unfortunately, I haven't enough time.

> Thanks for the wonderful work so far!

Best regards, Michael.





reply via email to

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