[Top][All Lists]

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

Re: ControlPersist breaks scpc method

From: Michael Albinus
Subject: Re: ControlPersist breaks scpc method
Date: Mon, 19 Mar 2012 10:12:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)

Adam Spiers <address@hidden> writes:

Hi Adam,

> If ControlPersist is enabled in the user's ssh config, then use of
> tramp's scpc method will result in a failure to create a new ssh
> control master:
> It's pretty clear what's happening - enabling ControlPersist causes
> the new master connection to be backgrounded, which is the exact
> opposite of what tramp wants.  I assume that a similar problem exists
> for any other method which uses ssh with ControlMaster enabled.
> Here's a patch against CVS for what I believe to be the correct fix.
> However I don't know the tramp source at all, so it will need peer
> review.
> Index: lisp/tramp-sh.el
> ===================================================================
> RCS file: /sources/tramp/tramp/lisp/tramp-sh.el,v
> retrieving revision 2.65
> diff -u -r2.65 tramp-sh.el
> --- lisp/tramp-sh.el  1 Mar 2012 08:46:16 -0000       2.65
> +++ lisp/tramp-sh.el  18 Mar 2012 20:11:20 -0000
> @@ -162,6 +162,7 @@
>      (tramp-login-program        "ssh")
>      (tramp-login-args           (("-l" "%u") ("-p" "%p")
>                                ("-o" "address@hidden:%%p")
> +                              ("-o" "ControlPersist=no")
>                                ("-o" "ControlMaster=yes")
>                                ("-e" "none") ("%h")))
>      (tramp-async-args           (("-q")))

Thanks for the report. However, your patch would break older ssh
versions, which do'nt know of ControlPersist. We cannot apply this patch
in general.

We shall add a hint to the Tramp manual, describing this trap. For a
general solution, it might be useful to add a customer option which
allows to expand ssh parameters as given in tramp-methods by own ones.
Something like
(setq tramp-methods-extension
      '(("scpc" (tramp-login-args (("-o" "ControlPersist=no"))))))

But this might look ugly to Tramp users without Lisp knowledge ...

Best regards, Michael.

reply via email to

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