We have many dev/qa/prod RH/Solaris servers with many accounts having ssh trust between them, including between servers in different environments (prod->prod, but also qa->prod). I know this is a bad practice, and the first step I'm trying to take to resolve it is to understand which accounts on which boxes can ssh to which other accounts on which boxes without a password.
My approach was going to be a shell script to log into a specified list of servers, and
sudo go through /etc/passwd file to get a list of all accounts and home directories, look at the latter for presence of
authorized_keys and output this information, per account per box, to
stdout on the machine running the script.
The fact that users can specify a key for ssh to use that is not the default is an acknowledged limitation. (I'm assuming that is not the case)
My question is, does something to address this kind of an issue already exist? And if not, any input on my approach would be welcome.