Tag Archives: #Question

Workbench Could not connect the SSH Tunnel Authentication error

1. Problem phenomenon

The workbench that is normally used on weekdays finds that it cannot connect to the corresponding database after restarting the computer, and the workbench log displays

SSH tunnel]: Authentication error opening SSH tunnel: Authentication error, unhandled exception caught in tunnel manager, please refer to logs for details

Check the complete log and find the following:

$ tail -f ~/.mysql/workbench/log/wb.log 
  File "/usr/share/mysql-workbench/sshtunnel.py", line 303, in _connect_ssh
    look_for_keys=has_key, allow_agent=has_key, timeout=SSH_CONNECTION_TIMEOUT)
  File "/usr/lib/python2.7/dist-packages/paramiko/client.py", line 325, in connect
    t.start_client()
  File "/usr/lib/python2.7/dist-packages/paramiko/transport.py", line 492, in start_client
    raise e
NotImplementedError: Use module Crypto.Signature.pkcs1_15 instead

14:17:14 [INF][     SSH tunnel]: TunnelManager.wait_connection authentication error: Authentication error, unhandled exception caught in tunnel manager, please refer to logs for details
14:17:14 [ERR][     SSH tunnel]: Authentication error opening SSH tunnel: Authentication error, unhandled exception caught in tunnel manager, please refer to logs for details
14:18:24 [INF][      WBContext]: Connection to XinJangCityWolMart cancelled by user: Tunnel connection cancelled

The point is

NotImplementedError: Use module Crypto.Signature.pkcs1_15 instead

Found after querying with PIP list

$ pip2 list | grep crypto
asn1crypto (1.4.0)
cryptography (2.7)
pycrypto (2.6.1)
pycryptodome (3.11.0)

There is a pycryptodome , which may be installed when installing other tools later

2. Solutions

Uninstall pycryptodome

sudo pip2 uninstall pycryptodome

Then reopen the workbench to connect to the database and return to normal.