diff --git a/cli/packages/cmd/ssh.go b/cli/packages/cmd/ssh.go index 63160b8bb5..d611e3b8d2 100644 --- a/cli/packages/cmd/ssh.go +++ b/cli/packages/cmd/ssh.go @@ -52,12 +52,8 @@ var algoToFileName = map[infisicalSdkUtil.CertKeyAlgorithm]string{ } func isValidKeyAlgorithm(algo infisicalSdkUtil.CertKeyAlgorithm) bool { - switch algo { - case infisicalSdkUtil.RSA2048, infisicalSdkUtil.RSA4096, infisicalSdkUtil.ECDSAP256, infisicalSdkUtil.ECDSAP384: - return true - default: - return false - } + _, exists := algoToFileName[algo] + return exists } func isValidCertType(certType infisicalSdkUtil.SshCertType) bool {