Jump to content

Execute Shell Script From PHP


JustinK101

Recommended Posts

What is the best way to execute a linux shell script on a remote server directly from php. So this would assume ssh'ing into a server, and then executing a script. Is is then possible?

 

pseudocode

<?php
      $ssh_handle = ssh("12.34.56.78", 'root', 'password');
      execute("/home/myscript.sh", $ssh_handle);
?>

Link to comment
https://forums.phpfreaks.com/topic/201819-execute-shell-script-from-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.