apocas / docker-modem

Docker Remote API network stack driver.
Apache License 2.0
234 stars 112 forks source link

Support agent forwarding over SSH #118

Closed steverice closed 4 years ago

steverice commented 4 years ago

Like #117, add a common SSH option supported by ssh2. All we need to do is pass it in the constructor.

bwateratmsft commented 4 years ago

Should we consider just passing everything in options, just overriding agent with authAgent? That way, users all the way up to dockerode could take advantage of all of ssh2's options. Would need to check if there are other conflicts though.

steverice commented 4 years ago

@apocas what do you think?

apocas commented 4 years ago

I totally agree, we need to do something about these options.

Instead of passing everything that comes inside the options object since it could potentially lead to problems inside ssh2. We could just use something like "options.sshOptions", then everything that comes inside sshOptions is automatically sent to ssh in https://github.com/apocas/docker-modem/blob/master/lib/modem.js#L210. (everything inside sshOptions would be merged with {host': self.host, 'port': self.port, 'username': self.username, 'password': self.password})

This way we avoid sending a lot of stuff to ssh2 lib and there's an object exactly for that.

steverice commented 4 years ago

@bwateratmsft @apocas thoughts on #119?

apocas commented 4 years ago

Published in v2.1.3