Remote command execution failed: Host key verification faile

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
danoreilly
Posts: 28
Joined: Mon Dec 01, 2014 4:28 pm

Re: Remote command execution failed: Host key verification f

Post by danoreilly »

Same issue.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Remote command execution failed: Host key verification f

Post by abrist »

Can you check the remote system's logs for more info?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
danoreilly
Posts: 28
Joined: Mon Dec 01, 2014 4:28 pm

Re: Remote command execution failed: Host key verification f

Post by danoreilly »

Nothing really obvious. From auth.log:
Dec 3 11:17:15 ubdepot sshd[11205]: Accepted publickey for nagios from 10.18.215.98 port 34782 ssh2: RSA fd:3c:56:ed:a8:76:e1:01:bf:0e:cb:56:04:64:68:61
Dec 3 11:17:15 ubdepot sshd[11205]: pam_unix(sshd:session): session opened for user nagios by (uid=0)
Dec 3 11:17:15 ubdepot systemd-logind[504]: Removed session 37.
Dec 3 11:17:15 ubdepot systemd-logind[504]: New session 38 of user nagios.
Dec 3 11:17:16 ubdepot sshd[11295]: Received disconnect from 10.18.215.98: 11: disconnected by user

NOthing really in any other logs. I really need to get this thing going, as it's a POC for possibly doing this enterprise-wide. ANy help gratefully accepted.

Thanks!
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Remote command execution failed: Host key verification f

Post by eloyd »

The simple answer to your problem is that the host key for the remote machine does not match what your local SSH client thinks it should be when you SSH to the remote host.

Really, the only way this can happen is if you have an old host key, incorrect host key, or if you are using a different host name. So that leads me to this:

When nagios is SSHing to the remote host, is it doing it by name or IP? I'm guessing it's by IP. IP != name, and that's where your problem is stemming from. Try ssh <remote.ip.address> and see if you can create the hostkey, then see if Nagios's ssh works.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Remote command execution failed: Host key verification f

Post by sreinhardt »

Sounds like eloyd is right on top of things as usual. Dan, let us know how connecting both(or at least how you have the hostaddress field) ways works for you and with the check beyond that.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
danoreilly
Posts: 28
Joined: Mon Dec 01, 2014 4:28 pm

Re: Remote command execution failed: Host key verification f

Post by danoreilly »

Actually, given the potential size of the system space we're looking at, we've decided not to go with the ssh route. Too expensive. I really do appreciate the help on this, thanks very much!
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Remote command execution failed: Host key verification f

Post by eloyd »

SSH is free. I do not understand what you mean by "too expensive." Do you mean it requires too many resources? You are free to do what you want but I am just trying to understand what you're saying.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Remote command execution failed: Host key verification f

Post by tmcdonald »

eloyd wrote:Do you mean it requires too many resources?
That was the impression I got.
Former Nagios employee
Locked