I have two users (collector and zenoss) on the zenoss server.  collector is the 
user I utilize to ssh into all of my other servers and run commands from.  
collector has an ssh key located in /home/collector/.ssh/id_rsa.  This key has 
been put into the .ssh/authorized keys of the collector user account on each of 
our db servers.

my script is zenpostgres-con.sh and runs the following command within it:
sudo -u collect ssh -i /home/collect/.ssh/id_rsa $1 'netstat -n|grep 5432|grep 
-c ESTAB'

I have created a template to run this script and collect the output (an integer 
like 95).  When I test this script at the commandline as the zenoss user it 
works like a charm.  I am prompted for no passwords and I get back the proper 
output.  When I test this command from within zenoss I get "Host key 
verification failed. " on db1, db2 and db4 servers.  However when I run this 
command from within zenoss on db3 it works like a charm.

I am confused as to what the discrepancy could possibly be.  I have looked at 
db1 and db3 in the .ssh/authorized_keys for the collect user and its the exact 
same key file.

I am at a complete loss at this point as to what zenoss could be doing that is 
causing these problems.




-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=37209#37209

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to