Bug #74223 Fail to connect through SSH tunnel
Submitted: 4 Oct 2014 12:22 Modified: 5 Nov 2014 3:34
Reporter: Dmitry Smirnov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.2.3 OS:Linux (Debian "testing")
Assigned to: CPU Architecture:Any

[4 Oct 2014 12:22] Dmitry Smirnov
Description:
MySQL Workbench fails to connect to server through SSH tunnel.
The error message is

    Tunnel error: Remote connection to 127.0.0.1:3306 failed:
    AttributeError("'Transport' object has no attribute 'window_size'",)

"Test connection" from connection properties shows

    Failed to Connect to MySQL at 127.0.0.1:3306 through SSH tunnel...
    Lost connection to MySQL server at 'reading initial communication packet', system error: 0

Originally reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763971

How to repeat:
Create connection to remote host using connection method "Standard TCP/IP over SSH".
[6 Oct 2014 19:27] Alfredo Kojima
Apparently the new paramiko maintainer doesn't care much about backwards compatibility.
I've attached a patch that should fix this until our next release.
[6 Oct 2014 19:28] Alfredo Kojima
paramiko fix

Attachment: paramiko.diff (application/octet-stream, text), 1.75 KiB.

[6 Oct 2014 23:46] Dmitry Smirnov
patch for 6.2.3

Attachment: paramiko.patch (text/x-diff), 2.07 KiB.

[6 Oct 2014 23:49] Dmitry Smirnov
Thanks Alfredo, your patch works perfectly.
I've attached modified version that applies to MySQL Workbench 6.2.3.
[7 Oct 2014 21:22] Alfredo Kojima
Posted by developer:
 
This only happens with paramiko 1.15
[29 Oct 2014 8:51] Liam Gretton
This patch doesn't work for me (Win64, 6.2.3.12312 build 2280), I get the same error after applying it.

The version of paramiko with my WB seems to be 1.7.7.1.
[4 Nov 2014 7:07] Pavel Vorobiov
Guys,

How much money you want to fix this issue?
[4 Nov 2014 19:29] izmael arragan Lopez
I resolved this problem doing a downgrade of python-paramiko to version 1.10. I have fedora 20

"sudo yum downgrade python-paramiko"
[4 Nov 2014 21:58] linagee I don't have one
"Attachment: paramiko.patch (text/x-diff), 2.07 KiB"

This patch worked for me. Thank you!
[5 Nov 2014 3:34] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.2.4 release, and here's the changelog entry:

Connections to remote hosts using the connection method "Standard TCP/IP
over SSH" would fail with new versions (1.15+) of the paramiko library.

A workaround was to downgrade the system's paramiko library.

Thank you for the bug report.
[11 Nov 2014 4:49] Matt Kauer
This also worked for me for the time being as I don't want to deal with patches right now (using Fedora 20):

"sudo yum downgrade python-paramiko"

Removed:
  python-paramiko.noarch 0:1.15.1-1.fc20                                                                 

Installed:
  python-paramiko.noarch
0:1.10.1-2.fc20
[24 Nov 2014 15:49] Mike Smith
Thanks for all the useful info. I downgraded python-paramiko on my Fedora 20 system (Workbench 6.2.4) and all is well again. This issue had me running in circles for over an hour....
[17 Dec 2014 11:35] Liam Gretton
This bug is still present in 6.2.4.12437 (build 2426) for 64-bit Windows.

It looks like Paramiko 1.7.7.1 is bundled with this.
[16 Jan 2015 17:25] Erik Schminke
The patch file worked for me, but not directly.  Using the patch file as a roadmap, I edited the file by hand and it worked.

The file the patch edits is:
wb_admin_ssh.py

On my system, I found the file in:
/usr/lib64/mysql-workbench/modules

Per the patch file, the relevant lines are around line 85, 101, and 672.  Done correctly, it will fix the error.

Be sure to backup the file before you edit so you can fall back if necessary.