ymnk / jsch-agent-proxy

Other
70 stars 41 forks source link

How to check whether ssh-agent already contains an identity? #22

Open kwin opened 9 years ago

kwin commented 9 years ago

In issue 6 it is described how to add new identities to the ssh-agent. In case you have a protected ssh key you always need to provide the passphrase in case you add it. Therefore it would be good to only add an identity if it is not yet there. Is there a reliable method which could be used to check whether ssh-agent already contains an identity?