mySQL workbench can’t connect via ssh tunnel

If you can’t connect with your mysql-workbench to a database via ssh have a look at your logfile:

tail -f -n 100 ~/.mysql/workbench/log/wb.log

and you will see this error:

14:12:58 [ERR][]: Traceback (most recent call last):
File “/usr/share/mysql-workbench/”, line 265, in _connect_ssh
look_for_keys=has_key, allow_agent=has_key)
File “/usr/lib/python2.7/dist-packages/paramiko/”, line 306, in connect
File “/usr/lib/python2.7/dist-packages/paramiko/”, line 465, in start_client
raise e
ValueError: CTR mode needs counter parameter, not IV

change your

sudo nano /usr/lib/python2.7/dist-packages/paramiko/

press CTRL+W for searching for the term

return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode']

and replace this

return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], iv, counter)


return self._cipher_info[name]['class'].new(key, self._cipher_info[name]['mode'], '', counter)

as mentioned in the Github pull requst

All credits are going to user hansaplast for his answer on stackoverflow!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s