[Top][All Lists]

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

Re: edit a file over two linked ssh

From: Michael Albinus
Subject: Re: edit a file over two linked ssh
Date: Mon, 21 Nov 2011 20:32:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

suvayu ali <address@hidden> writes:

> Hi Michael,


> I have a similar but a more complicated situation. I have to connect to
> a remote machine hidden behind two gateway machines. Is this possible
> using multi-hop?


> To illustrate with examples if the publicly accessible machine is
> publichost, the internal gateway is intgw and the machine I want to
> connect to is remotehost behind intgw, how do I achieve this with tramp?
> I tried to set tramp-default-proxies-alist to something like this:
> (("remotehost.\+" nil "/ssh:publichost:ssh:intgw:"))
> But this doesn't seem to do anything. Any ideas?
> PS: I use "remotehost.\+" because there are a number of remote machines
>     behind the internal gateway machine with a common leading part of the
>     name (e.g. remotehost1, remotehost2, ...)

You haven't said which user to apply on publichost and intgw. I assume
publicuser and intuser. Then you could do

(add-to-list 'tramp-default-proxies-alist
             '("remotehost.\+" nil "/ssh:address@hidden:"))
(add-to-list 'tramp-default-proxies-alist
             '("intgw" nil "/ssh:address@hidden:"))

Note, that the order of both forms matters. Now you can open "C-x C-f

If you want to apply the ad-hoc multi-hops from recent Tramp in the CVS
repository, you would apply "C-x C-f

Best regards, Michael.

reply via email to

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