php - ssh2_exec wget won't work -
i want download file using ssh2_exec. things xdotool work wget/pkill don't.
here's code
function __construct($host, $user, $pw, $port) { $this->sshc = ssh2_connect($host, 22); ssh2_auth_password($this->sshc, $user, $pw); } function downloadfile() { ssh2_exec($this->sshc, "wget http://path/to/file"); }
try using absolute paths programs (/usr/bin/wget
). can find full paths puttying in , running:
which wget
also take @ output stdout
, stderr
streams in order further debug problems.
Comments
Post a Comment