Patch for check_by_ssh - Add option to force pseudo tty allocation

Skibbe, Oliver Oliver.Skibbe at mdkn.de
Wed Nov 26 10:15:24 CET 2014


Hey,

because i've needed a pseudo tty for running sudo via ssh, i created a small patch for check_by_ssh

It introduces a new option "-z" which adds

     -t      Force pseudo-tty allocation.  This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services.  Multiple -t options
             force tty allocation, even if ssh has no local tty.


While using this new option, you have to set -E because on STDERR appears:
Connection to $IP closed.

Maybe there is a better way to surpress this message but i'm not this deep in C.


Let me know if you're interested.


Mit freundlichem Gruß
Oliver Skibbe

Medizinischer Dienst der Krankenversicherung Niedersachsen | MDKN
Geschäftsbereich Zentrale Dienste Informationstechnologie

Oliver Skibbe
Systemadministrator
Hildesheimer Straße 202-206
30519 Hannover
Tel: +49 (0) 511 8785 4321

Oliver.Skibbe at mdkn.de<mailto:Oliver.Skibbe at mdkn.de> | http://www.mdk-niedersachsen.de<http://www.mdk-niedersachsen.de/>
________________________________

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20141126/01852054/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_by_ssh_force-tty.patch
Type: application/octet-stream
Size: 2518 bytes
Desc: check_by_ssh_force-tty.patch
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20141126/01852054/attachment.obj>


More information about the Devel mailing list