all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Cc: Emacs help <help-gnu-emacs@gnu.org>
Subject: Re: Tramp and ssh control path
Date: Fri, 12 Apr 2013 11:34:30 +0200	[thread overview]
Message-ID: <87mwt4w0rd.fsf@gmx.de> (raw)
In-Reply-To: <20130411123821.GA31817@kuru.dyndns-at-home.com> (Suvayu Ali's message of "Thu, 11 Apr 2013 14:38:21 +0200")

Suvayu Ali <fatkasuvayu+linux@gmail.com> 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.



  reply	other threads:[~2013-04-12  9:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 12:38 Tramp and ssh control path Suvayu Ali
2013-04-12  9:34 ` Michael Albinus [this message]
2013-04-14 23:58   ` Suvayu Ali
2013-04-15  7:52     ` Michael Albinus
2013-04-15  8:24       ` Suvayu Ali
2013-04-15  8:53         ` Michael Albinus
2013-04-15 12:10       ` Stefan Monnier
2013-04-15 12:30         ` Michael Albinus
2013-04-15 13:39           ` Michael Albinus
2013-04-15 14:48             ` Stefan Monnier
2013-04-16  8:08               ` Michael Albinus
2013-04-15 16:09             ` 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=87mwt4w0rd.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=fatkasuvayu+linux@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.