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

fix reusing other ssh2 instances #14

Closed bgeschka closed 6 years ago

bgeschka commented 6 years ago

When connecting to a single host on different ports, other sessions gets used than defined in the constructor. This happens due identifying instances with "user@host".

A workaround can be overwriting the uniqueId field in the constructors arguments with a custom value.

But as that is not documented, and it took a while to find the bug in my application, i find this to be the more general solution to the issue.