I am trying to connection to a MySQL server on Host X through machine Y over SSH.
The same setup (but older version of MySQL workbench) works on my another box (CentOS 6
For Linux users using ssh-keygen:
As per the other answers you need to use openssh format.
ssh-keygen -o -b 4096
That gives me a new keypair RSA type 4096 bits in openssh format. It's the -o
that's key here (no pun intended).
Obviously this generates a new key so is only useful if you can upload the new public key to the server. Don't forget to back up your old keys first incase you use them elsewhere.
AFAIK ssh-keygen doesn't have the ability to convert an existing key.
Why Oracle have dropped support for the ubiquitous PEM format is beyond me.
You need to ensure that your private key is in openssh format. With puttygen you can export as Openssh. This worked for me.
Converting it to OpenSSH solves the issue. Just do the following:
I've just come across this again recently. If you use a password protected private key and you just upgraded to macOS Sierra you probably need to re-add your private key to your keychain again.
ssh-add -K ~/.ssh/id_rsa
This instantly fixed the problem for me.
I had the same problem on macos with both Navicat and MySQL Workbench. Thanks to Jonathan on this article
figure my issue out. Macos users first need to install puttygen and then convert ppk format into pem by means of Jonathan said in his tutorial and then TADA! everything works like a charm!
For me, it worked using a .pem extension key. As I only had the ppk key, I had to transform the .ppk into .gem.
To transform it, I used eating in the ubuntu terminal:
$ puttygen key.ppk -O private-openssh -o key.pem