Bug #76168 Connection over SSH fails with pageant running
Submitted: 5 Mar 2015 9:33 Modified: 16 Oct 2015 19:46
Reporter: Fredric Johansson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.2.5 OS:Windows
Assigned to: CPU Architecture:Any

[5 Mar 2015 9:33] Fredric Johansson
Description:
After updating to 6.2.5 I get this error when connecting to a server over ssh with pageant running.
Updating to the git-version of paramiko and applying https://github.com/paramiko/paramiko/pull/488/files it works again. Didnt try with a newer released version.

15:36:36 [INF][     SSH tunnel]: Existing SSH tunnel not found, opening new one
15:36:36 [INF][     SSH tunnel]: Opening SSH tunnel to server:22
15:36:36 [ERR][sshtunnel.py:notify_exception_error:233]: Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE\sshtunnel.py", line 265, in _connect_ssh
    look_for_keys=has_key, allow_agent=has_key)
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE/python/site-packages\paramiko\client.py", line 332, in connect
    self._auth(username, password, pkey, key_filenames, allow_agent, look_for_keys)
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE/python/site-packages\paramiko\client.py", line 445, in _auth
    self._agent = Agent()
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE/python/site-packages\paramiko\agent.py", line 78, in __init__
    ptype, result = self._send_message(chr(SSH2_AGENTC_REQUEST_IDENTITIES))
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE/python/site-packages\paramiko\agent.py", line 110, in _send_message
    l = self._read_all(4)
  File "C:\Program Files\MySQL\MySQL Workbench 6.2 CE/python/site-packages\paramiko\agent.py", line 118, in _read_all
    raise SSHException('lost ssh-agent')
SSHException: lost ssh-agent

15:36:36 [INF][     SSH tunnel]: TunnelManager.wait_connection authentication error: Authentication error, unhandled exception caught in tunnel manager, please refer to logs for details
15:36:36 [ERR][     SSH tunnel]: Authentication error opening SSH tunnel: Authentication error, unhandled exception caught in tunnel manager, please refer to logs for details

How to repeat:
-
[5 Mar 2015 10:06] Fredric Johansson
It does also need the ecdsa module unless I managed to mess up when replacing paramiko files provided by workbench
https://github.com/warner/python-ecdsa
[5 Mar 2015 10:07] Marcin Szalowicz
Thank you for the bug report.
[10 Mar 2015 21:03] Nathaniel Engelsen
+1 on being affected by this bug.  After updating paramiko and installing ecdsa I was still having issues.  Had to make additional paramiko changes to get the new version up and running and logging working properly and I'm now getting another error related to paramiko.
[10 Mar 2015 21:03] Nathaniel Engelsen
I meant to mention that this is Windows 8.1 (x64)
[10 Apr 2015 17:24] fred flint
I am seeing exactly the same thing.  Here is my bug report.

http://bugs.mysql.com/bug.php?id=74300
[10 Apr 2015 18:22] fred flint
I was unable to get the github version of paramiko working.  
Workbench just says "Cannot start SSH tunnel manager".

Can you please provide instructions on how you integrated the new version of paramiko and how you installed the ecdsa module.
[10 Apr 2015 18:33] Nathaniel Engelsen
fred flint,

I just downloaded paramiko from github:

https://github.com/paramiko/paramiko

and copied files into the right application folder. I can't tell you what the "right application folder" is at the moment because I uninstalled and installed an older version of MySQL Workbench.  For ecdsa:

https://github.com/warner/python-ecdsa

And copied it to the right application folder alongside paramiko (or up a level, I can't remember).  This bug is what I was trying to replicate:

https://bugs.mysql.com/bug.php?id=74658
[10 Apr 2015 22:29] fred flint
I installed that way and it will not work.  Maybe something has changed.

Hopefully Oracle will get around to fixing this bug some day.  It's been there a long time and seems to be just a matter of them updating paramiko
[23 Jul 2015 9:21] Peter Gurský
Had this problem on windows using puttygen saved private key to authorize in ssh tunnel. I've just fixed this using exported puty private key to OpenSSH key in puttygen menu Conversions > Export OpenSSH key
[8 Aug 2015 18:46] Nicholas Solin
Exporting my PuTTY key as an OpenSSH key did it for me. Thanks Peter!
[16 Oct 2015 19:46] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.3.5 release, and here's the changelog entry:

On Windows, SSH connections would fail when connecting to a server with
pageant running.

Thank you for the bug report.