help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tramp and ssh control path


From: Michael Albinus
Subject: Re: Tramp and ssh control path
Date: Fri, 12 Apr 2013 11:34:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]