From 6de77cfa9da18c5e3765c6202b61cef86409e130 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 19 May 2017 13:57:04 +0200 Subject: [PATCH] Fix a problem with OpenSSH 7 in Tramp * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Set also "ConnectTimeout" during test. Otherwise, OpenSSH 7 will hang. --- lisp/net/tramp-sh.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index e61b0ce526a..9b001a90e78 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4592,8 +4592,10 @@ Goes through the list `tramp-inline-compress-commands'." (with-temp-buffer ;; We use a non-existing IP address, in order to ;; avoid useless connections, and DNS timeouts. + ;; Setting ConnectTimeout is needed since OpenSSH 7. (tramp-call-process - vec "ssh" nil t nil "-o" "ControlPath=%C" "0.0.0.1") + vec "ssh" nil t nil + "-o" "ConnectTimeout=1" "-o" "ControlPath=%C" "0.0.0.1") (goto-char (point-min)) (setq tramp-ssh-controlmaster-options (concat tramp-ssh-controlmaster-options -- 2.39.2