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

Popular posts from this blog

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -