From: suvayu ali <fatkasuvayu+linux@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: edit a file over two linked ssh
Date: Mon, 21 Nov 2011 16:46:54 +0100 [thread overview]
Message-ID: <CAMXnza3V4mmSrw-OT-myuazK17=cUJiTMJUUJcpX==JnnacoYA@mail.gmail.com> (raw)
In-Reply-To: <8762ifujtt.fsf@gmx.de>
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.
next prev parent reply other threads:[~2011-11-21 15:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-20 8:10 edit a file over two linked ssh mehran khajavi
2011-11-20 9:20 ` Peter Dyballa
2011-11-20 11:14 ` Michael Albinus
2011-11-20 13:17 ` Philipp Haselwarter
2011-11-20 13:30 ` Michael Albinus
2011-11-21 15:46 ` suvayu ali [this message]
2011-11-21 19:32 ` Michael Albinus
2011-11-21 23:03 ` suvayu ali
2011-11-22 5:33 ` Michael Albinus
2011-11-22 12:53 ` suvayu ali
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMXnza3V4mmSrw-OT-myuazK17=cUJiTMJUUJcpX==JnnacoYA@mail.gmail.com' \
--to=fatkasuvayu+linux@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).