JustinK101 Posted May 15, 2010 Share Posted May 15, 2010 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 More sharing options...
trq Posted May 15, 2010 Share Posted May 15, 2010 See ssh. Though you may not actually need it just to execute a simple script. Root login should never be allowed through ssh though. Link to comment https://forums.phpfreaks.com/topic/201819-execute-shell-script-from-php/#findComment-1058602 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.