Skip to content

setting up a cert-authority fails with sshkey type validation fail #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bwitt opened this issue May 22, 2025 · 0 comments
Open

setting up a cert-authority fails with sshkey type validation fail #438

bwitt opened this issue May 22, 2025 · 0 comments

Comments

@bwitt
Copy link

bwitt commented May 22, 2025

I'm trying to add a CA via a @cert-authority * <key type> <key> line in the /etc/ssh/ssh_known_hosts` file.

There's no direct support in sshkeys-core, so I tried adding one via file_line:

  file_line { 'add ssh ca to ssh_known_hosts':
    path  => '/etc/ssh/ssh_known_hosts',
    line  => "@cert-authority * ${ssh_ca_public_key}",
    match => '^@cert-authority \* ',
  }

but when I do that, I get an error on the next puppet run

Error: /Stage[main]/Ssh/Resources[sshkey]: Failed to generate additional resources using 'generate': Parameter type failed on Sshkey[@]: Invalid value "cert-authority@*". Valid values are ssh-dss, ssh-ed25519, ssh-rsa, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, sk-ecdsa-sha2-nistp256@openssh.com, sk-ssh-ed25519@openssh.com.

looks like there's an sshkey type that may need to be updated.

I'm using these in my Puppetfile:

mod "ghoneycutt-ssh", "5.1.1"
mod 'puppetlabs-sshkeys_core', '2.5.1'

Ref: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/deployment_guide/sec-distributing_and_trusting_ssh_ca_public_keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant