Commit 4f855d6f authored by Michael Albinus's avatar Michael Albinus

Use as test host in Tramp

* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Use as test host.
parent 5abadebc
......@@ -4614,19 +4614,15 @@ Gateway hops are already opened."
(setq tramp-ssh-controlmaster-options "-o ControlMaster=auto")))
(unless (zerop (length tramp-ssh-controlmaster-options))
;; When we use a non-existing host name, we could run
;; into DNS timeouts. So we use "localhost" with an
;; improper port, expecting nobody runs sshd on the
;; telnet port.
;; We use a non-existing IP address, in order to avoid
;; useless connections, and DNS timeouts.
vec "ssh" nil t nil
"-p" "23" "-o" "ControlPath=%C" "localhost")
vec "ssh" nil t nil "-o" "ControlPath=%C" "")
(goto-char (point-min))
(setq tramp-ssh-controlmaster-options
(if (search-forward-regexp "unknown.+key" nil t)
(concat tramp-ssh-controlmaster-options
" -o ControlPath='tramp.%%r@%%h:%%p'")
(concat tramp-ssh-controlmaster-options
(concat tramp-ssh-controlmaster-options
(if (search-forward-regexp "unknown.+key" nil t)
" -o ControlPath='tramp.%%r@%%h:%%p'"
" -o ControlPath='tramp.%%C'"))))
(tramp-call-process vec "ssh" nil t nil "-o" "ControlPersist")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment