I would like to check if given server is online and given service is active — or maybe even simpler, if given port is open.
Something like this:
port_check my_server 22
or
service_check my_server ssh
And I would get a binary answer — yes/no, meaning everything is OK, or there is no connection (server is down, or the service is not active).
I have to run this tool from ordinary user account (non-root). The question is — what is the tool? Thank you in advance for help.
Edit: please note, I have to get binary answer, which means any interactive tool, or tool that tries to log in first is no good. It should be basically a ping but for any service.
telnetis that tool.check.shrunning –
check.sh localhost <port>Note that the service listening the port will be touched.