From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: EShell tips on SSH? Date: Tue, 15 Jan 2013 08:38:48 +0100 Message-ID: <87a9saj3p3.fsf@gmx.de> References: <6faf1f5e-de18-4c8f-b5a8-325b67790f6c@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358235546 10410 80.91.229.3 (15 Jan 2013 07:39:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2013 07:39:06 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Wenshan Ren Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 15 08:39:23 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tv17B-0004BI-Ar for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Jan 2013 08:39:21 +0100 Original-Received: from localhost ([::1]:37979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv16u-0002WI-V5 for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Jan 2013 02:39:04 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv16o-0002WD-Bj for help-gnu-emacs@gnu.org; Tue, 15 Jan 2013 02:39:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tv16n-0003Lr-5a for help-gnu-emacs@gnu.org; Tue, 15 Jan 2013 02:38:58 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:61623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv16m-0003Lc-RT for help-gnu-emacs@gnu.org; Tue, 15 Jan 2013 02:38:57 -0500 Original-Received: from mailout-de.gmx.net ([10.1.76.16]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MXTY0-1TPmcS0TCQ-00WSCM for ; Tue, 15 Jan 2013 08:38:54 +0100 Original-Received: (qmail invoked by alias); 15 Jan 2013 07:38:53 -0000 Original-Received: from p57BB96FB.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.150.251] by mail.gmx.net (mp016) with SMTP; 15 Jan 2013 08:38:53 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+nhfBKkAqnBSUAdILBLdCI/PNIwEPbfsiPhp5lOX wCN1rRW7sjz6up In-Reply-To: <6faf1f5e-de18-4c8f-b5a8-325b67790f6c@googlegroups.com> (Wenshan Ren's message of "Mon, 14 Jan 2013 16:13:42 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.17.21 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:88628 Archived-At: Wenshan Ren writes: > Hi, Hi, > I manage a few VMs via SSH. As an Emacs user, I'm considering to get > everything done without leaving Emacs. > > So far I've met two problems: > > 1. ssh -A > ssh -A does agent forwarding, but I can't find the EShell > equivalent by searching the Emacs Info. > > How do you achieve the same effect of ssh -A in Emacs? If you use the remote file name syntax, the underlying operations are directed to Tramp. You could redefine Tramp's method definition in order to add "-A" to the ssh call. See variable `tramp-methods'. The better solution would be to add the following entry to your ~/.ssh/config: Host remotehost ForwardAgent yes > 2. cd / > After `cd /ssh:username@host', `cd /' will change directory to / of > my local machine. > Is there any way to make EShell behave like a ordinary bash sshed > to a remote machine? Eshell is designed that file names used by "cd" work as everywhere else in Emacs. The usual workaround "*cd /" to apply the corresponding external command does not work, because "cd" is not related to an executable file, but a shell built-in. What you ask for does not seem to be possible in eshell yet. Maybe we should add a new eshell command "chroot". Something like chroot /ssh:username@host:/ Feel free to raise a change request towards Emacs/eshell via `report-emacs-bug'. > Thanks and regards, > Wenshan Best regards, Michael.