Nice script, but one disadvantage is that it's terribly insecure. All our remote hosts' ssh keys are locked down to allow execution of restricted commands only. That way, if our Nagios server is somehow compromised, we don't need to worry about every remote host being at risk as well. The worst thing an attacker could do is DOS the remote machines with a flood of monitoring queries.
That said, you could also just pipe the script contents directly over the ssh connection into bash and skip creation of the temp script altogether. > -----Original Message----- > From: Tomasz Chmielewski [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 24, 2006 4:15 AM > To: nagios-users@lists.sourceforge.net > Subject: [Nagios-users] executing plugins remotely via SSH > > > Hi, > > I wrote a little bash script which allows to execute nagios > plugins, on > remote machines, using SSH. > > The advantage over "check_by_ssh" is that nagios plugins > don't need to > be installed on the remote machine. > > > The plugin, with description, is available here: > http://wpkg.org/index.php/Nagios > > > The page is a wiki, so feel free to edit it, discuss it, etc. :) > > > -- > Tomasz Chmielewski > > -------------------------------------------------------------- > ----------- > Using Tomcat but need to do more? Need to support web > services, security? > Get stuff done quickly with pre-integrated technology to make > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& dat=121642 _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null