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 [email protected]:~/files.tgz .
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 [email protected]:~/all_git.tgz . 
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .