Copy a Java keystore on one machine to another?

34,793

Keystores are simply files in a format used by java for storing keys and certificates. They do not contain any information which ties them to a particular system. They can be freely copied between systems and directories as required.

They may be password protected, in which case you may need to arrange to have the password available to the software using it. There is a keytool program which can by used to read and/or update the keystore. It is often possible to read keystores without a password.

Keystore may contain keys tied to a system's domain name. These keys are not as useful on other system.

Share:
34,793

Related videos on Youtube

Brandon
Author by

Brandon

Updated on September 18, 2022

Comments

  • Brandon
    Brandon over 1 year

    I have a keystore on one machine (at /root/.keystore) and I want to move it to another machine at the same location. Currently, the second machine doesn't have a keystore at /root/.keystore, is there a way I can export then create/import? Or do I need to create an empty one first?

    • Admin
      Admin over 12 years
      cant you just copy the .keystore file to another location?
  • DenCowboy
    DenCowboy over 6 years
    Do you still need to restart java or something after the 'replace'?
  • BillThor
    BillThor over 6 years
    @DenCowboy Most software will load the keystore during initialization, so you should should restart your applications after replacing the keystore.