Skip to content
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

Sshd_config[PubkeyAcceptedKeyTypes]: Could not evaluate: Failed to save Augeas tree to file. #99

Open
markdv77 opened this issue Apr 4, 2024 · 1 comment

Comments

@markdv77
Copy link

markdv77 commented Apr 4, 2024

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7.x
  • Ruby: bundled
  • Distribution: Debian
  • Module version: 6.0.0

How to reproduce (e.g Puppet code you use)

Save this as sshd.pp:

sshd_config {
      'PubkeyAcceptedKeyTypes':
        ensure => present,
        #value  => [ '+ssh-dss' ];
        value  => '+ssh-dss';
}

Run using default sshd_config file:

cp /usr/share/openssh/sshd_config /etc/ssh/sshd_config
puppet apply sshd.pp

What are you seeing

Error: /Stage[main]/Main/Sshd_config[PubkeyAcceptedKeyTypes]: Could not evaluate: Failed to save Augeas tree to file. See debug logs for details.

Debug output shows:

Debug: Puppet::Type::Sshd_config::ProviderAugeas: Save failure details:
/augeas/files/etc/ssh/sshd_config/error/path = /files/etc/ssh/sshd_config/
/augeas/files/etc/ssh/sshd_config/error/lens = /opt/puppetlabs/puppet/share/augeas/lenses/dist/sshd.aug:154.12-.47:
/augeas/files/etc/ssh/sshd_config/error/message = Failed to match tree under /

     { "#comment" = "$OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $" }
etc
  with pattern
etc.

Error: /Stage[main]/Main/Sshd_config[PubkeyAcceptedKeyTypes]: Could not evaluate: Failed to save Augeas tree to file. See debug logs for details.

What behaviour did you expect instead

I was hoping it would add the option to /etc/ssh/sshd_config

Output log

Any additional information you'd like to impart

@tedgarb
Copy link
Contributor

tedgarb commented May 23, 2024

Hi,

I think I fixed this in #65, which is not yet released. Could you confirm that the current HEAD works for you? I expect you will need to swap to the commented line for value in your code:

sshd_config {
      'PubkeyAcceptedKeyTypes':
        ensure => present,
        value  => [ '+ssh-dss' ];
        #value  => '+ssh-dss';
}

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

2 participants