Carlos Tinnelly
Carlos Tinnelly

Reputation: 579

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?

Upvotes: 4

Views: 3131

Answers (2)

Strayobject
Strayobject

Reputation: 662

Workbench does not seem to like passphrase protected keys, remove the passphrase from the key with ssh-keygen -p (leave the new one blank) and try connecting again.

Upvotes: 0

adolfotcar
adolfotcar

Reputation: 565

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. =]

Upvotes: 8

Related Questions