Skip to content
Workspaces

Connect to a workspace

Open a workspace in JupyterLab, the SQL Editor, Snowsight or your own SQL client, and set up Snowflake key-pair authentication for third-party tools.

This page shows how to open a workspace once it exists, by workspace type and by tool. If you have no workspace yet, create one first.

Goal: the workspace open in the tool that fits it: JupyterLab, the SQL Editor, Snowsight, or your own SQL client.

Open the workspace detail, then follow the tab for your workspace type or tool:

To connect to a JupyterLab (opens in a new tab) workspace with the associated kernel (Python, R), use the URL and the password provided in the Credentials link. Use the Connect button to directly open the JupyterLab interface.

Workspace - Python/R

If JupyterLab shows a Server Connection Error, the workspace has been terminated. Go to the list of workspaces in Keboola, resume the workspace and reconnect from there.

Result: you are in the workspace. JupyterLab, the SQL Editor or Snowsight is open in your browser, or your client is connected with the credentials from the workspace detail.

Use a Snowflake key pair with your own tools

Section titled “Use a Snowflake key pair with your own tools”

Goal: a database client or BI tool connected to a Person type Snowflake workspace with key-pair authentication, with the private key in the form the tool needs.

  1. In the workspace detail, click the Workspace ID value to open Workspace Credentials (Host, User, Key Pair, Database, Schema, Warehouse). Under Key Pair, either click Reset Key Pair and confirm with Reset Private Key, so that Keboola generates a new key pair and downloads the private key (the previous key pair stops working), or click Use Own Key to set your own public key.

  2. Get the private key into the form your tool needs. The options below are alternatives, not a sequence: each one starts from the unencrypted private key that Reset Private Key downloaded (the commands below call it private_key.pem). If you used Use Own Key, your tool already has your own private key.

    • The tool accepts a .pem key: store it in a password manager, or encrypt it if you keep it on disk.
    • The tool needs a .p8 key: convert it. The .p8 file is not encrypted.
    • The tool needs a passphrase-protected key: you can encrypt it as above, or bring your own key pair instead.
  3. Set up key-pair authentication in your tool. Below are links to documentation for popular database IDEs used by Keboola users that support Key Pair authentication.

    Workspace Credentials shows the values the tool needs besides the private key: Host, User, Database, Schema and Warehouse. Where the tool asks for an account identifier, use the Host without .snowflakecomputing.com. No role is shown, and you do not need to set one.

Result: the tool connects to the workspace with the key pair.

When Keboola generates the key pair, the private key is unencrypted, so we recommend using password management tools like Keepass (opens in a new tab) or 1Password (opens in a new tab) to store your private key for better security. In case you need to store the private key locally and want to protect it from unauthorized access, encrypt it using OpenSSL (opens in a new tab).

  1. Open a terminal On Windows, make sure OpenSSL is installed (e.g., via WSL (opens in a new tab) or Windows binaries (opens in a new tab)), and open PowerShell or Command Prompt.

  2. Run

    Terminal window
    openssl pkcs8 -in private_key.pem -topk8 -v2 aes-256-cbc -out private_key_encrypted.pem
    • -in private_key.pem → input file
    • -topk8 → outputs in PKCS #8 format
    • -v2 aes-256-cbc → encryption algorithm
    • -out private_key_encrypted.pem → encrypted key file
  3. Set a password when you are prompted for it

Some third-party tools (such as SAS CI360) require a passphrase-protected private key. Keboola only needs the public half of the pair, so you can create it yourself and register just the public key.

  1. Generate the pair as follows (on Windows, with OpenSSL installed as described above). You’ll be prompted to set a passphrase:

    Terminal window
    openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -aes-256-cbc -out private_key_encrypted.pem
    openssl rsa -in private_key_encrypted.pem -pubout -out public_key.pem
  2. To register the key, click the Workspace ID value in the workspace detail to open Workspace Credentials, and use Use Own Key next to Reset Key Pair, then paste the contents of public_key.pem or drop the file onto the field.

The key must be an RSA key of at least 2048 bits, in PEM (-----BEGIN PUBLIC KEY-----) or base64-encoded DER format. Convert a PKCS #1 key with openssl rsa -RSAPublicKey_in -in public_key.pem -pubout, or an OpenSSH one with ssh-keygen -e -m PKCS8 -f public_key.pub.

Some third-party BI tools (such as Metabase) require private keys in .p8 format instead of the default .pem format provided by Keboola. You can convert your private key using OpenSSL.

  1. Open a terminal. On Windows, make sure OpenSSL is installed (e.g., via WSL (opens in a new tab) or Windows binaries (opens in a new tab)), and open PowerShell or Command Prompt.

  2. Run:

    Terminal window
    openssl pkcs8 -topk8 -inform PEM -outform DER -in private_key.pem -out private_key.p8 -nocrypt
    • -topk8 → outputs in PKCS #8 format
    • -inform PEM → input format is PEM
    • -outform DER → output format is DER
    • -in private_key.pem → input file
    • -out private_key.p8 → output file
    • -nocrypt → no encryption

Next: SQL Editor →

Ask Kai

Hi, I'm Kai — Keboola's AI assistant for the docs. Ask me anything and I'll answer from the documentation and cite the pages I use.

Kai is an AI and can make mistakes. Check the sources it links.