To give background on my environment:
I have 3 machines A, B & C
A = Webserver, running a php website which basically acts as an interface for B & C
B = Linux Ubuntu machine, i have root access, SSH and all the needed goodness to work on the machine via a SSH client (i have a .ppk private key file for this server)
C = MySql Database server running on Linux
I can successfully execute queries from A (php) on C (Mysql) and return the results. But now im trying to execute linux commands on B from A.
Eg.
I have a script thats running on B and would like to execute a command from A (php) to show the status of the script.
In Command line to do this is easy - ./SomeScript status
But i want to show the status of this script in the website im hosting on Server A.
Even just check the uptime of Server B on Server A.
Is this in anyway possible. i have googled forever as it seems but im not getting anywhere, Im not too phased if the connection is secure or not as this is a closed network with no outside access to this network.
Any advise would be highly appreciated.
Thanks
B
that gives specific information such as uptime, and can allow running specific programs? You will want to have the script check that the IP is indeed from serverA
though.