I have a bunch of users, who with SSH keys have access to accounts on other servers. Currently I have a script which collects up the ssh public keys and distributes them to the correct account on the correct servers.
What I want to do, is get that script to check that any given users ssh key has a passphrase before accepting the public key and distributing it.
I've tried a number of things, like using an ssh-agent and ssh-add and then the problem comes when ssh-add gets asked for passphrase.
Is there a way to get something like openssl to check for passphrase, fail slightly with a return code of 1 if the key has a passphrase?
Thanks!
