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.
This commit is contained in:
parent
67f26434cb
commit
b9112a9cbb
|
@ -291,8 +291,8 @@ class Stream(mitogen.parent.Stream):
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue