Skip to content

Automate remote ssh kernel setup and connection #358

@jacksund

Description

@jacksund

Hello! This is a feature-request, but I hope opening an issue is fine.

EDIT: The original issue has been rewritten for clarity

Current implementation

Users must follow along with the remote kernel tutorial. This involves...

  1. manually signing in to a remote cluster (ssh)
  2. starting a kernel with python -m spyder_kernels.console
  3. starting a separate terminal / file-transfer window to find the connection json file
  4. copying the connection_info json file to local computer
  5. use Spyder's remote kernel dialog to (a) give the file and (b) rewrite ssh info.

Problem

The steps above can be very tedious because it involves multiple terminal and file transfers. In most cases, I'll just stick with ipython on the remote cluster, rather than using Spyder.

Possible Solutions

  1. (partial solution) Have python -m spyder_kernels.console print out the connection json, which can be copied directly into the Spyder dialog. It'd be an alternative to selecting a file here:
    image

  2. From the spyder dialog, pass the SSH connection information to fabric. Then use fabric to run python -m spyder_kernels.console and grab the connection info. Spyder then starts a new console using this connection info and the original SSH connection.

For solution 1 --> Based on the ipython recipe, it might be possible by having spyder call %connect_info as soon as the kernal is started. I know very little about kernels though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions