For an unknow reason, my work insist on using RSA 4096 ssh keys (even if they don't have passphrases) and therefore wants me to create a new pair (old current one is 'only' RSA 2048 with strong passphrase)
So I've moved my old pair to .ssh/id_rsa_legacy and .ssh/id_rsa_legacy.pub, then I created a new one with
ssh_keygen -t rsa -b 4096 -o -a 100Sounds good so far, but wait !!!
If I do
cp ~/.ssh/id_rsa_legacy.pub ~/.ssh/authorized_keys && ssh localhostI can connect, but if I do
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys && ssh localhostI get an error
sign_and_send_pubkey: signing failed: agent refused operationAlso, ssh-add -l shows both keys (old one first, then new one)
I've looked on stackoverflow & duckduckgo but all answers discussed adding the new key to using ssh-add which doesn't solves my case.