Function: Get The Allowed 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 Allowed SSH Key Size Per Algorithm

Public Function: getAllowedKeySizesPerAlgorithm

public getAllowedKeySizesPerAlgorithm(strAlgorithm: "RSA" | "DSA" | "ECDSA"): number[] {
    if (strAlgorithm === 'RSA') {
        return [1024, 2048, 3072, 4096, 8192];
    } else if (strAlgorithm === 'DSA') {
        return [1024, 2048, 3072];
    } else if (strAlgorithm === 'ECDSA') {
        return [256, 384, 521];
    }
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like