The module crash the application when copying file to a machine without sftp, even when called with yield inside try-catch statement or with listening to scp.on('error', cb):
Error: Unable to start subsystem: sftp
at /.../node_modules/scp2/node_modules/ssh2/lib/client.js:1283:19
at SSH2Stream.<anonymous> (/.../node_modules/scp2/node_modules/ssh2/lib/Channel.js:185:24)
at emitNone (events.js:86:13)
at SSH2Stream.emit (events.js:185:7)
at parsePacket (/.../node_modules/scp2/node_modules/ssh2-streams/lib/ssh.js:3225:10)
at SSH2Stream._transform (/.../node_modules/scp2/node_modules/ssh2-streams/lib/ssh.js:551:13)
at SSH2Stream.Transform._read (_stream_transform.js:167:10)
at SSH2Stream._read (/.../node_modules/scp2/node_modules/ssh2-streams/lib/ssh.js:212:15)
at SSH2Stream.Transform._write (_stream_transform.js:155:12)
at doWrite (_stream_writable.js:307:12)
at writeOrBuffer (_stream_writable.js:293:5)
at SSH2Stream.Writable.write (_stream_writable.js:220:11)
at Socket.ondata (_stream_readable.js:555:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:172:18)
The module crash the application when copying file to a machine without sftp, even when called with yield inside try-catch statement or with listening to scp.on('error', cb):