Function: Key Pair Change Pass Phrase

by Simon Sparks · 24 March 2026

To use this function add it to the class library file named PluginSSHService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: PluginSSHService.ts

Description: Orchestrator Function to Change Pass Phrase of a Key Pair

Public Function: KeyPairChangePassPhrase

public KeyPairChangePassPhrase(strPassPhraseOld: string, strPassPhraseNew: string): boolean {
    try {
        //@ts-ignore
        KeyPairManager.changePassphrase(strPathToPrivateKeyFile, strPassPhraseOld, strPassPhraseNew);

        return true;
    } catch (objException) {
        this.objLogger.info("Failed to change passphrase: " + objException);

        return false;
    }
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like