From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: suvayu ali Newsgroups: gmane.emacs.help Subject: Re: edit a file over two linked ssh Date: Mon, 21 Nov 2011 16:46:54 +0100 Message-ID: References: <8762ifujtt.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1321890454 27887 80.91.229.12 (21 Nov 2011 15:47:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2011 15:47:34 +0000 (UTC) Cc: Emacs mailing list To: Michael Albinus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 21 16:47:30 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RSW5h-00051p-M7 for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Nov 2011 16:47:29 +0100 Original-Received: from localhost ([::1]:38071 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSW5g-0004M3-IA for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Nov 2011 10:47:28 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSW5Y-0004Ly-Q6 for help-gnu-emacs@gnu.org; Mon, 21 Nov 2011 10:47:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSW5U-0006hv-Io for help-gnu-emacs@gnu.org; Mon, 21 Nov 2011 10:47:20 -0500 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:50331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSW5U-0006hn-Ae for help-gnu-emacs@gnu.org; Mon, 21 Nov 2011 10:47:16 -0500 Original-Received: by bke17 with SMTP id 17so7830511bke.0 for ; Mon, 21 Nov 2011 07:47:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=B8jauqy69Au1fP59A6/lUBzcsTXyS5KAxnkdiCEV9aA=; b=LfBWGmed8lUBOVQWl1Pu4zdc0Z/ZaQPjYd13POVyExnV5e+dd1bkZPT7ocA3g/AT1G hLuGTjizVC43Be5L9bmO24HPjvpc3R+8qv2+M9IurrCRNJsii25zkmdubLex2UcYzxLM QhBu2MGI2FwQC9CI+YCt9O8AMNDK37zDunKOI= Original-Received: by 10.204.12.68 with SMTP id w4mr14755903bkw.31.1321890435099; Mon, 21 Nov 2011 07:47:15 -0800 (PST) Original-Received: by 10.205.35.1 with HTTP; Mon, 21 Nov 2011 07:46:54 -0800 (PST) In-Reply-To: <8762ifujtt.fsf@gmx.de> X-Google-Sender-Auth: 79qOJ4hPDqW8QookXX4yMND7wJw X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82993 Archived-At: Hi Michael, On Sun, Nov 20, 2011 at 12:14, Michael Albinus wro= te: > mehran khajavi 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 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '("mysecondserver" "root" "/ssh= :root@myfirstserver:")) > > Then you can open the file as "/ssh:root@mysecondserver:/var/www/myfile.t= xt". > 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, ...) --=20 Suvayu Open source is the future. It sets us free.