Problem
The Infisical backend server supports issuing SSH credentials with ED25519 key algorithm, but the CLI cannot utilize this feature because:
- The underlying go-sdk doesn't define the ED25519 constant
- The CLI's
algoToFileName map doesn't have an ED25519 mapping
- The error message tells users that valid values are only:
RSA_2048, RSA_4096, EC_prime256v1, EC_secp384r1
This prevents users from accessing the modern ED25519 key type via the CLI, even though the backend supports it.
Root Cause
The CLI inherits its limitations from the go-sdk. The go-sdk needs to add ED25519 support first, then the CLI must:
- Update the
algoToFileName map to include ED25519
- Update the error message validation text
ref: Infisical/go-sdk#77
Evidence
Backend supports ED25519 as default:
https://github.com/Infisical/infisical/blob/fc5d42baf0259fd205f5ba8ae69a667c3406c40a/backend/src/ee/routes/v1/ssh-certificate-router.ts#L117
CLI missing ED25519 mapping:
https://github.com/Infisical/cli/blob/main/packages/cmd/ssh.go#L65-L70
var algoToFileName = map[infisicalSdkUtil.CertKeyAlgorithm]string{
infisicalSdkUtil.RSA2048: "id_rsa_2048",
infisicalSdkUtil.RSA4096: "id_rsa_4096",
infisicalSdkUtil.ECDSAP256: "id_ecdsa_p256",
infisicalSdkUtil.ECDSAP384: "id_ecdsa_p384",
// Missing: ED25519
}
Error message needs update:
https://github.com/Infisical/cli/blob/main/packages/cmd/ssh.go#L221-L224
util.HandleError(fmt.Errorf("invalid keyAlgorithm: %s", keyAlgorithm),
"Valid values: RSA_2048, RSA_4096, EC_prime256v1, EC_secp384r1")
Possible solution
- Wait for go-sdk PR to merge (adds ED25519 constant)
- Update
algoToFileName map in cli/packages/cmd/ssh.go to include ED25519:
var algoToFileName = map[infisicalSdkUtil.CertKeyAlgorithm]string{
infisicalSdkUtil.RSA2048: "id_rsa_2048",
infisicalSdkUtil.RSA4096: "id_rsa_4096",
infisicalSdkUtil.ECDSAP256: "id_ecdsa_p256",
infisicalSdkUtil.ECDSAP384: "id_ecdsa_p384",
infisicalSdkUtil.ED25519: "id_ed25519",
}
- Update the error message to include ED25519
Expected Behavior
Users should be able to run:
infisical ssh issue-credentials \
--certificateTemplateId <template-id> \
--principals <username> \
--keyAlgorithm ED25519 \
--outFilePath ~/.ssh/
And successfully receive ED25519-based SSH credentials.
Problem
The Infisical backend server supports issuing SSH credentials with ED25519 key algorithm, but the CLI cannot utilize this feature because:
algoToFileNamemap doesn't have an ED25519 mappingRSA_2048, RSA_4096, EC_prime256v1, EC_secp384r1This prevents users from accessing the modern ED25519 key type via the CLI, even though the backend supports it.
Root Cause
The CLI inherits its limitations from the go-sdk. The go-sdk needs to add ED25519 support first, then the CLI must:
algoToFileNamemap to include ED25519ref: Infisical/go-sdk#77
Evidence
Backend supports ED25519 as default:
https://github.com/Infisical/infisical/blob/fc5d42baf0259fd205f5ba8ae69a667c3406c40a/backend/src/ee/routes/v1/ssh-certificate-router.ts#L117
CLI missing ED25519 mapping:
https://github.com/Infisical/cli/blob/main/packages/cmd/ssh.go#L65-L70
Error message needs update:
https://github.com/Infisical/cli/blob/main/packages/cmd/ssh.go#L221-L224
Possible solution
algoToFileNamemap incli/packages/cmd/ssh.goto include ED25519:Expected Behavior
Users should be able to run:
And successfully receive ED25519-based SSH credentials.
algoToFileNamemap includes ED25519 → "id_ed25519" mappingid_ed25519