[Top][All Lists]

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

Re: FR: syntactic sugar for 'sudo' multi-hops with .ssh/config

From: Michael Albinus
Subject: Re: FR: syntactic sugar for 'sudo' multi-hops with .ssh/config
Date: Tue, 16 Sep 2014 08:25:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Tom Roche <address@hidden> writes:

Hi Tom,

> I have ~/.ssh/config with a stanza (for a cloud machine for which I
> can't easily set DNS) like
>> Host cloud c
>>      HostName
>>      Port 22
>>      User me

I thought the patterns after "Host" must be separated by a comma, but
maybe I'm wrong.

> With TRAMP, I can open normal files with syntax like
> /c:my_dir/my_file
> (which still amazes me sometimes :-) And thanks to ad-hoc multi-hop, I
> can also `sudo` files like
> /ssh:c|sudo:
> ... which is *almost* magic enough :-) What I'd prefer is, not to
> hafta remember the hostname (or IP#, in this case)--i.e., I'd prefer
> to be able to do
> /ssh:c|sudo:c:/path/to/file # fails in my emacs version='GNU Emacs
> 24.3.1' on debian

That's exactly what I'm doing every single day. I'm running a more
recent Tramp version, but this shouldn't matter.

> Hence my Feature Request: could TRAMP be made smart enough to know, if it saw 
> /ssh:<.ssh/config token/>|sudo:<same .ssh/config token/>:/path/to/file
> to use *both* the User and HostName (from ~/.ssh/config) in the first
> instance, but *only* the HostName in the second instance?

It shall do it out of the box. If it doesn't, show the error messages.

And since I'll ask it next round anyway :-) please set tramp-verbose to
6, before running your test.

> and thanks again for this brilliant package, Tom Roche <address@hidden>

Best regards, Michael.

reply via email to

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