[Check_mk (english)] CRIT - Agent exited with code 255: Pseudo-terminal will not be allocated because stdin is not a terminal.

Hi,

I’m trying to use ssh to monitor my linux hosts. I followed the instructions for generating ssh keys here: http://linuxproblem.org/art_9.html

and prepended the command: command="/usr/bin/check_mk_agent" to the beginning of my entry in authorized_keys on my target.

When I ssh to the target from the server, it correctly uses the key with prepended command, and displays the output of the check_mk_agent.

However, I can’t seem to get this functionality to work using the GUI.

Using WATO::Parameters of host:: Data Source Programs:

In the line “Individual program to call instead of agent access” I have entered:

ssh -l MyUser -i /opt/omd/sites/MySite/etc/check_mk/check_mk_MyUser.key

When I run this command from the terminal, I get the same output as when I simply run ssh MyUser@IP.

The error I’m getting in the GUI is:

CRIT - Agent exited with code 255: Pseudo-terminal will not be allocated because stdin is not a terminal.

Thanks in advance,

Marc

Hello Marc,

did you also from the user MySite? The fingerprint has to be in the ~/.ssh/known_hosts, otherwise you will get that message.

Or you trust all ssh connections with following in the program call:

ssh -o StrictHostKeyChecking=no -l Siteuser

Since the command is bound to the ssh-key, I enabled it in a closed environment.

I have this working in the GUI perfectly since many versions up to CEE 1.2.8p9

Regards

Alexander

···

Von: checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Marc Bruell
Gesendet: Samstag, 5. November 2016 14:51
An: checkmk-en@lists.mathias-kettner.de
Betreff: [Check_mk (english)] CRIT - Agent exited with code 255: Pseudo-terminal will not be allocated because stdin is not a terminal.

Hi,

I’m trying to use ssh to monitor my linux hosts. I followed the instructions for generating ssh keys here:
http://linuxproblem.org/art_9.html

and prepended the command: command="/usr/bin/check_mk_agent" to the beginning of my entry in authorized_keys on my target.

When I ssh to the target from the server, it correctly uses the key with prepended command, and displays the output of the check_mk_agent.

However, I can’t seem to get this functionality to work using the GUI.

Using WATO::Parameters of host:: Data Source Programs:

In the line “Individual program to call instead of agent access” I have entered:

ssh -l MyUser -i /opt/omd/sites/MySite/etc/check_mk/check_mk_MyUser.key

When I run this command from the terminal, I get the same output as when I simply run ssh MyUser@IP.

The error I’m getting in the GUI is:

CRIT - Agent exited with code 255: Pseudo-terminal will not be allocated because stdin is not a terminal.

Thanks in advance,

Marc

Thanks Wilke! Getting the fingerprint into known_hosts was the issue.

Have a great rest of the weekend!

Marc

···

On Sun, Nov 6, 2016 at 2:47 AM, Wilke Alexander Wilke@iabg.de wrote:

Hello Marc,

did you also from the user MySite? The fingerprint has to be in the ~/.ssh/known_hosts, otherwise you will get that message.

Or you trust all ssh connections with following in the program call:

ssh -o StrictHostKeyChecking=no -l Siteuser

Since the command is bound to the ssh-key, I enabled it in a closed environment.

I have this working in the GUI perfectly since many versions up to CEE 1.2.8p9

Regards

Alexander

Von: checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de]
Im Auftrag von Marc Bruell
Gesendet: Samstag, 5. November 2016 14:51
An: checkmk-en@lists.mathias-kettner.de
Betreff: [Check_mk (english)] CRIT - Agent exited with code 255: Pseudo-terminal will not be allocated because stdin is not a terminal.

Hi,

I’m trying to use ssh to monitor my linux hosts. I followed the instructions for generating ssh keys here:
http://linuxproblem.org/art_9.html

and prepended the command: command=“/usr/bin/check_mk_agent” to the beginning of my entry in authorized_keys on my target.

When I ssh to the target from the server, it correctly uses the key with prepended command, and displays the output of the check_mk_agent.

However, I can’t seem to get this functionality to work using the GUI.

Using WATO::Parameters of host:: Data Source Programs:

In the line “Individual program to call instead of agent access” I have entered:

ssh -l MyUser -i /opt/omd/sites/MySite/etc/check_mk/check_mk_MyUser.key

When I run this command from the terminal, I get the same output as when I simply run ssh MyUser@IP.

The error I’m getting in the GUI is:

CRIT - Agent exited with code 255: Pseudo-terminal will not be allocated because stdin is not a terminal.

Thanks in advance,

Marc

--- **Industrieanlagen-Betriebsgesellschaft mbH**

Sitz der Gesellschaft: Ottobrunn, Registergericht: Amtsgericht München, HRB 5499

Geschäftsführung: Prof. Dr.-Ing. Rudolf F. Schwarz

Vorsitzender des Aufsichtsrats: RA Engelbert Kupka MdL a.D.