tramp-devel
[Top][All Lists]
Advanced

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

Re: Tramp SUDO remote and localhost


From: Michael Albinus
Subject: Re: Tramp SUDO remote and localhost
Date: Tue, 30 Aug 2016 09:46:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

address@hidden (Tory S. Anderson) writes:

Hi Tory,

> I have the following in my config files:
>
> (add-to-list 'tramp-default-proxies-alist
> '(nil "\\`root\\'" "/ssh:%h:") ;; 
> https://github.com/emacs-helm/helm/issues/981
> ))
>
> This causes tramp (which I'm using through Helm) to let me sudo 
> into any of the many remote servers I work with (assuming they 
> have ssh keys configured). However, now I can't do find-file 
> /sudo::<local_path> as it tries to ssh to localhost. Is there any 
> way I can keep the over-weighing benefit of sudo remote hosts 
> while also being able to sudo locally?

The Tramp manual discusses exactly this case:

(add-to-list 'tramp-default-proxies-alist
             '(nil "\\`root\\'" "/ssh:%h:"))
(add-to-list 'tramp-default-proxies-alist
             '((regexp-quote (system-name)) nil nil))

Be careful to apply both forms in this order, the second rule must be
the first on in `tramp-default-proxies-alist'. See also

(info "(tramp) Multi-hops")

> - Tory

Best regards, Michael.



reply via email to

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