Check Remote Host
January 15, 2024
Ansible is a great tool to automate a lot of tasks on Linux boxes. In case that the tool is not available or there are too much hassle to set up the enviroment, and we want to do some simple checks of a list of Linux boxes from Windows, Linux or MacOS. I wrote a simple python script for this. The script is available at check-remote-host.py@GitHub.
The script checks only a few things:
- Whether a
hostname:portis open - Whether
SSHis enabled forusernameonhostname - Compare a list of
processesrunning byusernameon remote host. - Check the content of a file on remote host.
- Some of the remote tasks or scripts can be skipped by setting
skip: truefield