gulp-ssh icon indicating copy to clipboard operation
gulp-ssh copied to clipboard

See command output on terminal

Open 3m0 opened this issue 11 years ago • 5 comments

I'm running a command via ssh that I really have to see the output. Is it possible to log it to the console, maybe through an data event?

3m0 avatar May 15 '15 18:05 3m0

Yes, do it by data event

zensh avatar May 16 '15 02:05 zensh

Hi, Have you some example to show output of command/s ?

beinnova avatar Jun 20 '15 15:06 beinnova

gulp.task('sftp-read', function () {
  return gulpSSH.sftp('read', 'pm2.json')
    .on('data', function (file) { console.log(file.contents.toString()) })
    .pipe(gulp.dest(''));
});

zensh avatar Jun 21 '15 00:06 zensh

Thanks!

beinnova avatar Jun 21 '15 17:06 beinnova

I have a gulp task in a server that executes a watch and all that, cool, but i can't see the log output of it, it never returns the shell logs until the command executed exits, which never happens in a watch command, and to exit the watch i have to exit the shell locally thus not getting any data events.

Is there a way to log the server ssh logs in a 1:1 way? not waiting for the exit of the executed command?

luchillo17 avatar Feb 19 '16 15:02 luchillo17