mikeal / sequest

Simplified API for SSH and SFTP similar to request.
283 stars 24 forks source link

Proxy ssh #11

Closed jcrugzz closed 10 years ago

jcrugzz commented 10 years ago

@mikeal so i got proxied ssh to work with simply passing a proxy option string such as root@myIp.com. Let me know if you have any critiques on this but this seemed to be the simplest abstraction.

The next big thing here comes down to how we are going to have this actually tested since it does require a intermediary server to hop through.

mikeal commented 10 years ago

What does the API look like? Can you update the README?

jcrugzz commented 10 years ago

@mikeal added a little section. Its nothing special api wise, I just wanted to get the functionality there at least in an option (like in request).

jcrugzz commented 10 years ago

Hmm i did figure out the streaming example does not work but the callback version does. Ill see if I can see why that is. (for proxying at least, all tests still pass)

mikeal commented 10 years ago

so, we're reusing the private key resolution for both the proxy and the remote host?

jcrugzz commented 10 years ago

@mikeal Yea, we can make that configurable but seemed simplest to start

mikeal commented 10 years ago

maybe just do proxy: 'root@72.9.543.901' for this case but support proxy: {host:'root@72.9.543.901, privateKey: key}'

jcrugzz commented 10 years ago

@mikeal yea I can dig it. default to that key but allow one specified with config. Ill make the change.

mikeal commented 10 years ago

we definitely need a test for this as well :)

mikeal commented 10 years ago

actually, if you know this works let's just merge it but wait on the next release until there is a test.