----- Original Message ----- From: "Sethi, Samir (IDS DM&DS)" <[EMAIL PROTECTED]> To: "Victor Alvarez" <[EMAIL PROTECTED]> Sent: Monday, September 27, 2004 5:47 PM Subject: RE: [PHP] how to execute a remote command from php
Exactly, I had to generate keys for nobody and now I am able to execute remote commands. Thank you so much. Victor. I think when you execute the command it is run as user nobody. You may need to generate keys for the nobody account and update the authorized keys on the remote system. Samir. -----Original Message----- From: Victor Alvarez [mailto:[EMAIL PROTECTED] Sent: Monday, September 27, 2004 12:35 PM To: [EMAIL PROTECTED] Subject: [PHP] how to execute a remote command from php Hello, Since last week I am trying to execute a remote machine command from php without success. Since ssh ask for a password, I managed to use ssh with dsa authentication so it's possible to call the remote command without password and only with one line: ssh -l victor 192.168.129.211 -i /root/.ssh/id_dsa "whoami". It works perfectly from command line but I have nothing if I try to do the same from php: exec("ssh -l victor 192.168.129.211 -i /root/.ssh/id_dsa \"whoami\"",$results); $results is empty after the execution. I wonder if somebody could answer this question. I have found no solution googling it. Thank you. Regards, Victor. -------------------------------------------------------- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ -------------------------------------------------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php