[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19047: Acknowledgement (Tramp reuses bad ssh passphrase several time
From: |
Stephane Chauveau |
Subject: |
bug#19047: Acknowledgement (Tramp reuses bad ssh passphrase several times without asking) |
Date: |
Thu, 13 Nov 2014 20:37:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.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.