Set Up Key-Pair Authentication for Snowflake Data Warehouse

You can create a key-pair to authenticate a connection to Snowflake Data Warehouse.

  1. Open a local terminal window.
  2. Create a private key using this command:
    openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt
  3. Create a public key using this command:
    openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
  4. Log into your Snowflake account and create a SQL worksheet.
  5. Assign the public key to a Snowflake user.
    ALTER USER <user> SET RSA_PUBLIC_KEY = <public key>;
  6. Verify the assigned public key of the Snowflake user using this command:
    DESCRIBE USER <user>;