If I run the following command line it works:
However with the same command line in nrpe.cfg connection is always refused# /usr/lib64/nagios/plugins/check_ssh -4 -p 1157 104.xxx.xxx.xxx
SSH OK - OpenSSH_5.3 (protocol 2.0) | time=0.132206s;;;0.000000;10.000000
From the GUIcommand[check_remote_ssh]=/usr/lib64/nagios/plugins/check_ssh -4 -p 1157 104.xxx.xxx.xxx
I have no doubt it is a configuration issue, but I can't spot it. Any help is appreciated.Current Status: CRITICAL (for 2d 13h 11m 42s)
Status Information: Connection refused
Performance Data:
Current Attempt: 3/3 (HARD state)
Last Check Time: 07-02-2015 10:38:21
Check Type: ACTIVE
Check Latency / Duration: 0.164 / 0.361 seconds
Next Scheduled Check: 07-02-2015 10:48:21
Last State Change: 06-29-2015 21:29:35
Last Notification: 07-02-2015 10:18:28 (notification 4)
Is This Service Flapping? NO (0.00% state change)
In Scheduled Downtime? NO
Last Update: 07-02-2015 10:41:08 ( 0d 0h 0m 9s ago)
Active Checks: ENABLED
Passive Checks: ENABLED
Obsessing: ENABLED
Notifications: ENABLED
Event Handler: ENABLED
Flap Detection: ENABLED