Adam Spiers <[email protected]> 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" "ControlPath=%t.%%r@%%h:%%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.

_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to