node-ssh
node-ssh copied to clipboard
Undesired timeout right after streaming command ends
Hi, Trying to use node-ssh in our project. Looks like it's exactly what we need, thanks for your effort! My code is below.
const ssh = new NodeSSH();
ssh
.connect({
host: ip,
port: port,
username: username,
password: password,
readyTimeout: 99999,
})
.then(() => {
ssh.exec(myCommand, [], {
onStdout(chunk) {
console.log(chunk.toString('utf8'));
}
});
});
It displays output chunks in streaming manner. However, right after command finishes, it prints,
TIMEOUT
Bye...
Should I set a timeout for the ssh session? How?
Regards