Connection stalls when connecting via SSH Tunnel with SSL

judefdoo's profile image judefdoo posted 5 years ago in General Permalink

My company recently made it mandatory to use SSL when connecting to the MySQL databases and we have to go via SSH tunnel as these are not publically accessible.

I was using the 'Maria DB or MySQL (SSH tunnel)' option before making the SSL mandatory. After the change, I enabled the Use SSL on advanced and provided the SSL CA certificate (which I had to switch to TCP/IP network type to do so and switch back to SSH tunnel).

When connecting it stalls and not do anything at all. Below is the session log.

/* 2019-05-14 10:31:37 [] */ /* Writing to session log file now: C:\Users\******\AppData\Roaming\HeidiSQL\Sessionlogs\000257.log */ /* 2019-05-14 10:36:27 [SAVED CONNECTION NAME] */ /* Connecting to <fqdn of DB server> via MariaDB or MySQL (SSH tunnel), username <username>, using password: Yes ... */ /* 2019-05-14 10:36:27 [SAVED CONNECTION NAME] */ /* Port #3307 in use. Checking if #3308 is available... */ /* 2019-05-14 10:36:27 [SAVED CONNECTION NAME] */ /* Port #3308 in use. Checking if #3309 is available... */ /* 2019-05-14 10:36:27 [SAVED CONNECTION NAME] */ /* Port #3309 in use. Checking if #3310 is available... */ /* 2019-05-14 10:36:27 [SAVED CONNECTION NAME] */ /* Port #3310 in use. Checking if #3311 is available... */ /* 2019-05-14 10:36:27 [SAVED CONNECTION NAME] */ /* Port #3311 in use. Checking if #3312 is available... */ /* 2019-05-14 10:36:27 [SAVED CONNECTION NAME] */ /* Port #3312 in use. Checking if #3313 is available... */ /* 2019-05-14 10:36:28 [SAVED CONNECTION NAME] */ /* Attempt to create plink.exe process, waiting 4s for response ... */ /* 2019-05-14 10:36:28 [SAVED CONNECTION NAME] */ /* C:\Program Files\PuTTY\plink.exe -ssh <fqdn of SSH tunnel> -pw "******" -P 22 -N -L 3313:<fqdn of DB server>:<port> */

I can connect to the database using MySQL workbench with the same settings so the reply from Network/DB admin was it's something to do with this tool (which is not very helpful).

Appreciate any help to resolve this problem. I'm not very tech savvy but can try out different options suggested.

Heidi version: 10.1.0.5464 (64 bit) Environment: windows v10.0

Thanks in Advance

Code modification/commit 4bf32b3 from Ansgar Becker <anse@heidisql.com>, 5 years ago, revision 10.1.0.5563
Allow using SSL for SSH tunneled connections. See https://www.heidisql.com/forum.php?t=27120
ansgar's profile image ansgar posted 5 years ago Permalink

I just pushed a few fixes which now allow using SSL in SSH tunnel connections as well. So you should update to the next nightly build, but wait at least half an hour until it's available.

judefdoo's profile image judefdoo posted 5 years ago Permalink

Thanks ansgar. The nightly build 5565 (10.1.0.5565) definitely helped progress things. But now I get the error message "SSL connection error: Certificate signature check failed".

This is similar to github issue 330 (github.com / HeidiSQL / HeidiSQL / issues / 330) but my MySQL server version is 5.6.41 hosted in AWS RDS

I haven't tried replacing the lib as I saw the libs were updated in the on of the builds.

Let me know if there is anything to try.

Thanks

ansgar's profile image ansgar posted 5 years ago Permalink

Yes, this looks quite the same as issue #330, for which I don't have a solution yet.

Updating libmariadb.dll may help here - feel free to try out.

Please login to leave a reply, or register at first.