问题出现的环境:
系统及版本:Ubuntu 16.04LTS
MysqL Workbench版本:V6.3.8及以上版本
错误信息: Could not connect the SSH Tunnel
Authentication error,unhandled exception caught in in
tunnel manager,please refer to logs for details
问题出现的场景:
在MysqL Workbench下通过SSH隧道及SSH私钥文件认证来连接远程数据库,出错。
问题出现的可能原因:
当时对系统及MysqL Workbench同时作了升级操作。
解决问题:
该问题困扰了我大半天,最终在下午解决掉了。解决过程略为复杂。
通过查看Workbench的运行日志,找到异常信息如下:
14:20:19 [ERR][sshtunnel.py:notify_exception_error:234]: Traceback (most recent call last):
File "/usr/share/MysqL-workbench/sshtunnel.py",line 302,in _connect_ssh
look_for_keys=True)
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
ValueError: CTR mode needs counter parameter,not IV
最终定位到与python第三方包python-paramiko有关。paramiko是用python语言写的一个模块,遵循SSH2协议,支持以加密和认证的方式,进行远程服务器的连接。
之前未接触过
paramiko包,所以我选择Surfing on the internet,百度、bing、google,最后注意到一个帖子:https://bugs.MysqL.com/bug.PHP?id=74658
楼主碰到的问题与我几乎是一样的,只不过他的问题发生2014年,环境也比我的老。
@H_502_84@
MysqL Workbench 6.3.7 will come with Paramiko 1.16.0 that has got support for more Ciphers.
In any case you can always try to use the latest Paramiko version which is described here:
http://mysqlworkbench.org/2015/03/paramiko-update-tutorial/
根据http://mysqlworkbench.org/2015/03/paramiko-update-tutorial/中的提示,发现原来官方是有解决方案的。只不过没有那么直接。
@H_502_84@
1.去网页
https://github.com/paramiko/paramiko/releases下载最新的
paramiko包最新的2.1.1版本并解压tar -xvf
_84@
2.用sudo apt-get --purge remove python-paramiko彻底清除旧版本的paramiko