Back to Demos
52/54
Interactive keytool Builder
Select an operation, customize the parameters, and copy the generated command. All commands use PKCS12 format (recommended).
Read Full GuideGenerate Key Pair
$ keytool -genkeypair \
-alias mykey \
-keyalg RSA -keysize 2048 \
-keystore keystore.p12 -storetype PKCS12 \
-validity 365 \
-dname "CN=localhost,O=MyOrg,C=US" \
-storepass changeit -keypass changeitQuick Reference: Common Options
-storetype PKCS12Use PKCS12 format (recommended)
-storepass <password>Keystore password
-keypass <password>Private key password (if different)
-nopromptDon't prompt for confirmation



