sanketbajoria / ssh2-promise

ssh with promise/async await and typescript support
https://www.npmjs.com/package/ssh2-promise
MIT License
148 stars 25 forks source link

Silent failure if netcat is not installed #59

Closed carlpett closed 3 years ago

carlpett commented 3 years ago

If nc is not installed on the target, this part of connect fails, but does not appear to set any errors: https://github.com/sanketbajoria/ssh2-promise/blob/930f5f20217c052a50e2e4ade74edcf38d12d4f7/src/index.ts#L176-L178

It also appears that in multihop usage, if the next hop is not available, it also silently fails without setting an error.

Are either of these solvable?

sanketbajoria commented 3 years ago

@carlpett Yes, currently it require nc on linux machine. Will be fixing this issue...

sanketbajoria commented 3 years ago

Fixed it.. @carlpett now you can get proper error. Added another option, to choose hopping tool between nc, socat and native.