mediachain / aleph

א: The mediachain universe manipulation engine
MIT License
38 stars 16 forks source link

Bind SSH tunnel to any open port #136

Closed yusefnapora closed 7 years ago

yusefnapora commented 7 years ago

This changes the SSH tunnel setup to bind to any available port, and rewrites the apiUrl to use the bound port before passing the RestClient to the subcommand worker functions.

This lets you tunnel to a remote node while a local node is bound to the default port, or run multiple tunneled commands in parallel.

It also removes the requirement that the sshConfig have either a password or privateKey field, which makes the tunnel lib fallback to using ssh-agent to authenticate.