How might one check which .rsa, .pem, and other files are 'loaded' or 'active' by ssh-add? I just had this scare:

$ scp -i /home/dotancohen/.ssh/dotancohen.pem someUser@ .
Warning: Identity file /home/dotancohen/.ssh/dotancohen.pem not accessible: No such file or directory.
files.tgz                                                                100%   89MB   1.5MB/s   00:59
$ scp someUser@ . 
files.tgz                                                                100%   89MB   1.7MB/s   00:54

After verifying that the server does in fact require the .pem key, I would now like to know which other keys are loaded without me knowing about it!

2 Answers 2


As stated in ssh-add's man page, the -L option allows you to view the public keys of the identities ssh-agent currently maintains. You could also use the -l option to view their fingerprints.

  • Thank you, I did in fact read the manpage but the wording did not convey to me what it does!
    – dotancohen
    Jul 10, 2013 at 14:47

There is a -L option of ssh-add that Lists public key parameters of all identities currently represented by the agent:

ssh-add -L

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.