Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Run the following command on source keystore location. This command directly adds the keys to the destination keystore. It requires the host address of the destination machine.
Code Block
keytool -importkeystore -srckeystore jcc-datakeys.jks
-srcstoretype JCEKS -srcstorepass `cat jcc-datakeys.pass` 
-srcalias 'account-autogen' -destkeystore <destination-machine>:<keystore-location>/jcc-datakeys.jks -deststoretype JCEKS 
-deststorepass <destination-machine>:<keystore-location>/jccdatakeys.pass -destalias source-account-autogen 

Multiple-Step Process (Recommended)

  1. Export the source key to a temporary keystore. 

    Code Block
    keytool -importkeystore -srckeystore 
    jcc-datakeys.jks -destkeystore 
    jcc-datakeys-src-copy.jks -srcstoretype JCEKS -deststoretype JCEKS -srcstorepass 
    `cat jcc-datakeys.pass` -deststorepass changeit -srcalias account-autogen -destalias source-account-autogen -srckeypass 
    `cat jcc-datakeys.pass` -destkeypass changeit


    Note
    • Both source and destination key-aliases are by default account-autogen. So while importing the source key to destination, a new name should be chosen for source key-alias. A recommended name would have source org name followed by account-autogen. For example, SnaplogicDev-account-autogen.
    • The keys are accessed by the same password that is used for the store that is stored in a .pass file. While exporting the source key to a temporary keyfile, use a temporary password. For example, changeit.

...


  1. Copy the temporary keystore to the destination JCCs.

...

  1. Go to the keystore in the destination JCCs. Import (add) the source key to the destination key using the following command:

    Code Block
    keytool -importkeystore -srckeystore 
    jcc-datakeys-src-copy.jks 
    -destkeystore jcc-datakeys.jks -srcstoretype JCEKS -deststoretype JCEKS -srcstorepass changeit -srckeypass changeit -deststorepass `cat jcc-datakeys.pass` 
    -srcalias source-account-autogen 
    -destalias source-account-autogen

...


  1. Change the source key password to use the keystore password.

    Code Block
    keytool -keypasswd -alias 
    source-account-autogen -keypass changeit 
    -new `cat jcc-datakeys.pass`

...


  1. Once the keys are added, you can list the keys to confirm that the source key is added with alias source-account-autogen

    Code Block
    keytool -list -keystore jcc-datakeys.jks 
    -storetype JCEKS -storepass `cat jcc-datakeys.pass`