diff --git a/twisted/conch/ssh/userauth.py b/twisted/conch/ssh/userauth.py
--- a/twisted/conch/ssh/userauth.py
+++ b/twisted/conch/ssh/userauth.py
@@ -830,17 +830,19 @@ MSG_USERAUTH_REQUEST          = 50
 MSG_USERAUTH_FAILURE          = 51
 MSG_USERAUTH_SUCCESS          = 52
 MSG_USERAUTH_BANNER           = 53
-MSG_USERAUTH_PASSWD_CHANGEREQ = 60
-MSG_USERAUTH_INFO_REQUEST     = 60
 MSG_USERAUTH_INFO_RESPONSE    = 61
 MSG_USERAUTH_PK_OK            = 60
 
 messages = {}
 for k, v in locals().items():
     if k[:4]=='MSG_':
-        messages[v] = k # doesn't handle doubles
+        messages[v] = k
 
 SSHUserAuthServer.protocolMessages = messages
 SSHUserAuthClient.protocolMessages = messages
 del messages
 del v
+
+# Doubles, not included in the protocols' mappings
+MSG_USERAUTH_PASSWD_CHANGEREQ = 60
+MSG_USERAUTH_INFO_REQUEST     = 60
diff --git a/twisted/conch/test/test_userauth.py b/twisted/conch/test/test_userauth.py
--- a/twisted/conch/test/test_userauth.py
+++ b/twisted/conch/test/test_userauth.py
@@ -1060,3 +1060,16 @@ class LoopbackTestCase(unittest.TestCase
         def check(ignored):
             self.assertEqual(server.transport.service.name, 'TestService')
         return d.addCallback(check)
+
+
+
+class ModuleInitializationTestCase(unittest.TestCase):
+
+
+    def test_messages(self):
+        # Several message types have value 60, check that MSG_USERAUTH_PK_OK
+        # is always the one which is mapped.
+        self.assertEqual(userauth.SSHUserAuthServer.protocolMessages[60],
+                         'MSG_USERAUTH_PK_OK')
+        self.assertEqual(userauth.SSHUserAuthClient.protocolMessages[60],
+                         'MSG_USERAUTH_PK_OK')
diff --git a/twisted/conch/topfiles/5776.bugfix b/twisted/conch/topfiles/5776.bugfix
new file mode 100644
--- /dev/null
+++ b/twisted/conch/topfiles/5776.bugfix
@@ -0,0 +1,1 @@
+twisted.conch.ssh.userauth now works correctly with hash randomization enabled.
