Download and configure 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) Generate 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.

Download cdswctl and add an SSH key

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

  1. Download cdswctl client for your operating system.
    Unpack it, and optionally, you can add it to the PATH environment variable on your system.
  2. Open the Cloudera AI web UI and go to User Settings > Remote Editing for your user account.
  3. Add your SSH public key to SSH public keys for session access.
    Cloudera AI uses the SSH public key to authenticate your CLI client session, including the SSH endpoint connection to the Cloudera AI deployment.

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