If I do this:
ssh admin@ntp200 show gps
I get:
Non-interactive SSH session denied.
I want to monitor and regularly log the output from "show gps" and "show ntp" to make sure they are working properly. Since there's no syslog to send to a log server, and no snmp, I need to do this manually.
It's possible to do this with this script from a *nix system (requires authorized_keys set up correctly):
A 2nd script can call the above script and parse the output, looking for specific status and sending a warning message to syslog if something isn't working correctly.
It would be much simpler to do:
ssh admin@ntp200 show gps
ssh admin@ntp200 show ntp
and parse the output that way.
Of course, having a system log and being able to forward that to a syslog server, and/or having snmp traps would also help.
If I do this: ssh admin@ntp200 show gps I get: Non-interactive SSH session denied.
I want to monitor and regularly log the output from "show gps" and "show ntp" to make sure they are working properly. Since there's no syslog to send to a log server, and no snmp, I need to do this manually.
It's possible to do this with this script from a *nix system (requires authorized_keys set up correctly):
!/usr/bin/expect
spawn ssh admin@ntp200 expect "ntp200>" send "show gps\r" expect "ntp200>" send "show ntp\r" expect "ntp200>" send "exit\r" exit
A 2nd script can call the above script and parse the output, looking for specific status and sending a warning message to syslog if something isn't working correctly.
It would be much simpler to do: ssh admin@ntp200 show gps ssh admin@ntp200 show ntp and parse the output that way.
Of course, having a system log and being able to forward that to a syslog server, and/or having snmp traps would also help.