0

I have two types of keys based on RSA and ED25519 keys.

however when I do

ssh -i ~/.ssh/id_ed25519 <server>

I get prompted to enter passphrase for RSA based key first then get asked for ED25519 key passphrase

Enter passphrase for key '~/.ssh/id_rsa':
Enter passphrase for key '~/.ssh/id_ed25519':

My both public keys are in authorized keys of the server.

What would be the reason for this

Also

~/.ssh/config

doesn't any settings and is totally empty.

1
  • Do you have the corresponding id_rsa.pub & id_ed25519.pub files as well? Aug 19, 2021 at 20:50

1 Answer 1

0

The -i option of ssh specifies an extra private key to use.

To prevent ssh-agent from providing more identities, you can add the -o "IdentitiesOnly=yes" option to your command, but the default keys inside your ~/.ssh directory might still be tried.

The sure way to only use a specific key is to make an entry for the given host in the ~/.ssh/config file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .