[Top][All Lists]

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

Re: tramp sudo or not sudo on remote server

From: Michael Albinus
Subject: Re: tramp sudo or not sudo on remote server
Date: Mon, 29 Aug 2011 20:52:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Eric Abrahamsen <> writes:

> Sorry, I think I confused myself by using .ssh/config to define
> Host shortcuts for servers, such that "/bl:/path" goes to a certain host as a
> certain user.

If you don't specifiy a method, likely (the default method) scp is
used. That should work fine.

For proxy hops, you couldn't use scp, because it is an external
method. Hops must always be an internal method, like ssh.

So the following shall work:

  (add-to-list 'tramp-default-proxies-alist
               '("\\`bl\\'" "\\`root\\'" "/ssh:bl:"))

With this, it should be possible to access "/sudo:bl:/path" as root.

> Presumably I wouldn't be able to use this trick if I want
> to use switch between my regular user and sudo. There are a couple of
> awfully long host names, though -- are there any other shortcuts I can
> use?

See the Tramp manual, section "Frequently Asked Questions".

> Thanks again, this at least got it working!
> Eric

Best regards, Michael.

reply via email to

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