[Check_mk (english)] 1.6.0p3 Unable to find SSH with
chrislindbergh at gmail.com
Mon Oct 14 03:43:02 CEST 2019
I'm on a Debian host connecting to two OpenWRT routers.
I tried using the full path and just "ssh" and both fail.
What's strange is I was able to get a service list from one of them, then
only failures after that.
I tried disabling strict host key checking in case it was that somehow, and
"Program '/usr/bin/ssh' not found (exit code 127)"
So weird that my normal Linux hosts work fine, also using SSH.
On Sun, Oct 13, 2019 at 1:20 PM Andreas Döhler <andreas.doehler at gmail.com>
> Is this an OpenWRT device? If yes then your SSH binary is not inside the
> normal path. Inside the environment the agent is called not your own paths
> are available.
> Try to make the command with the full path to the SSH binary.
> Chris Lindbergh <chrislindbergh at gmail.com> schrieb am So., 13. Okt. 2019,
>> Hi Andreas,
>> Thanks for replying! The same thing is happening to another OpenWRT unit
>> with the same error, but I can get it to work just fine with normal Linux
>> Here's the output from cmk -d:
>> OMD[hq]:~$ cmk -D URSAMINOR
>> Addresses: 192.168.4.1
>> Tags: [address_family:ip-v4-only], [agent:cmk-agent],
>> [criticality:prod], [datasource:datasource-root], [ip-v4:ip-v4],
>> [networking:lan], [piggyback:auto-piggyback], [site:hq], [snmp_ds:no-snmp],
>> Host groups: check_mk
>> Contact groups: all, check-mk-notify
>> Agent mode: Normal Checkmk agent, or special agent if
>> Type of agent:
>> Program: ssh -i ~/.ssh/id_rsa -l root 192.168.4.1
>> Process piggyback data from
>> I tried running without the softlink first and it didn't work.
>> Any ideas?
>> - Chris
>> On Sun, Oct 13, 2019 at 3:28 AM Andreas Döhler <andreas.doehler at gmail.com>
>>> Hi Chris,
>>> the softlink is not needed normally. What do you see after a "cmk -D
>>> URSAMINOR" at the "Type of agent:" line?
>>> If you use the default "id_rsa" file inside your site you don't need to
>>> define it directly.
>>> It should be enough to make the following command for the datasource
>>> definition "ssh root@$HOSTADDRESS$"
>>> The public key on the target machine should be already with the command
>>> to execute. That is a little bit more safety regarding stolen private key
>>> from monitoring server.
>>> https://checkmk.com/cms_agent_linux.html#ssh -> Restricting access to
>>> agent execution
>>> Best regards
>>> Am So., 13. Okt. 2019 um 07:31 Uhr schrieb Chris Lindbergh <
>>> chrislindbergh at gmail.com>:
>>>> I had this working in 1.5.0p22 and am trying to get it working again in
>>>> Here's what I have at the moment on the new site; where I can manually
>>>> SSH in just fine with the line I have set up as the datasource, but cmk
>>>> fails as it can't find SSH. I even made a softlink for it:
>>>> OMD[hq]:~$ ssh -i ~/.ssh/id_rsa -l root URSAMINOR
>>>> /etc/check_mk/check_mk_agent | head
>>>> Version: 1.6.0p3
>>>> AgentOS: openwrt
>>>> AgentDirectory: /etc/check_mk
>>>> DataDirectory: /var/lib/check_mk_agent
>>>> SpoolDirectory: /var/lib/check_mk_agent/spool
>>>> PluginsDirectory: /usr/lib/check_mk_agent/plugins
>>>> LocalDirectory: /usr/lib/check_mk_agent/local
>>>> OMD[hq]:~$ cmk -v -i URSAMINOR
>>>> Doing HW/SW inventory on: URSAMINOR
>>>> + FETCHING DATA
>>>> [agent] Execute data source
>>>> [agent] ERROR: Program 'ssh' not found (exit code 127)
>>>> [piggyback] Execute data source
>>>> No piggyback files for 'URSAMINOR'. Skip processing.
>>>> No piggyback files for '192.168.4.1'. Skip processing.
>>>> + EXECUTING INVENTORY PLUGINS
>>>> Inventory was unchanged
>>>> SUCCESS - Found 1 inventory entries
>>>> OMD[hq]:~$ ls -l local/bin
>>>> total 0
>>>> lrwxrwxrwx 1 hq hq 12 Oct 12 23:22 ssh -> /usr/bin/ssh*
>>>> Why can't "cmk" find "ssh" ?
>>>> Thanks in advance for any help!
>>>> - Chris
>>>> ##### "The compassionate have no enemies, the wise have no worries."
>>>> ##### - Jing-si Aphorism
>>>> ##### http://kso.cc
>>>> checkmk-en mailing list
>>>> checkmk-en at lists.mathias-kettner.de
>>>> Manage your subscription or unsubscribe
>>> checkmk-en mailing list
>>> checkmk-en at lists.mathias-kettner.de
>>> Manage your subscription or unsubscribe
>> ##### "The compassionate have no enemies, the wise have no worries."
>> ##### - Jing-si Aphorism
>> ##### http://kso.cc
##### "The compassionate have no enemies, the wise have no worries."
##### - Jing-si Aphorism
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the checkmk-en