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: Mon, 15 Apr 2013 15:39:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Michael Albinus <michael.albinus@gmx.de> writes:

>> BTW, such problems shouldn't exist any more now that the master
>> is handled correctly (it's not one of the sessions any more, so all
>> sessions are "equal").
>
> In this case, I could make ControlPath configurable, with a red blinking
> warning about possible side effects ...

The Tramp FAQ has now the following wording:

--8<---------------cut here---------------start------------->8---
   * TRAMP does not use my 'ssh' 'ControlPath'

     Your 'ControlPath' setting will be overwritten by 'ssh' sessions
     initiated by TRAMP.  This is because a master session, initiated
     outside Emacs, could be closed, which would stall all other 'ssh'
     sessions for that host inside Emacs.

     Consequently, if you connect to a remote host via TRAMP, you might
     be prompted for a password again, even if you have established
     already an 'ssh' connection to that host.  Further TRAMP
     connections to that host, for example in order to run a process on
     that host, will reuse that initial 'ssh' connection.

     If you know that your 'ControlPath' settings won't disturb TRAMP,
     you could customize the variable 'tramp-ssh-controlmaster-options'
     like this:

          (setq tramp-ssh-controlmaster-options
                (concat
                  "-o ControlPath=/tmp/ssh-ControlPath-%%r@%%h:%%p "
                  "-o ControlMaster=auto -o ControlPersist=no"))

     Note, that "%r", "%h" and "%p" must be encoded as "%%r", "%%h" and
     "%%p", respectively.
--8<---------------cut here---------------end--------------->8---

This shall work starting Tramp 2.2.7. Emacs 24.3 has built-in Tramp
2.2.6, so it doesn't work there yet.

Best regards, Michael.



reply via email to

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