When I attempt to SSH to a host, ssh still prompts for the password of the ~/.ssh/id_rsa key (Which was generated and exported from PuTTYgen), even though the password is already loaded in ssh-agent (I checked with ssh-add -l and ssh-add -L)

The AddKeysToAgent yes is present in the relevant /etc/ssh/ssh-config or ~/.ssh/config


ssh-agent does not keep track of the filenames of the keys that is loaded into it.

If the key is encrypted, ssh does not know if it matches the key that is already loaded, since it needs to decrypt it first.

To prevent the double prompt, ensure that the public key, in ~/.ssh/id_rsa.pub is present as well. ssh can use this to determine that the key is already loaded to prevent the unnecessary prompt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.