I have this command and it works fine on shell. I want to run it with php but it does not work what i missed :
edited :
$arg="arg1";
$arg2= "arg2";
echo shell_exec("sshpass -p ".escapeshellarg($arg)." ssh -t root@00.00.00.00 'asterisk -rx ".escapeshellarg($arg2)."'");
after this change no error on output but still commande not executed
edited : the original commande is like this :
sshpass -p 'arg1' ssh -t root@00.00.00.00 'asterisk -rx "arg2"'
and i want to around the probleme with external parameters but it does not work