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

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

Re: tramp sudo or not sudo on remote server


From: Eric Abrahamsen
Subject: Re: tramp sudo or not sudo on remote server
Date: Tue, 30 Aug 2011 10:36:15 +0800
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux)

On Tue, Aug 30 2011, Michael Albinus wrote:

> Eric Abrahamsen <eric@ericabrahamsen.net> 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.

Great! That works perfectly (and helps me make sense of what's actually
going on in these proxy sexps).

>
>> 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, actually all I was asking was what you answered above -- how to
continue using my .ssh/config shortcuts.

>> Thanks again, this at least got it working!
>>
>> Eric
>
> Best regards, Michael.




reply via email to

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