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.
This changes the SSH tunnel setup to bind to any available port, and rewrites the
apiUrl
to use the bound port before passing theRestClient
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 apassword
orprivateKey
field, which makes the tunnel lib fallback to using ssh-agent to authenticate.