Re: run remote shell script
| From: | Matthew Weier O'Phinney | Date: | Wed, 17 Aug 2005 14:40:26 +0000 |
| Subject: | Re: run remote shell script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-220748@lists.php.net to get a copy of this message | ||
* Roger Thomas <sniper@home.net.my>:
> My PHP script is in svrA. How do I run a shell script in svrB?
> svrB does not have PHP and Apache :(
> Is this at all possible? Please advise.
Use ssh. You will have to setup remote key authentication from svrA to
svrB (so that a password will not be needed), and then in your script
you would call:
system('ssh svrB /path/to/scriptToRun');
--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/