Using Key Pair Authentication & Key Pair Rotation
SnowSQL supports key pair authentication and key rotation, but does not support unencrypted private keys.
To start, follow the instructions to configure Key Pair Authentication & Key Pair Rotation.
Specify the path to the private key file either in the configuration file or on the command line:
In the configuration file:
Add the
private_key_path
connection parameter to your connection settings and specify the local path to the private key file you created. The syntax is not OS-specific:
- Supported OS
private_key_path = <path>/rsa_key.p8Use the
SNOWSQL_PRIVATE_KEY_PASSPHRASE
environment variable to set the passphrase for decrypting the private key file. The syntax is OS-specific:
- Linux/macOS
export SNOWSQL_PRIVATE_KEY_PASSPHRASE='<passphrase>'
- Windows
set SNOWSQL_PRIVATE_KEY_PASSPHRASE='<passphrase>'On the command line:
Include the
private-key-path
connection parameter and specify the path to your encrypted private key file:$ snowsql -a <account_identifier> -u <user> --private-key-path <path>/rsa_key.p8SnowSQL prompts you for the passphrase. Alternatively, use the
SNOWSQL_PRIVATE_KEY_PASSPHRASE
environment variable to set the passphrase for decrypting the private key file (as described above).
No comments:
Post a Comment