From unknown Sun Jun 22 00:58:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19047: Tramp reuses bad ssh passphrase several times without asking Resent-From: Stephane Chauveau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Nov 2014 18:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19047 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19047@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.141590355422305 (code B ref -1); Thu, 13 Nov 2014 18:33:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Nov 2014 18:32:34 +0000 Received: from localhost ([127.0.0.1]:59665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XozC5-0005ne-1Y for submit@debbugs.gnu.org; Thu, 13 Nov 2014 13:32:33 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56639) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xoz9v-0005kE-9O for submit@debbugs.gnu.org; Thu, 13 Nov 2014 13:30:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xoz9j-0001ow-PQ for submit@debbugs.gnu.org; Thu, 13 Nov 2014 13:30:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoz9j-0001oq-LD for submit@debbugs.gnu.org; Thu, 13 Nov 2014 13:30:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoz9d-0007e3-Ak for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:30:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xoz9X-0001VS-14 for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:30:01 -0500 Received: from ispconfig2.arios.fr ([176.31.95.22]:43619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoz9W-0001VI-Oo for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:29:54 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by ispconfig2.arios.fr (Postfix) with ESMTP id E25C51488068 for ; Thu, 13 Nov 2014 19:38:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ispconfig2.arios.fr Received: from ispconfig2.arios.fr ([127.0.0.1]) by localhost (ispconfig2.arios.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZtGDVf3WPaCB for ; Thu, 13 Nov 2014 19:38:59 +0100 (CET) Received: from [192.168.1.6] (152.14.93.79.rev.sfr.net [79.93.14.152]) (Authenticated sender: stef1270@chauveau-central.net) by ispconfig2.arios.fr (Postfix) with ESMTPSA id D1FD3148803A for ; Thu, 13 Nov 2014 19:38:58 +0100 (CET) Message-ID: <5464F8A0.5080809@chauveau-central.net> Date: Thu, 13 Nov 2014 19:29:52 +0100 From: Stephane Chauveau User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Mailman-Approved-At: Thu, 13 Nov 2014 13:32:31 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) When connecting via scp with both Password and PublicKey authentication, the default behavior of OpenSSH is to ask for the public key passphrase 3 times and then for the password 3 times (so a total of 6 queries). That behavior can be observed in previous versions of emacs (e.g. 24.3.1). Remark: in the following it is important to understand the difference between the passphrase and the password. In 24.4.1 there seems to be a bug in the way bad passphrases are handled: A bad passphrase is retried several times without asking the user for a new one. So when providing a bad passphrase xxxxxxxxx, the behavior in the minibuffer is now: Passphrase for /scp:hobb: xxxxxxxxx Tramp sending password Password for /scp:hobb: yyyyyyyy Password for /scp:hobb: zzzzzzzz Tramp failed to connect. If this happens repeatedly, try `M-x tramp-cleanup-this-connection' The message window shows that 3 passphrases and 3 password were actually tested: Tramp: Waiting for prompts from remote shell... Tramp: Sending passphrase [3 times] Tramp: Sending password [3 times] My analysis is that there is a bug that prevents bad passphrase to be queried again (a problem with the password cache?). The reason why the password is only asked twice is because the xxxxxxxxx from my example is probably send 3 times as a passphrase and 1 time as a password after which the second password query occurs. This can be verified by providing the password for xxxxxxxxx instead of the passphrase. In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23) of 2014-11-13 on simak Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Linux Mint 17 Qiana Configured using: `configure --prefix=/home/chauveau/Downloads/emacs-24.4-usr --with-gif=no' Important settings: value of $LC_MONETARY: fr_FR.UTF-8 value of $LC_NUMERIC: fr_FR.UTF-8 value of $LC_TIME: fr_FR.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t recentf-mode: t iswitchb-mode: t show-paren-mode: t display-time-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r t Recent messages: `epa-file' already enabled Loading /home/chauveau/.recentf...done Cleaning up the recentf list...done (0 removed) For information about GNU Emacs and the GNU system, type C-h C-a. Package iswitchb is obsolete! Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils edmacro kmacro tramp-cache tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete comint ansi-color ring format-spec advice help-fns recentf tree-widget wid-edit cl-loaddefs cl-lib easymenu iswitchb paren time epa-file epa derived epg epg-config time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 107916 8301) (symbols 48 21970 0) (miscs 40 49 118) (strings 32 23583 4937) (string-bytes 1 721430) (vectors 16 14674) (vector-slots 8 444686 4578) (floats 8 100 142) (intervals 56 214 0) (buffers 960 11) (heap 1024 41699 914)) In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23) of 2014-11-13 on simak Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Linux Mint 17 Qiana Configured using: `configure --prefix=/home/chauveau/Downloads/emacs-24.4-usr --with-gif=no' Important settings: value of $LC_MONETARY: fr_FR.UTF-8 value of $LC_NUMERIC: fr_FR.UTF-8 value of $LC_TIME: fr_FR.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t recentf-mode: t iswitchb-mode: t show-paren-mode: t display-time-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r t Recent messages: `epa-file' already enabled Loading /home/chauveau/.recentf...done Cleaning up the recentf list...done (0 removed) For information about GNU Emacs and the GNU system, type C-h C-a. Package iswitchb is obsolete! Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils edmacro kmacro tramp-cache tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete comint ansi-color ring format-spec advice help-fns recentf tree-widget wid-edit cl-loaddefs cl-lib easymenu iswitchb paren time epa-file epa derived epg epg-config time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 107916 8301) (symbols 48 21970 0) (miscs 40 49 118) (strings 32 23583 4937) (string-bytes 1 721430) (vectors 16 14674) (vector-slots 8 444686 4578) (floats 8 100 142) (intervals 56 214 0) (buffers 960 11) (heap 1024 41699 914)) From unknown Sun Jun 22 00:58:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19047: Acknowledgement (Tramp reuses bad ssh passphrase several times without asking) Resent-From: Stephane Chauveau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Nov 2014 19:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19047 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19047@debbugs.gnu.org Received: via spool by 19047-submit@debbugs.gnu.org id=B19047.14159074481789 (code B ref 19047); Thu, 13 Nov 2014 19:38:02 +0000 Received: (at 19047) by debbugs.gnu.org; 13 Nov 2014 19:37:28 +0000 Received: from localhost ([127.0.0.1]:59745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xp0Cu-0000Sm-BU for submit@debbugs.gnu.org; Thu, 13 Nov 2014 14:37:28 -0500 Received: from ispconfig2.arios.fr ([176.31.95.22]:48563) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xp0Cr-0000SR-FT for 19047@debbugs.gnu.org; Thu, 13 Nov 2014 14:37:26 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by ispconfig2.arios.fr (Postfix) with ESMTP id 02D841488066 for <19047@debbugs.gnu.org>; Thu, 13 Nov 2014 20:46:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ispconfig2.arios.fr Received: from ispconfig2.arios.fr ([127.0.0.1]) by localhost (ispconfig2.arios.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25N5J074d97g for <19047@debbugs.gnu.org>; Thu, 13 Nov 2014 20:46:30 +0100 (CET) Received: from [192.168.1.6] (152.14.93.79.rev.sfr.net [79.93.14.152]) (Authenticated sender: stef1270@chauveau-central.net) by ispconfig2.arios.fr (Postfix) with ESMTPSA id 669DC148803A for <19047@debbugs.gnu.org>; Thu, 13 Nov 2014 20:46:30 +0100 (CET) Message-ID: <54650874.6030007@chauveau-central.net> Date: Thu, 13 Nov 2014 20:37:24 +0100 From: Stephane Chauveau User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 References: <5464F8A0.5080809@chauveau-central.net> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) I am not an elisp nor a tramp expert but after looking at tramp.el I believe that the problem is that OpenSSH is silent when a bad passphrase is given. A typical OpenSSH session with bad passphrase and passwords is Enter passphrase for key '/home/chauveau/.ssh/id_rsa': Enter passphrase for key '/home/chauveau/.ssh/id_rsa': Enter passphrase for key '/home/chauveau/.ssh/id_rsa': chauveau@hobb's password: Permission denied, please try again. chauveau@hobb's password: Permission denied, please try again. chauveau@hobb's password: Permission denied (publickey,password). In function tramp-action-password, some codes were added to clear the 'wrong' password: ;; Let's check whether a wrong password has been sent already. ;; Sometimes, the process returns a new password request ;; immediately after rejecting the previous (wrong) one. (goto-char (point-min)) (when (search-forward-regexp tramp-wrong-passwd-regexp nil t) (tramp-clear-passwd vec)) That code probably does not work because there is nothing to match with tramp-password-prompt-regexp after the Enter passphrase prompt. From unknown Sun Jun 22 00:58:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19047: Acknowledgement (Tramp reuses bad ssh passphrase several times without asking) Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Nov 2014 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19047 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephane Chauveau Cc: 19047@debbugs.gnu.org Received: via spool by 19047-submit@debbugs.gnu.org id=B19047.141667566531659 (code B ref 19047); Sat, 22 Nov 2014 17:02:02 +0000 Received: (at 19047) by debbugs.gnu.org; 22 Nov 2014 17:01:05 +0000 Received: from localhost ([127.0.0.1]:41929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XsE3V-0008EZ-6i for submit@debbugs.gnu.org; Sat, 22 Nov 2014 12:01:05 -0500 Received: from mout.gmx.net ([212.227.17.21]:55632) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XsE3S-0008EQ-MM for 19047@debbugs.gnu.org; Sat, 22 Nov 2014 12:01:03 -0500 Received: from detlef.gmx.de ([87.146.34.33]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LyzW8-1XwTH93bxg-014Aqq; Sat, 22 Nov 2014 18:00:59 +0100 From: Michael Albinus References: <5464F8A0.5080809@chauveau-central.net> <54650874.6030007@chauveau-central.net> Date: Sat, 22 Nov 2014 18:00:57 +0100 In-Reply-To: <54650874.6030007@chauveau-central.net> (Stephane Chauveau's message of "Thu, 13 Nov 2014 20:37:24 +0100") Message-ID: <87d28f9nli.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:cR0+tPy5J/JzRzCVZIaqg06qQG2SMDSflR4dFPiAhWKdXhQz4zr IGB2VtbaaHobpZZ3GrAXXWoVwEvWMM2EQ0sIj2Aq/DW2MC8aQcEBODc19nhbhijY5E4NnrR YEAeWaaErn31zTkcW3Szft9wBtPQK2z4ximRj9wuOYOnP+t75d7aA5XTom4IWtXFeUrUsDD jhFBq8dMHyzc7GLdRp/hw== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Stephane Chauveau writes: > In function tramp-action-password, some codes were added to clear the > 'wrong' password: > > ;; Let's check whether a wrong password has been sent already. > ;; Sometimes, the process returns a new password request > ;; immediately after rejecting the previous (wrong) one. > (goto-char (point-min)) > (when (search-forward-regexp tramp-wrong-passwd-regexp nil t) > (tramp-clear-passwd vec)) > > That code probably does not work because there is nothing to match with > tramp-password-prompt-regexp after the Enter passphrase prompt. Finally, I have pushed a patch towards the emacs-24 branch, which shall fix it. For testing: --8<---------------cut here---------------start------------->8--- *** /home/albinus/src/emacs-24/lisp/net/tramp.el 2014-11-22 18:54:33.000000000 +0200 --- /home/albinus/src/emacs-24/lisp/net/tramp.el.~6ec5ee8872bfb8b0ebc53d98fcb8f284e08c147f~ 2014-11-22 18:54:33.000000000 +0200 *************** *** 3445,3453 **** ;; Let's check whether a wrong password has been sent already. ;; Sometimes, the process returns a new password request ;; immediately after rejecting the previous (wrong) one. ! (goto-char (point-min)) ! (when (search-forward-regexp tramp-wrong-passwd-regexp nil t) (tramp-clear-passwd vec)) (tramp-check-for-regexp proc tramp-password-prompt-regexp) (tramp-message vec 3 "Sending %s" (match-string 1)) ;; We don't call `tramp-send-string' in order to hide the --- 3445,3453 ---- ;; Let's check whether a wrong password has been sent already. ;; Sometimes, the process returns a new password request ;; immediately after rejecting the previous (wrong) one. ! (unless (tramp-get-connection-property vec "first-password-request" nil) (tramp-clear-passwd vec)) + (goto-char (point-min)) (tramp-check-for-regexp proc tramp-password-prompt-regexp) (tramp-message vec 3 "Sending %s" (match-string 1)) ;; We don't call `tramp-send-string' in order to hide the --8<---------------cut here---------------end--------------->8--- Thanks for your report, and best regards, Michael. From unknown Sun Jun 22 00:58:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19047: Acknowledgement (Tramp reuses bad ssh passphrase several times without asking) Resent-From: Stephane Chauveau Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Nov 2014 17:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19047 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19047@debbugs.gnu.org Received: via spool by 19047-submit@debbugs.gnu.org id=B19047.1416676832906 (code B ref 19047); Sat, 22 Nov 2014 17:21:01 +0000 Received: (at 19047) by debbugs.gnu.org; 22 Nov 2014 17:20:32 +0000 Received: from localhost ([127.0.0.1]:41933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XsEMK-0000EY-0L for submit@debbugs.gnu.org; Sat, 22 Nov 2014 12:20:32 -0500 Received: from ispconfig2.arios.fr ([176.31.95.22]:56027) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XsEMH-0000EK-CS for 19047@debbugs.gnu.org; Sat, 22 Nov 2014 12:20:30 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by ispconfig2.arios.fr (Postfix) with ESMTP id 125CB148806F for <19047@debbugs.gnu.org>; Sat, 22 Nov 2014 18:30:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ispconfig2.arios.fr Received: from ispconfig2.arios.fr ([127.0.0.1]) by localhost (ispconfig2.arios.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4IkWOTnZTfe1 for <19047@debbugs.gnu.org>; Sat, 22 Nov 2014 18:30:12 +0100 (CET) Received: from [192.168.1.6] (152.14.93.79.rev.sfr.net [79.93.14.152]) (Authenticated sender: stef1270@chauveau-central.net) by ispconfig2.arios.fr (Postfix) with ESMTPSA id 9A321148806C for <19047@debbugs.gnu.org>; Sat, 22 Nov 2014 18:30:12 +0100 (CET) Message-ID: <5470C5DB.9010004@chauveau-central.net> Date: Sat, 22 Nov 2014 18:20:27 +0100 From: Stephane Chauveau User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 References: <5464F8A0.5080809@chauveau-central.net> <54650874.6030007@chauveau-central.net> <87d28f9nli.fsf@gmx.de> In-Reply-To: <87d28f9nli.fsf@gmx.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) I confirm that the patch seems to solve the problem. From unknown Sun Jun 22 00:58:36 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Stephane Chauveau Subject: bug#19047: closed (Re: bug#19047: Acknowledgement (Tramp reuses bad ssh passphrase several times without asking)) Message-ID: References: <877fyn9i9c.fsf@gmx.de> <5464F8A0.5080809@chauveau-central.net> X-Gnu-PR-Message: they-closed 19047 X-Gnu-PR-Package: emacs Reply-To: 19047@debbugs.gnu.org Date: Sat, 22 Nov 2014 18:57:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1416682622-9655-1" This is a multi-part message in MIME format... ------------=_1416682622-9655-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #19047: Tramp reuses bad ssh passphrase several times without asking which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 19047@debbugs.gnu.org. --=20 19047: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D19047 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1416682622-9655-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 19047-done) by debbugs.gnu.org; 22 Nov 2014 18:56:21 +0000 Received: from localhost ([127.0.0.1]:41952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XsFr2-0002Uw-SY for submit@debbugs.gnu.org; Sat, 22 Nov 2014 13:56:21 -0500 Received: from mout.gmx.net ([212.227.17.20]:53936) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XsFr0-0002Uk-9t for 19047-done@debbugs.gnu.org; Sat, 22 Nov 2014 13:56:19 -0500 Received: from detlef.gmx.de ([87.146.34.33]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MTfZc-1XRp1E2fJo-00QS8c; Sat, 22 Nov 2014 19:56:16 +0100 From: Michael Albinus To: Stephane Chauveau Subject: Re: bug#19047: Acknowledgement (Tramp reuses bad ssh passphrase several times without asking) References: <5464F8A0.5080809@chauveau-central.net> <54650874.6030007@chauveau-central.net> <87d28f9nli.fsf@gmx.de> <5470C5DB.9010004@chauveau-central.net> Date: Sat, 22 Nov 2014 19:56:15 +0100 In-Reply-To: <5470C5DB.9010004@chauveau-central.net> (Stephane Chauveau's message of "Sat, 22 Nov 2014 18:20:27 +0100") Message-ID: <877fyn9i9c.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:7hTC4A3TbWIA/MTT1JbgPvPyrQim42nJx8L7pELBI0/swnbiuIs PmWcvo0qMluoQvkQwYfBUx8KEua7rv3KIiFmKNaCpRDYmZc7//piA2GY+i/dpMkSMvn2qhN etV6HtzUiJrs68lfvm0t86gtkuxVfXOZaD8MWm8LdqYG9LfhZokqoHNEoXHGmGjlRLVUuUP 1K8lUxGLzdAWfGLV4dITw== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19047-done Cc: 19047-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Stephane Chauveau writes: > I confirm that the patch seems to solve the problem. Thanks, closing the bug. Best regards, Michael. ------------=_1416682622-9655-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Nov 2014 18:32:34 +0000 Received: from localhost ([127.0.0.1]:59665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XozC5-0005ne-1Y for submit@debbugs.gnu.org; Thu, 13 Nov 2014 13:32:33 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56639) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xoz9v-0005kE-9O for submit@debbugs.gnu.org; Thu, 13 Nov 2014 13:30:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xoz9j-0001ow-PQ for submit@debbugs.gnu.org; Thu, 13 Nov 2014 13:30:18 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoz9j-0001oq-LD for submit@debbugs.gnu.org; Thu, 13 Nov 2014 13:30:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoz9d-0007e3-Ak for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:30:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xoz9X-0001VS-14 for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:30:01 -0500 Received: from ispconfig2.arios.fr ([176.31.95.22]:43619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xoz9W-0001VI-Oo for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:29:54 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by ispconfig2.arios.fr (Postfix) with ESMTP id E25C51488068 for ; Thu, 13 Nov 2014 19:38:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ispconfig2.arios.fr Received: from ispconfig2.arios.fr ([127.0.0.1]) by localhost (ispconfig2.arios.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZtGDVf3WPaCB for ; Thu, 13 Nov 2014 19:38:59 +0100 (CET) Received: from [192.168.1.6] (152.14.93.79.rev.sfr.net [79.93.14.152]) (Authenticated sender: stef1270@chauveau-central.net) by ispconfig2.arios.fr (Postfix) with ESMTPSA id D1FD3148803A for ; Thu, 13 Nov 2014 19:38:58 +0100 (CET) Message-ID: <5464F8A0.5080809@chauveau-central.net> Date: Thu, 13 Nov 2014 19:29:52 +0100 From: Stephane Chauveau User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: Tramp reuses bad ssh passphrase several times without asking Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 13 Nov 2014 13:32:31 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) When connecting via scp with both Password and PublicKey authentication, the default behavior of OpenSSH is to ask for the public key passphrase 3 times and then for the password 3 times (so a total of 6 queries). That behavior can be observed in previous versions of emacs (e.g. 24.3.1). Remark: in the following it is important to understand the difference between the passphrase and the password. In 24.4.1 there seems to be a bug in the way bad passphrases are handled: A bad passphrase is retried several times without asking the user for a new one. So when providing a bad passphrase xxxxxxxxx, the behavior in the minibuffer is now: Passphrase for /scp:hobb: xxxxxxxxx Tramp sending password Password for /scp:hobb: yyyyyyyy Password for /scp:hobb: zzzzzzzz Tramp failed to connect. If this happens repeatedly, try `M-x tramp-cleanup-this-connection' The message window shows that 3 passphrases and 3 password were actually tested: Tramp: Waiting for prompts from remote shell... Tramp: Sending passphrase [3 times] Tramp: Sending password [3 times] My analysis is that there is a bug that prevents bad passphrase to be queried again (a problem with the password cache?). The reason why the password is only asked twice is because the xxxxxxxxx from my example is probably send 3 times as a passphrase and 1 time as a password after which the second password query occurs. This can be verified by providing the password for xxxxxxxxx instead of the passphrase. In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23) of 2014-11-13 on simak Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Linux Mint 17 Qiana Configured using: `configure --prefix=/home/chauveau/Downloads/emacs-24.4-usr --with-gif=no' Important settings: value of $LC_MONETARY: fr_FR.UTF-8 value of $LC_NUMERIC: fr_FR.UTF-8 value of $LC_TIME: fr_FR.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t recentf-mode: t iswitchb-mode: t show-paren-mode: t display-time-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r t Recent messages: `epa-file' already enabled Loading /home/chauveau/.recentf...done Cleaning up the recentf list...done (0 removed) For information about GNU Emacs and the GNU system, type C-h C-a. Package iswitchb is obsolete! Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils edmacro kmacro tramp-cache tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete comint ansi-color ring format-spec advice help-fns recentf tree-widget wid-edit cl-loaddefs cl-lib easymenu iswitchb paren time epa-file epa derived epg epg-config time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 107916 8301) (symbols 48 21970 0) (miscs 40 49 118) (strings 32 23583 4937) (string-bytes 1 721430) (vectors 16 14674) (vector-slots 8 444686 4578) (floats 8 100 142) (intervals 56 214 0) (buffers 960 11) (heap 1024 41699 914)) In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23) of 2014-11-13 on simak Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Linux Mint 17 Qiana Configured using: `configure --prefix=/home/chauveau/Downloads/emacs-24.4-usr --with-gif=no' Important settings: value of $LC_MONETARY: fr_FR.UTF-8 value of $LC_NUMERIC: fr_FR.UTF-8 value of $LC_TIME: fr_FR.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t recentf-mode: t iswitchb-mode: t show-paren-mode: t display-time-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r t Recent messages: `epa-file' already enabled Loading /home/chauveau/.recentf...done Cleaning up the recentf list...done (0 removed) For information about GNU Emacs and the GNU system, type C-h C-a. Package iswitchb is obsolete! Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils edmacro kmacro tramp-cache tramp-sh tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver shell pcomplete comint ansi-color ring format-spec advice help-fns recentf tree-widget wid-edit cl-loaddefs cl-lib easymenu iswitchb paren time epa-file epa derived epg epg-config time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 107916 8301) (symbols 48 21970 0) (miscs 40 49 118) (strings 32 23583 4937) (string-bytes 1 721430) (vectors 16 14674) (vector-slots 8 444686 4578) (floats 8 100 142) (intervals 56 214 0) (buffers 960 11) (heap 1024 41699 914)) ------------=_1416682622-9655-1--