I need to execute a bash script via a front end Ajax/PHP Site. I have looked into SSH2 and for the life of me can not get it installed.
Now, I know you can use shell_exec but this throws up problems such as authenticating password etc, I can not use SSH keys as the point is it will be deployed in an environment were there are too many servers to event contemplate doing that.
I need a way to create a PHP variable and assign the value of that variable to the output of a bash script on a remote server (IP/Pass) are user input (Security is not a concern, this will be on a locked down local intranet machine only accessible from 1 IP)
I did try sshpass, but that does not seem to return any output.
Does anyone know of a way of doing this?