MySQL SSH Connect : No key-pair to add

Hello Metabase Community !

I’m looking for help to connect Metabase to a MySQL DB with an SSH tunnel but I get this error No key-pair to add

Here is the message I get in the log view :

[362be6c6-57f5-45f3-9205-72e84f7bfed4] 2020-12-21T21:41:41+01:00 WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier ParameterizedMessage[messagePattern=Server at {} presented unverified {} key: {}, stringArgs=[/, EC, SHA256:1ynIu/Q2H8bDaTLVpKifqZjltgZnCKL0Ze0skJsMtCM], throwable=null]
[362be6c6-57f5-45f3-9205-72e84f7bfed4] 2020-12-21T21:41:41+01:00 DEBUG metabase.middleware.log POST /api/database 400 38.5 ms (0 appels de DB) 
{:valid false, :dbname "No key-pair to add", :message "No key-pair to add"}

Does someone have an idea ?

Hi @Hugo

You are seeing the same problem as this thread: Error Trying to Add Database

Resolution was to re-enter the information and then it started working. I don’t know where the problem comes from, but I have a feeling that it might be a browser password manager that is doing something.

Alternatively try with a manual SSH tunnel outside of Metabase:

And you should migrate away from H2 if you are using Metabase in production:

My bad ! I made a mistake using my SSH key ! Thank you for your help !

@Hugo Can you provide more details on what the mistake was? It’s going to help others in the future.

My error was to copy past the content of the SSH after I unlocked it with PuttyGen.

Solution :
I just had to open the SSH file in a txt editor and copy past the content

1 Like

Faced the same error.

Don't forget to copy and paste the whole file content including the -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY----- .

It worked for me after I did that.

1 Like

I have difficulty pasting the SSH private key. Can I copy and paste it from the .ppk file? I have tried copying and pasting from the ppk file by opening it in Notepad and then pasting it into Metabase. Should this method work, or is there another recommended way?