I'm working on a Laravel app and would need to send a SSH command to a remote server from my webapp. I know envoy can be used to this but this is not a good solution for me as envoy allows only to send a predefined command to a predefined list of servers.
In my case, I need to send a SSH command to a remote server when clicking on a button in my webapp to the IP address of a remote server that can be found on a label in the webapp.
Any suggestions?
I think it is always a good idea to stick to the language standard library if it provides the functionality you need. Please have a look at: http://php.net/manual/en/function.ssh2-exec.php