--- title: "Migrate existing Snowflake user to key-pair" slug: "migrate-existing-snowflake" updated: 2025-08-20T13:35:14Z published: 2025-08-20T13:35:14Z canonical: "docs.hunters.ai/migrate-existing-snowflake" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.hunters.ai/llms.txt > Use this file to discover all available pages before exploring further. # Migrate existing Snowflake user to key-pair --- ### 1. Generate the key pair Run the following commands on a workstation with OpenSSL installed: ```plaintext openssl genrsa 2048 | openssl pkcs8 -topk8 -v2 des3 -inform PEM -out rsa_key.p8 openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub ``` During execution, you will be prompted to set a password. You will need this password later on the platform. Two files will be generated: `rsa_key.p8` and `rsa_key.pub`. --- ### 2. Configure the public key in Snowflake Log in to your Snowflake dashboard and run the following queries (replace the value with the actual contents of `rsa_key.pub`): ```plaintext USE ROLE SECURITYADMIN; ALTER USER PC_HUNTERS_DB_COLLECTION_USER SET RSA_PUBLIC_KEY = 'MIIBIjANBgkqh...'; ``` --- ### 3. Update the configuration in Hunters 1. Open the Hunters portal. 2. Go to the **Data Sources** page. 3. Find the Snowflake data source, click the three dots (⋮), and select **Edit**. 4. Set the **Private Key** field to the entire contents of `rsa_key.p8`, including the lines: ```plaintext -----BEGIN ENCRYPTED PRIVATE KEY----- ... -----END ENCRYPTED PRIVATE KEY----- ``` 5. Set the **Private Key Passphrase** to the password you used when generating the key pair with OpenSSL. 6. Click **Test Connection**, then **Save**.