# Secret Key Reset Utility

This utility regenerates Secret Key for application. This can be used in following cases:

* Secret Key is lost.
* Secret Key has been tampered.
* User wants to change secret key for application.

Please follow below given steps for execution of this utility:

* Stop OpsHub Server/ Service before execution of this utility.
* Go to `<OpsHub Installation Folder>/Other_Resources/Resources`.
* Unzip `OpsHub Secret key reset utility.zip`.
* Execute `OpsHubSecretKeyResetUtility.bat` / `OpsHubSecretKeyResetUtility.sh` for Windows/Linux respectively.
* Enter path for OpsHub Installation Directory.

<div align="center"><img src="https://3729341606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yI7gLypIVjJdBgxy9pM%2Fuploads%2Fgit-blob-f0336b2b568365629a6371bd9e03135838a7870f%2FRegenerate_Image_1.png?alt=media" alt="" width="1000"></div>

* Enter new location for security. (`opshub.key` should not be available on the same location).

<div align="center"><img src="https://3729341606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yI7gLypIVjJdBgxy9pM%2Fuploads%2Fgit-blob-92d05fb1c1ddd965132b4ec8fba213d663dd6c0a%2FRegenerate_Image_2.png?alt=media" alt="" width="1000"></div>

* Select Data Encryption algorithm. By default, AES (128) is selected.

<div align="center"><img src="https://3729341606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yI7gLypIVjJdBgxy9pM%2Fuploads%2Fgit-blob-0171e4507caf4a7fe4ba8ef4d60cc51d3b8265c6%2FRegenerate_Image_3.png?alt=media" alt="" width="1000"></div>

* Provide password for database.

<div align="center"><img src="https://3729341606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yI7gLypIVjJdBgxy9pM%2Fuploads%2Fgit-blob-1690cbc0918e7b52499fa4e61373f5c4afebf019%2FRegenerate_Image_4.png?alt=media" alt="" width="1000"></div>

* This would generate new key at specified location.

<div align="center"><img src="https://3729341606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1yI7gLypIVjJdBgxy9pM%2Fuploads%2Fgit-blob-1e2c55366dd6fd00a1f4b329c32b430695febf9b%2FRegenerate_Image_5.png?alt=media" alt="" width="1000"></div>

* In case of HTTPS deployment of <code class="expression">space.vars.SITENAME</code>, run [Change Keystore and Private Key passwords utility](https://docs.opshub.com/upcoming-release/manage/advanced-utilities/change-keystore-and-private-key-passwords) to store the passwords in encrypted form.
* Start OpsHub Server/ Service.
* Re-enter passwords for all configured systems, configured database connections, configured proxy settings and overridden passwords in Advance Configuration of Integration.
