exec command on remote server and store output
Moderator: General Moderators
exec command on remote server and store output
So basically I need a script to execute the command(either by ssh or php) 'ls -l' but I need to be logged in as root, and than I want to store the output data in a variable $output. Any ideas how to do it?
Re: exec command on remote server and store output
This sounds like a bad idea. What is it you're trying to accomplish?dmallia wrote:So basically I need a script to execute the command(either by ssh or php) 'ls -l' but I need to be logged in as root, and than I want to store the output data in a variable $output. Any ideas how to do it?
Re: exec command on remote server and store output
well i will be using it mainly for screen not for ls -l. I need to make sure that there is no screen with the same name as the one that is gong to be executed only if there is no screen already with that name.