Plugin Output Remote command execution failed: Host key verification failed

Hi
I am newbie to icinga.I have created icinga master and hosts
checking the services by by_ssh
Getting plugin output in web as

“Plugin Output Remote command execution failed: Host key verification failed.”

icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: 2.11.2-1)

Kind regards,
Sreekanth

Hi, to see would the problem could be, it would be interesting to see the host and service-defination.

Hi.

This usually means, the there is a problem with trusting the host key of the target-system, where you are about to connect to.
E.g., the host-key of the target system might have changed.

Please try to connect to the target host by the commandline, by ssh not the script (plugin), which usually shows you more informations about the problem and what you can do to solve it.

To (ssh) connect by the user nagios (on debian-based systems), who doesn’t have a login shell, so you could try:

sudo -u nagios bash
ssh <user_at_target>@<the.host.to.connect>
# e.g.: ssh distostu@my.funky.host

On non-debian-based systems, the user should be icinga, not nagios

2 Likes

Hi,

to add - I had updated the Agent based docs chapter for SSH a while ago, where this is mentioned explicitly as well. If you have additions, PRs are much appreciated :slight_smile:
https://icinga.com/docs/icinga2/latest/doc/07-agent-based-monitoring/#ssh-preparations

Cheers,
Michael

4 Likes

sudo su - icinga does not work. How to resolve the issue when using icinga director ?