Re: hi (php-SSH)
| From: | otherguy | Date: | Tue, 29 Jul 2003 04:34:22 +0000 |
| Subject: | Re: hi (php-SSH) | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29550@lists.php.net to get a copy of this message | ||
On Monday, July 28, 2003, at 10:19 PM, David Smith wrote:
Suman Aluru wrote:If you're going to go this route, I would suggest that you read up on the security issues inherent in using a non-passworded key file - and make sure that the privileges on the remote host are set accordingly. -Cameron Wilhelmhi , is there any way to write a PHP program for SSH. I want to establish a SSH connection and work some commands in the remote system and close the connection.Yes, just do this (uses an SSH key file): <?php echo "Executing remote command...<br />"; echossh -i /path/to/key/file user@host ls /tmp; echo "Done executing remote command.<br />"; ?> Use an SSH key file so you won't have to provide a password. I do this all the time for system administration, works great for inter-host communication.