Hey All:
Interesting problem that I haven't been able to solve using google. I want
to move a file from my system using php, and I want to SCP it to another
system. I setup the 2 keys and I can SCP files w/o using a password from the
command line with no problem. When I take the same string that I jsut used
to scp the file and run it using exec, system, passthru it doesn't work!!
I'm baffled and was hoping someone had successfully done this before.
Here is a chunk of code:
$address = www.url.com;
$value = "foldername";
if ($urlStatus == "Stopped") {
$cmd = "scp /home/dev.site.com/mail_admin/commands/remove
".$gs['address'].":/home/www/$value/command";
echo " ".$cmd."<br>";
exec($cmd, $tmp, $rtmp);
print_r($tmp); echo $rtmp;
echo "<br><br>";
}
TIA for anyone who has done this and knows the answer!!!
-Matt