Bug #92663 MySQL Workbench 8.0.12 does not support Putty private key format
Submitted: 3 Oct 2018 22:41 Modified: 12 Oct 2018 6:56
Reporter: Jovan Perovic Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.12 OS:Microsoft Windows (Microsoft Windows 7 Professional Service Pack 1)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[3 Oct 2018 22:41] Jovan Perovic
Description:
00:27:12 [INF][     SSH tunnel]: Existing SSH tunnel not found, opening new one
00:27:12 [INF][     SSH tunnel]: Opening SSH tunnel to udg.edu.me:2022
00:27:12 [INF][      SSHCommon]: libssh: ssh_connect ssh_connect: libssh 0.7.5 (c) 2003-2014 Aris Adamantiadis, Andreas Schneider, and libssh contributors. Distributed under the LGPL, please refer to COPYING file for information about your rights, using threading threads_stdthread
00:27:12 [INF][      SSHCommon]: libssh: ssh_socket_connect ssh_socket_connect: Nonblocking connection socket: 2872
00:27:12 [INF][      SSHCommon]: libssh: ssh_connect ssh_connect: Socket connecting, now waiting for the callbacks to work
00:27:13 [INF][      SSHCommon]: libssh: ssh_packet_dh_reply ssh_packet_dh_reply: Received SSH_KEXDH_REPLY
00:27:13 [INF][      SSHCommon]: libssh: ssh_client_dh_reply ssh_client_dh_reply: SSH_MSG_NEWKEYS sent
00:27:13 [INF][      SSHCommon]: libssh: ssh_packet_newkeys ssh_packet_newkeys: Received SSH_MSG_NEWKEYS
00:27:13 [INF][      SSHCommon]: libssh: ssh_packet_newkeys ssh_packet_newkeys: Signature verified and valid
00:27:13 [INF][      SSHCommon]: libssh: ssh_packet_userauth_failure ssh_packet_userauth_failure: Access denied. Authentication that can continue: publickey,password
00:27:13 [INF][     SSHSession]: Banner: 
00:27:13 [ERR][     SSHSession]: User authentication failed.
00:27:13 [ERR][     SSH tunnel]: Authentication error opening SSH tunnel: Access denied. Authentication that can continue: publickey,password
00:27:15 [INF][      WBContext]: Connection to UDG-MYHO - LIVE cancelled by user: Tunnel connection cancelled

How to repeat:
General:
1. Generate a new RSA keypair via PuTTYgen (passphrase is optional)
2. Copy public key to destination server
3. Start Pageant and add the key
4. Verify that you can connect to your server with PuTTY (without password)

In Workbench:
1. Create new connection within Workbench with "Standard TCP/IP over SSH" method
2. Fill out your server details and specify newly generated private key
3. Click on "Test connection" and you should be greeted by "Access denied. Authentication that can continue: publickey,password"
4. With PuTTYgen, convert your private key to OpenSSH format and save it (passphrase is optional)
5. Set newly converted private key in connection settings and tap on "Test connection". You should be asked for passphrase (if existent).

I found some rather contradictory info while googling, so I guess I need an authoritative answer on whether Workbench ever supported this key format and does it now?

Thanks a lot for any help!

Regards!
[11 Oct 2018 8:34] Umesh Shastry
Hello Jovan Perovic,

Thank you for the report and feedback.
Verified as described on Win7.

regards,
Umesh
[12 Oct 2018 6:56] Mike Lischke
Posted by developer:
 
MySQL Workbench uses libssh under hood to create SSH connections. This implies that keyfiles must use the OpenSSH format. Putty is pretty isolated with its own keyfile format. Fortunately you can convert that to OpenSSH format and you should be fine.