0

I am trying to connect to MySQL server hosted on google cloud compute server. I believe the issue is not MySQL authentication related, but rather SSH. MySQL workbench seems to be unable to connect on SSH with "Authentication error opening SSH tunnel".

I am able to open a putty SSH connection to the server using the same IP, user and private key on the same computer.

Connection is configured as:

SSH Hostname: [ip of my google cloud server] 
SSH Username: [username used in putty ssh]
SSH Key File: [same ssh-rsa ppk file I use in putty]
MySQL Hostname: 127.0.0.1
MySQL Server Port: 3306 Username: [mysql user that works from putty] 
Password: [mysql password that works from putty]

wb.log:

09:43:57 [INF][     SSH tunnel]: Existing SSH tunnel not found, opening new one
09:43:57 [INF][     SSH tunnel]: Opening SSH tunnel to 104.197.xxx.xxx
09:43:57 [ERR][sshtunnel.py:notify_exception_error:235]: Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\sshtunnel.py", line 303, in _connect_ssh
    look_for_keys=has_key, allow_agent=has_key, timeout=SSH_CONNECTION_TIMEOUT)
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\client.py", line 367, in connect
    look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host)
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\client.py", line 584, in _auth
    raise saved_exception
AuthenticationException: Authentication failed.
09:43:58 [ERR][     SSH tunnel]: Authentication error opening SSH tunnel: Authentication error. Please check that your username and password are correct and try again.
Details (Original exception message):
Authentication failed, please check credentials.
Please refer to logs for details
09:43:59 [INF][      WBContext]: Connection to go-xv01 cancelled by user: Tunnel connection cancelled
2
  • 1
    Possible duplicate dba.stackexchange.com/questions/3489/…. As suggested in that topic, Putty uses a non-standard key file format; you'll probably need to export your private key as an OpenSSH key and specify that file in the workbench configuration.
    – mustaccio
    Feb 1, 2018 at 15:22
  • Yes, that is the solution. Using puttygen to export as Open SSH format works. Open SSH keys begin with "-----BEGIN RSA PRIVATE KEY-----". Thank you. Feb 1, 2018 at 15:37

1 Answer 1

1

Based on mustaccio's comment, the solution was using puttygen 'Conversions'->'Import Key'... Then 'Conversions'->'Export Open SSH Key' to export the key. Open SSH keys begin with "-----BEGIN RSA PRIVATE KEY-----".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.