I'm trying to do basic stuff with ssh2(https://www.npmjs.org/package/ssh2) but I don't get any result and the api ain't that understandable (for me), I'm trying to do basic shell commands like ls,pwd .. but ive no results. I tried this to get ls -lah via shell,
c.on('ready', function() {
c.shell('ls','lah', function(err,stream) {
if (err) throw err;
stream.on('ls', function(data, extended) {
console.log(data);
console.log(extended);
});
});
});
can someone direct me what im doing wrong or how it supposed to work ? btw there no connection problem.
thanks