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

Nested tunnel connection will need "sock" instead of "host" configuration. #19

Closed lianghwajou closed 5 years ago

lianghwajou commented 5 years ago

Will need to use {sock: stream} instead of {host: host} in ssh configuration in order to build a nested tunnel.

ssh2-promise@0.1.2 sshConnections.js

connect(c) {^M this.config = Object.assign(this.config, c);^M ++this.retries;^M if (this.$connectPromise != null)^M return this.$connectPromise;^M this.$connectPromise = new Promise((resolve, reject) => {^M this.emit(sshConstants_1.default.CHANNEL.SSH, sshConstants_1.default.STATUS.BEFORECONNECT);^M

sanketbajoria commented 5 years ago

@lianghwajou Please, feel free to open PR for this.

lianghwajou commented 5 years ago

Submitted a pr https://github.com/sanketbajoria/ssh2-promise/pull/21

sanketbajoria commented 5 years ago

@lianghwajou Sorry didn't much time to review it. I will merge it, in next few days.

sanketbajoria commented 5 years ago

@lianghwajou Published new version, with your merge request. 👍