Downloading and configuring cdswctl

This topic describes how to download the cdswctl CLI client and configure your SSH public key to authenticate CLI access to sessions.

Before you begin, ensure that the following prerequisites are met:
  • You have an SSH public/private key pair for your local machine.
  • You have Contributor permissions for an existing project. Alternatively, create a new project you have access to.
  • If you want to configure a third-party editor, make sure the Site Administrator has not disabled remote editing for Cloudera AI.

(Optional) Generating an SSH public or private key

Consider these optional instructions if you do not have SSH public or private key yet.

This task is optional. If you already have an SSH public/private key pair, skip this task. The steps to create an SSH public or private key pair differ based on your operating system. The following instructions are meant to be an example and are written for macOS using ssh-keygen.
  1. Open Terminal.
  2. Run the following command and complete the fields:
    ssh-keygen -t rsa -f ~/.ssh/id_rsa
    Keep the following guidelines in mind:
    • Make sure that the SSH key you generate meets the requirements for the local IDE you want to use. For example, PyCharm requires the -m PEM option because PyCharm does not support modern (RFC 4716) OpenSSH keys.
    • Provide a passphrase when you generate the key pair. Use this passphrase when prompted for the SSH key passphrase.
    • Save the SSH key to the default ~/.ssh location.

Downloading cdswctl and adding an SSH key

Follow the instructions to download cdswctl and to add an SSH key.

  1. Select Apps in the left navigation pane on the Anywhere Cloud Console.
  2. Search for the required Cloudera AI Workbench instance.

    Ensure that the status of the instance is Deployed.

  3. Click on the name of the required instance.

    A pane opens displaying the available information for the selected instance.

  4. Click the URL of the selected Cloudera AI Workbench instance.

    The Cloudera AI Workbench home page is displayed.

  5. Go to User Settings > Access and Key > Remote Editing.
  6. Download the cdswctl CLI client applicable for your opearting system.
    Figure 1. Downloading cdswctl CLI client
  7. Add your SSH public key to SSH public keys for session access.
    Cloudera AI Workbench uses the SSH public key to authenticate your CLI client session, including the SSH endpoint connection to the Cloudera AI Workbench deployment.

    Any SSH endpoints that are running when you add an SSH public key must also be restarted.