Permalink
Browse files

ssh: Fix password authentication with Python 3.x & OpenSSH 7.5+

Since PERMDENIED_PROMPT is a byte string the interpolation was resulting
in: b"user@host: b'permission denied'". Needless to say this didn't
match.
  • Loading branch information...
moreati committed Oct 2, 2018
1 parent 67f2643 commit b9112a9cbb10da3200d07dcc5acc16b2a01b4af9
Showing with 2 additions and 2 deletions.
  1. +2 −2 mitogen/ssh.py
@@ -291,8 +291,8 @@ def _connect_bootstrap(self, extra_fd):
raise HostKeyError(self.hostkey_failed_msg)
elif buf.lower().startswith((
PERMDENIED_PROMPT,
b("%s@%s: %s" % (self.username, self.hostname,
PERMDENIED_PROMPT)),
b("%s@%s: " % (self.username, self.hostname))
+ PERMDENIED_PROMPT,
)):
# issue #271: work around conflict with user shell reporting
# 'permission denied' e.g. during chdir($HOME) by only matching

0 comments on commit b9112a9

Please sign in to comment.