I have both rsa and ed25519 keys on my local machine as well as on a remote one. I've also added both local public keys to authorized_hosts file of a remote machine. When I'm connecting to the remote machine via "ssh email@example.com, how do I know whether it's using the rsa or ed25519 key? How can I change that?
How to find out if “ssh firstname.lastname@example.org” if rsa or ed25519 key is being used if I have both?
Run the client in debug mode. That is, use
-vvv switches. The output will answer your question.
how can I force it to use ed25519? – Kommi 3 hours ago
-i switch, or the
IdentityFile option of
ssh_config. If it will not work and it will still pick up the default identities, use
IdentitiesOnly option, which will ignore the default identities and use the one you specify.