Bug #96270 can't connect via ssh on Mac
Submitted: 22 Jul 2019 13:33 Modified: 3 Jul 2020 16:36
Reporter: jose canizales Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.17 build 14960816 CE (64 bits) Commu OS:MacOS
Assigned to: CPU Architecture:Any

[22 Jul 2019 13:33] jose canizales
Description:
08:24:50 [INF][     SSH tunnel]: Existing SSH tunnel not found, opening new one
08:24:50 [INF][     SSH tunnel]: Opening SSH tunnel to ###########:22
08:24:50 [INF][      SSHCommon]: libssh: ssh_connect ssh_connect: libssh 0.8.5 (c) 2003-2018 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
08:24:50 [INF][      SSHCommon]: libssh: ssh_socket_connect ssh_socket_connect: Nonblocking connection socket: 21
08:24:50 [INF][      SSHCommon]: libssh: ssh_connect ssh_connect: Socket connecting, now waiting for the callbacks to work
08:24:50 [INF][      SSHCommon]: libssh: ssh_kex_select_methods ssh_kex_select_methods: Negotiated curve25519-sha256,ecdsa-sha2-nistp256,aes256-ctr,aes256-ctr,hmac-sha2-256,hmac-sha2-256,none,none,,
08:24:50 [INF][      SSHCommon]: libssh: ssh_packet_dh_reply ssh_packet_dh_reply: Received SSH_KEXDH_REPLY
08:24:50 [INF][      SSHCommon]: libssh: ssh_client_curve25519_reply ssh_client_curve25519_reply: SSH_MSG_NEWKEYS sent
08:24:50 [INF][      SSHCommon]: libssh: ssh_packet_newkeys ssh_packet_newkeys: Received SSH_MSG_NEWKEYS
08:24:50 [INF][      SSHCommon]: libssh: ssh_packet_newkeys ssh_packet_newkeys: Signature verified and valid
08:24:50 [INF][      SSHCommon]: libssh: ssh_packet_userauth_failure ssh_packet_userauth_failure: Access denied for 'none'. Authentication that can continue: publickey
08:24:50 [INF][     SSHSession]: Banner: 
08:24:50 [INF][      SSHCommon]: libssh: ssh_pki_import_privkey_base64 ssh_pki_import_privkey_base64: Trying to decode privkey passphrase=true
08:24:50 [INF][      SSHCommon]: libssh: ssh_pki_openssh_import ssh_pki_openssh_import: Opening OpenSSH private key: ciphername: aes256-ctr, kdf: bcrypt, nkeys: 1

08:24:50 [ERR][     SSHSession]: User authentication failed.
08:24:50 [ERR][     SSH tunnel]: Authentication error opening SSH tunnel: Access denied for 'none'. Authentication that can continue: publickey
08:24:51 [INF][      WBContext]: Connection to AWS cancelled by user: Tunnel connection cancelled

How to repeat:
I create my connection on MySQL Workbench, and had created previously my ssh and added to forge,

1. Generate a new RSA keypair via terminal on Mac
2. Copy public key to destination (forge) server
4. Verify that you can connect via terminal

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 for 'none'. Authentication that can continue: publickey"
[22 Jul 2019 15:37] MySQL Verification Team
Thank you for the bug report.
[7 Nov 2019 5:23] Istvan Tabanyi
I still cannot connect through ssh.
Also, I have an ssh config like this:
Host Bastion
    Hostname xxx
    User ec2-user
    IdentityFile ~/.ssh/id_rsa
    ControlMaster auto
    ControlPath ~/.ssh/mux-%r@%h:%p
    ControlPersist 5m

After an ssh-add -A I can connect to that host with `ssh Bastion` without any issue from terminal or sequel pro. I don't have to enter username or supply the key path and I don't have to enter my password.
In workbench I must enter the username and supply the path, but why? It can figure out the host from config, but nothing else? But doesn't really matter as it is not working:)
Any plan to fix this anytime?
[16 Apr 2020 16:53] jose canizales
im still can't use workbench, but I use sequel pro so easy but I can't connect via workbench to update my tables from a model, can you tell me step by step how you do to solve this
[14 May 2020 7:46] Iosif Schiopu
I have the same issue on MySQL Workbench 8.0.20 with MacOS Catalina 10.15.4.

I noticed that the issue is resolved if I use a SSH private key without a passphrase, however this poses a security risk.
[14 May 2020 7:54] Iosif Schiopu
I have the same issue on MySQL Workbench 8.0.20 with MacOS Catalina 10.15.4.

I noticed that the issue is resolved if I use a SSH private key without a passphrase, however this poses a security risk.
[14 May 2020 7:58] Iosif Schiopu
The issue seems to have been reported and fixed in the past:
https://bugs.mysql.com/bug.php?id=49418&contribs=1
[3 Jul 2020 16:36] jose canizales
as. mention in this report: https://bugs.mysql.com/bug.php?id=49418&contribs=1
MySQL doesn't support ssh key with pass, so you must generate a new one with blank pass.