From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephane Chauveau Newsgroups: gmane.emacs.bugs Subject: bug#19047: Tramp reuses bad ssh passphrase several times without asking Date: Thu, 13 Nov 2014 19:29:52 +0100 Message-ID: <5464F8A0.5080809@chauveau-central.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1415903611 18601 80.91.229.3 (13 Nov 2014 18:33:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Nov 2014 18:33:31 +0000 (UTC) To: 19047@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 13 19:33:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XozCr-0001dA-T2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Nov 2014 19:33:22 +0100 Original-Received: from localhost ([::1]:33408 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XozCr-00007C-EV for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Nov 2014 13:33:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XozCg-000053-Rp for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:33:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XozCZ-0002t9-1a for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:33:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XozCY-0002t5-V1 for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XozCY-0005oX-PF for bug-gnu-emacs@gnu.org; Thu, 13 Nov 2014 13:33:02 -0500 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141590355422305 (code B ref -1); Thu, 13 Nov 2014 18:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Nov 2014 18:32:34 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 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-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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:95939 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))