Using node-ssh
JS library, one can execute remote commands. Is it possible to get streamed output from a long-running command, as it is generated? (Without waiting the command to end).
The example in the project page suggests you can only get stdout and stderr once the command is done:
ssh.execCommand('hh_client --json', { cwd:'/var/www'})
.then(function(result) {
console.log('STDOUT: ' + result.stdout)
console.log('STDERR: ' + result.stderr)
})
via herchu
No comments:
Post a Comment