Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Received disconnect from xxx.xxx.xxx.xxx port xxxxxx No supported authentication methods available [preauth]

ecxod's profile image ecxod posted 4 weeks ago in General Permalink

actually this is a bug I believe.

I am logging in to several servers using the tunnel method. The ssh part seem to work but the authentication is not working.

I would not post it here but manually from the console via TerraTerm or Puty with the command :

mysql -u root -pSOME-LONG-PASSWORD

I can log in, but when I use Madame Heidi I get the failure described in the title :

Received disconnect from xxx.xxx.xxx.xxx port xxxxxx No supported authentication methods available [preauth]

Also using phpmyadmin I can log in to localhost.

Can you please tell me what I am doing wrong ???

ansgar's profile image ansgar posted 4 weeks ago Permalink

Is the user probably configured to use some specific authentication plugin, which HeidiSQL does not provide through its plugin folder?

Try to find out:

SELECT plugin FROM mysql.user WHERE Host='%' AND User='root';
ecxod's profile image ecxod posted 4 weeks ago Permalink

Hello Ansgar, thank you first for the wonderful work, I have already donated, but I will donate again so that the SQL God gives you health that you can continue to work on the program.

SELECT user, host, plugin FROM mysql.user WHERE User='root';

+------+-------------+-----------------------+
| User | Host        | plugin                |
+------+-------------+-----------------------+
| root | localhost   | mysql_native_password |
| root | 192.168.1.2 | mysql_native_password |
| root | 127.0.0.1   | mysql_native_password |
| root | 192.168.1.3 | mysql_native_password |
+------+-------------+-----------------------+
ecxod's profile image ecxod posted 4 weeks ago Permalink

After one more cup of coffee and I washed my glassed with pril, I saw that heidisql complains:

Plink exided unexpected. Command line was:
C:\Program Files (x86)\plink\plink.exe -ssh 
root@xxx.xxx.xxx.xxx -P 66 -i 
"C:\Users\Christian\ssl\id_rsa.pkk" -N -L 3307:localhost:3306

So I grabbed cmd.com and typed in :

C:\Program Files (x86)\plink>plink.exe -ssh root@xxx.xxx.xxx.xxx -P 66 -i "C:\Users\Christian\ssl\id_rsa.pkk" -N -L 3307:localhost:3306

And I got :

C:\Program Files (x86)\plink>plink.exe -ssh root@xxx.xxx.xxx.xxx -P 66 -i "C:\Users\Christian\ssl\id_rsa.pkk" -N -L 3307:localhost:3306
Unable to use key file "C:\Users\Christian\ssl\id_rsa.pkk" (OpenSSH SSH-2 private key)
Using username "root".
FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)

But I can confirm that the key is OK I use it with terraterm and there is no problems

Does anybody have a hint ?

ecxod's profile image ecxod posted 4 weeks ago Permalink

After 19 more coffees and 2 times dog walking I found the solution. I turned ssh on debug mode and plink on verbose and then I found out that my private key was using a "old pem" format.

Unable to use this key file (OpenSSH SSH-2 private key (old PEM format))

then I have read 1000 pages of putty documentation about the new format, and that puttygen has a function to rewrite old "pem" format in new format. Simple load the old key and rewrite it. So I downloaded puttygen and transformed my private key to the new format and I lived happily ever after.

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




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.