Skip to main content

Connecting to a workstation via SSH from MacOS, Linux, and WSL

Configure your account for SSH access

To connect to a workstation with SSH, you must first create a SSH key and upload it to your account. Follow these instructions.

Install OpenSSL and SSH

The connection instructions below require the OpenSSL package and an SSH client. Most Linux distributions and MacOS provide OpenSSL and SSH by default.

Run the following system commands to verify that your computer has OpenSSL and SSH.

openssl version
ssh -V

If your computer does not have OpenSSH or an SSH client, use your computer's package manager, such as apt, to install them.

Connect to a workstation

  1. Copy the SSH connection command for your workstation.

    1. Navigate to the workstations overview page.

    2. Locate the workstation that you would like to connect to.

    3. Click the workstation's "Connect" button. This will open a drop-down menu with the connection options for the workstation.

    4. Click the "SSH" button in the drop-down menu. This will open a dialog box which contains instructions for connecting to the workstation.

    5. Click the "Linux & MacOS" tab in the dialog box.

    6. Click the last "Copy to clipboard" button to copy a shell command for connecting to the workstation.

      SSH connection command
      ssh -o ProxyCommand="openssl s_client -quiet \
      -connect {compute-cluster-id}.bench.deeporigin.io:2222 \
      -servername {workstation-id}-{blueprint-id}.org-{org-id}" bench-user@{workstation-id} \
      -i {ssh-private-key-file}
  2. Replace ssh-private-key-file in the copied shell command with the path to your SSH private key file.

  3. Optional: If you copied the shell command from this documentation page, replace the following variables:

    • org-id: Replace with the ID of your organization, such as acme-bio.
    • workstation-id: Replace with the ID of your workstation, such as exceptional-panda-g1i.
    • blueprint-id: Replace with the ID of the blueprint, such as python.
    • compute-cluster-id: Replace with the ID of your compute cluster, such as us-west-2.aws.
  4. Enter the command modified in Step 2 above into a terminal.

Optionally, configure your SSH client to enable simpler commands for connecting to workstations

To enable simpler commands for connecting to workstations, first follow the instructions below to add an entry for the Deep Origin OS to your SSH configuration. This step only needs to be completed once for each computer.

  1. Open a text editor such as Emacs, gedit, nano, vi, or Vim.

  2. Within your text editor, open or create your SSH configuration file, typically ~/.ssh/config.

  3. Append the following snippet to the end of your configuration file, replacing the following variables

    • compute-cluster-id: Replace with the ID of your compute cluster, such as us-west-2.aws.
    • ssh-private-key-file: Replace with the path to your SSH private key file.
    SSH configuration file snippet
    Host  *.{compute-cluster-id}.bench.deeporigin.io
    ProxyCommand openssl s_client -quiet -connect {compute-cluster-id}.bench.deeporigin.io:2222 -servername `echo %h | sed s/\.{compute-cluster-id}\.bench\.deeporigin\.io$//g`
    User bench-user
    IdentityFile {ssh-private-key-file}
  4. Save your SSH configuration file.

Once you have added an entry for the Deep Origin OS to your SSH configuration file, use the following shell command to connect to any workstation, replacing the following variables:

  • org-id: Replace with the ID of your organization, such as acme-bio.
  • workstation-id: Replace with the ID of your workstation, such as exceptional-panda-g1i.
  • blueprint-id: Replace with the ID of the blueprint, such as python.
  • compute-cluster-id: Replace with the ID of your compute cluster, such as us-west-2.aws.
SSH connection command after advanced configuration
ssh {workstation-id}-{blueprint-id}.org-{org-id}.{compute-cluster-id}.bench.deeporigin.io

To suppress additional debugging output from OpenSSL, we recommend adding the -verify_quiet flag to the above configuration after the -quiet flag. Note, some distributions do not support this option.

Connecting with WSL on Windows

We recommend that Windows users use Windows Subsystem for Linux (WSL) to connect to workstations. WSL enables Windows users to use Linux natively within Windows without using a virtual machine or dual booting.

To use WSL to connect to workstations, first follow Microsoft's WSL installation guide and then follow the instructions for Linux and MacOS above.

info

Note, within WSL, keys generated with Windows PowerShell are typically located in /mnt/c/Users/%USERPROFILE%/.ssh/. Keys downloaded with your web browser will typically be located in /mnt/c/Users/%USERPROFILE%/Downloads/.