Skip to content

Support port forwarding in SSHCluster #3881

Open
@jacobtomlinson

Description

@jacobtomlinson

Some users may have SSH access to a machine and want to use SSHCluster with it, but are not able to access ports other than 22 due to firewall restrictions.

It would be nice to be able to forward the scheduler ports locally through the SSH tunnel.

This would require:

  • Add kwargs to SSHCluster to specify local port forwards
  • Set up port forward in scheduler object after connection is made (docs)
  • Set the scheduler address to the locally forwarded port here

Example

>>> from dask.distributed import Client, SSHCluster
>>> cluster = SSHCluster(
...     ["host1", "host2", "host3", "host4"],
...     forward_scheduler_port=8786,
...     forward_dashboard_port=8787
... )
>>> client = Client(cluster)

There is an assumption here that the restrictive firewall rules would not limit worker-scheduler and worker-worker communication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprove existing functionality or make things work bettergood second issueClearly described, educational, but less trivial than "good first issue".

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions