Merge pull request #4060 from matrix-org/hawkowl/ssh-key-py3

Make manhole work on Python 3 again
This commit is contained in:
Richard van der Hoff 2018-10-19 10:23:44 +01:00 committed by GitHub
commit 6a4d01ee94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/4060.bugfix Normal file
View File

@ -0,0 +1 @@
Manhole now works again on Python 3, instead of failing with a "couldn't match all kex parts" when connecting.

View File

@ -82,7 +82,7 @@ def manhole(username, password, globals):
) )
factory = manhole_ssh.ConchFactory(portal.Portal(rlm, [checker])) factory = manhole_ssh.ConchFactory(portal.Portal(rlm, [checker]))
factory.publicKeys['ssh-rsa'] = Key.fromString(PUBLIC_KEY) factory.publicKeys[b'ssh-rsa'] = Key.fromString(PUBLIC_KEY)
factory.privateKeys['ssh-rsa'] = Key.fromString(PRIVATE_KEY) factory.privateKeys[b'ssh-rsa'] = Key.fromString(PRIVATE_KEY)
return factory return factory