Browse Source

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

Make manhole work on Python 3 again
Richard van der Hoff 5 years ago
parent
commit
6a4d01ee94
2 changed files with 3 additions and 2 deletions
  1. 1 0
      changelog.d/4060.bugfix
  2. 2 2
      synapse/util/manhole.py

+ 1 - 0
changelog.d/4060.bugfix

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

+ 2 - 2
synapse/util/manhole.py

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