ssh: id_rsa doesn't work, but if I rename it, it works

Solution 1:

Found the reason. My id_rsa.pub file in the same .ssh folder is a public key that belongs to a different identity file. When id_rsa.pub doesn't match id_rsa, it fails automatically. Removing or moving the id_rsa.pub file makes id_rsa work.