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 my_user@server123.com, how do I know whether it's using the rsa or ed25519 key? How can I change that?
1 Answer
How to find out if “ssh user@server.com” 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
Use the -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.
ssh -v MyUser@MyHost
?-i
for specifying an identity file. It's all inman ssh
....