all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: mehran khajavi <sinoohe.mkh@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: edit a file over two linked ssh
Date: Sun, 20 Nov 2011 12:14:38 +0100	[thread overview]
Message-ID: <8762ifujtt.fsf@gmx.de> (raw)
In-Reply-To: <CAF=P4s1Yn=r7Q_Yx+8WsXR9=uTnzVpPfEt3pVb70vHU8r2eKgA@mail.gmail.com> (mehran khajavi's message of "Sun, 20 Nov 2011 11:40:20 +0330")

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.

If you take the recent Tramp sources from its CVS repository, you could
use ad-hoc multi-hops:

"/ssh:root@myfirstserver|ssh:root@mysecondserver:/var/www/myfile.txt"

Best regards, Michael.



  parent reply	other threads:[~2011-11-20 11:14 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 [this message]
2011-11-20 13:17   ` Philipp Haselwarter
2011-11-20 13:30     ` Michael Albinus
2011-11-21 15:46   ` suvayu ali
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8762ifujtt.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=sinoohe.mkh@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.