Hi, i'm trying to do this :
And i have "cmd 1 ok" in my logs, but when i go in the container $lxcid, nothings were append in the target file
I precise, i can't use ssh to type the command, it's for automatic task just after the creation of the container and to automatically give root access to the user with his password
Code:
$params = array("commands" => json_encode(array( "pct exec ". $lxcid." -- bash -c 'echo PermitRootLogin Yes >> /etc/ssh/sshd_config'" ))));
if($pve->post("/nodes/proxmox/execute/", $params){
echo '{"result": "good", "desc": "cmd 1 ok"}';
}else{
echo '{"result": "error", "desc": "error during command ssh"}';
}
And i have "cmd 1 ok" in my logs, but when i go in the container $lxcid, nothings were append in the target file
I precise, i can't use ssh to type the command, it's for automatic task just after the creation of the container and to automatically give root access to the user with his password
Last edited: