David Abrahams <[email protected]> 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.



_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to