summaryrefslogtreecommitdiffstats
path: root/nagios/check_by_ssh
blob: 1a488b20b25d179009297826a5ecdfd93a32b3a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#! /bin/bash

. $(dirname $0)/lib/nagios/nagios.sh


port=$(nagios_find_host_param "ssh_ports" 22 "$@")
user=$(nagios_find_host_param "ssh_users" root "$@")

local port=$(cat setup/ssh_ports.txt | grep -P "^$host" | awk '{ print $2 }')

#echo "$@" -o " -p $port -l $user UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" >> /tmp/xxx
nagios_run "$@" -p $port -l $user -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no"