Function: Get The Default SSH Key Size Per Algorithm

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 get the Default SSH Key Size Per Algorithm

Public Function: getDefaultKeySizePerAlgorithm

public getDefaultKeySizePerAlgorithm(strAlgorithm: "RSA" | "DSA" | "ECDSA"): number {
    if (strAlgorithm === 'RSA') {
        return 2048;
    } else if (strAlgorithm === 'DSA') {
        return 1024;
    } else if (strAlgorithm === 'ECDSA') {
        return 521;
    }
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like