gitlab, github - Permission denied (publickey,keyboard-interactive)

Category: Ruby :: Published at: 06.04.2022

Today i've suffered some issue with a SSH key. I've tried to clone my repository from

Unfortunately i've received an error:

Permission denied (publickey,keyboard-interactive)

I've thought, i have problem with a SSH key. Unfortunately, adding a SSH key did not resolve the problem.

How to resolve it?

The problem exists inside the file below:


By default, the configuration inside this file looks like this:

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

If you are using only id_rsa key, there is no problem.

The real fun starts, when you want to add the second SSH key. As you can see IdentityFile works here only with one filename.

To add second key for a new host, just add the new record:

  IdentityFile ~/.ssh/id_ed25519

- Click if you liked this article

Views: 1085