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: Tramp and ssh control path Date: Fri, 12 Apr 2013 11:34:30 +0200 Message-ID: <87mwt4w0rd.fsf@gmx.de> References: <20130411123821.GA31817@kuru.dyndns-at-home.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365759306 10035 80.91.229.3 (12 Apr 2013 09:35:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Apr 2013 09:35:06 +0000 (UTC) Cc: Emacs help To: Suvayu Ali Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 12 11:35:06 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 1UQaNt-0001Ym-T7 for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Apr 2013 11:35:06 +0200 Original-Received: from localhost ([::1]:57872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQaNt-0000Q2-7H for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Apr 2013 05:35:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQaNd-0000Pv-IE for help-gnu-emacs@gnu.org; Fri, 12 Apr 2013 05:34:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQaNb-0007oJ-SS for help-gnu-emacs@gnu.org; Fri, 12 Apr 2013 05:34:49 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:57367) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQaNb-0007na-Bw for help-gnu-emacs@gnu.org; Fri, 12 Apr 2013 05:34:47 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.16]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0LpRRz-1V2eHe2f01-00fF77 for ; Fri, 12 Apr 2013 11:34:43 +0200 Original-Received: (qmail invoked by alias); 12 Apr 2013 09:34:42 -0000 Original-Received: from p57BB9604.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.150.4] by mail.gmx.net (mp016) with SMTP; 12 Apr 2013 11:34:42 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19oW30tOZxojxLysVZaN8mGq+kETrmB9GKMTtsDts LfFUGMt4KUzV9o In-Reply-To: <20130411123821.GA31817@kuru.dyndns-at-home.com> (Suvayu Ali's message of "Thu, 11 Apr 2013 14:38:21 +0200") 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.15.15 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:90115 Archived-At: Suvayu Ali writes: > Hi, Hi, > I noticed for a while now, tramp ignores my control path settings for a > remote host. Yes, Tramp uses its own one. This is necessary, because Tramp cannot trust in an opened Master ssh connection opened outside Emacs. And OTOH, you won't be blocked in your ssh sessions outside due to a closed Tramp connection. > To elaborate, I have the following in my ~/.ssh/config. > > Host * > Protocol 2 > TCPKeepAlive yes > ServerAliveInterval 60 > ControlPath /tmp/ssh-ControlPath-%r@%h:%p For tests, I have added this as well to my ~/.ssh/config. Plus ControlMaster auto You don't need "-M" then for the first connection then. > Now I connect to a remote host from the terminal like this: > > $ ssh -M remotehost > > For any subsequent connections from another terminal, I can do the > following to login without having to type my password. SSH sees a > control path for the host exists, and establishes the subsequent > connection piggy-backing on the first. > > $ ssh remotehost So I did. > Now when from emacs I try to open a remote file, > > C-x C-f /remotehost:path/to/file RET > > I get prompted for a password: "Password for /ssh:remotehost: ". Same here. > Entering it doesn't let me open the remote file either. The attached > log file has the messages from the Messages and tramp debug buffer. No problem here. Tramp opens the file, using its own ControlPath. > Any ideas what is wrong? The only strange entry in your logs is 14:20:31.866172 tramp-process-sentinel (5) # Sentinel called: `*tramp/ssh remotehost*' `alarm clock ' I have no idea where it comes from. The meaning is, that the process running ssh has been stopped. Could you rerun your test with tramp-verbose set to 10, and show the result? > PS: While writing this email, I realised maybe there is a conflict with > the ControlPath for remotehost and the ControlPath used by tramp. They shouldn't conflict. They are just used for different sessions ... Best regards, Michael.