steelbrain / steelbrain/node-ssh
Undesired timeout right after streaming command ends
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported behavior with NodeSSH.connect and ssh.exec, including readyTimeout and the onStdout callback. Trace how command completion and timeout output are handled; done means a completed streaming command no longer prints an unexpected TIMEOUT.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100