Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I connect MySQL Workbench using a password protected private ssh key?

I'm  having troubles connecting my Workbench through SSH using my password protected key, I don't know where I have to put my password key in Workbench, it tells me "Access denied for 'none'. Authentication that can continue: publickey".

I have my credentials correct (I can connect via terminal SSH using the same user) so it makes me think that is because my ssh key is protected by password.

Where do can I put my password in Workbench?

like image 910
Carlos Tinnelly Avatar asked Oct 15 '25 17:10

Carlos Tinnelly


1 Answers

I just came across this issue. I had a key to access an old VPN that worked since 2016. Now I changed servers and decided to create a new key, which works fine on terminal but MySQL Workbench would give me the same error as you're getting. I copied the old key to the new server and it worked fine on the Mysql Workbench which I couldn't understand. Comparing both keys I noticed that the old key starts like this:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info:

whereas the new key don't contain those two first lines. Then after researching a bit I learned that you have to generate the key in the PEM format in order to have those two lines at the header, so the command to generate has to include the -m PEM option and should look like this:

ssh-keygen -m PEM -t rsa -b 8192

Now Mysql Workbench works fine with that key. =]

like image 92
adolfotcar Avatar answered Oct 17 '25 05:10

adolfotcar