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

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

Re: edit a file over two linked ssh


From: suvayu ali
Subject: Re: edit a file over two linked ssh
Date: Mon, 21 Nov 2011 16:46:54 +0100

Hi Michael,

On Sun, Nov 20, 2011 at 12:14, Michael Albinus <michael.albinus@gmx.de> wrote:
> mehran khajavi <sinoohe.mkh@gmail.com> writes:
>
>> Hello,
>
> Hi,
>
>> I have a question:
>> How can I open a file in these steps:
>> 1.open an Emacs on my client(desktop)
>> 2.connect to my server by Emacs with ssh
>> 3.connect to my second server with ssh
>> 4.open the file in the second server
>>
>> the problem is that I can not connect from the first server to second
>> server over ssh by Emacs
>> this command in the find file doesn't work:
>> Find file :
>> /scpc:root@myfirstserver:scpc:root@mysecondserver/var/www/myfile.txt
>
> (add-to-list 'tramp-default-proxies-alist
>             '("mysecondserver" "root" "/ssh:root@myfirstserver:"))
>
> Then you can open the file as "/ssh:root@mysecondserver:/var/www/myfile.txt".
> Note, that the "scpc" method is not suited for multi-hops.
>

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, ...)

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

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