Im trying to do a remote execution of scripts through SSH in PHP.
What im doing:
-Use PHP in conjunction with nagios' check_by_ssh script to execute the script.
$output = shell_exec('cd /usr/local/nagios/libexec && ./check_by_ssh -H server01 -l nagios -C "/server01/nagios/plugin/check_memory"');
-It gives me a 'Host key verification failed' error even though i enabled it to ssh from my server to server01 without password.
How do i get it to work?