Hugo
December 21, 2020, 8:50pm
#1
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=[/134.209.246.207:22, 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 ?
flamber
December 21, 2020, 8:56pm
#2
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:
https://www.metabase.com/docs/latest/administration-guide/01-managing-databases.html#what-if-the-built-in-ssh-tunnels-dont-fit-my-needs
And you should migrate away from H2 if you are using Metabase in production:
https://www.metabase.com/docs/latest/administration-guide/01-managing-databases.html#what-if-the-built-in-ssh-tunnels-dont-fit-my-needs
Hugo
December 21, 2020, 9:30pm
#4
My bad ! I made a mistake using my SSH key ! Thank you for your help !
flamber
December 21, 2020, 9:30pm
#5
@Hugo Can you provide more details on what the mistake was? It’s going to help others in the future.
Hugo
December 21, 2020, 10:00pm
#6
Sure:
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
bikal
September 27, 2021, 6:52pm
#7
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