0% found this document useful (0 votes)
6 views2 pages

Steps To Create Rsa Key

The document outlines the steps to create an RSA key, including generating a private key, converting it to PKCS8 format, and generating a public key. It also details how to set the public key in Snowflake and use it for Python connections. Each step includes specific command line instructions and outputs for clarity.

Uploaded by

golharsonali360
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Steps To Create Rsa Key

The document outlines the steps to create an RSA key, including generating a private key, converting it to PKCS8 format, and generating a public key. It also details how to set the public key in Snowflake and use it for Python connections. Each step includes specific command line instructions and outputs for clarity.

Uploaded by

golharsonali360
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

STEPS TO CREATE RSA KEY

Step 1: Generate Private Key (run on command prompt)


- openssl genrsa -out File_name.pem 2048

output: File_name.pem

Step 2: Convert to PKCS8 Format (.p8) (run on command prompt)


openssl pkcs8 -topk8 -inform PEM -outform PEM ^

-in File_name.pem ^

-out File_name.p8 -nocrypt

Output: File_name.p8

Step 3: Generate Public Key(run on sommand prompt)


openssl rsa -in File_name.pem -pubout -outform DER -out swapnil_public.der

certutil -encode File_name.der File_name.txt

output: File_name.txt

Step 5: Set Public Key in Snowflake


QUERY- ALTER USER user_name

SET RSA_PUBLIC_KEY='PASTE_PUBLIC_KEY_HERE';

ALTER USER SONALIGOLHAR360

SET RSA_PUBLIC_KEY='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArUdQPl2flu+5VQ+S+3lb

0lXCT34u+oBdIfwCx/yMmvCu4KuCae5Q6+4Lfx/L+wSuZscCVdm4DcOW0aMMBITa

LUmp1yGKWwNLM4rCrDCzB67Qsibl4clpaJZG2lFdevWrayJV/MhfOH0GUHjYGFIP

FxpCmiuJ/5qxoOimoxXJDcOqpTso/ckN/r0VrCpuUKTRAlg01u4sFZQH2SnJALpw

vjdZBZL+i2YeQqBDvJZSp4Tx2N8rWemKDTTxfxEsnuUlUJRDnB1PI7jJM1pUhHpv

jXc94G/DHQbhovTUd6sh5DIc6lq297rTv8Kb5HNmkQokScBazjgVi4hmZK8rTlOh

QwIDAQAB';
Step 6: Python Connection Using RSA
-Use RSA key instead of password in secretkey or lambda code

You might also like