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
public KeyPairGenerate(strType: string, strPathToPrivateKeyFile: string, strPassPhrase: string, intKeySize: number, strComment: string): string {
try {
//@ts-ignore
let strFingerprint: string = KeyPairManager.generateKeyPair(strType, strPathToPrivateKeyFile, strPassPhrase, intKeySize, strComment);
return strFingerprint;
} catch (objException) {
this.objLogger.info("Failed to change passphrase: " + objException);
return null;
}
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
