unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephane Chauveau <stephane@chauveau-central.net>
To: 19047@debbugs.gnu.org
Subject: bug#19047: Acknowledgement (Tramp reuses bad ssh passphrase several times without asking)
Date: Thu, 13 Nov 2014 20:37:24 +0100	[thread overview]
Message-ID: <54650874.6030007@chauveau-central.net> (raw)
In-Reply-To: <handler.19047.B.141590355422305.ack@debbugs.gnu.org>

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.










  parent reply	other threads:[~2014-11-13 19:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13 18:29 bug#19047: Tramp reuses bad ssh passphrase several times without asking Stephane Chauveau
     [not found] ` <handler.19047.B.141590355422305.ack@debbugs.gnu.org>
2014-11-13 19:37   ` Stephane Chauveau [this message]
2014-11-22 17:00     ` bug#19047: Acknowledgement (Tramp reuses bad ssh passphrase several times without asking) Michael Albinus
2014-11-22 17:20       ` Stephane Chauveau
2014-11-22 18:56         ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54650874.6030007@chauveau-central.net \
    --to=stephane@chauveau-central.net \
    --cc=19047@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).