Function: Key Pair Generate

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 Generate a Key Pair

Public Function: KeyPairGenerate

publicKeyPairGenerate(strType:string,strPathToPrivateKeyFile:string,strPassPhrase:string,intKeySize:number,strComment:string):string{
try{
//@ts-ignore
letstrFingerprint:string=KeyPairManager.generateKeyPair(strType,strPathToPrivateKeyFile,strPassPhrase,intKeySize,strComment);

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

returnnull;
}
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like