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 resource no method error #595

Closed
warroyo opened this issue Mar 28, 2016 · 1 comment
Closed

sshd_config resource no method error #595

warroyo opened this issue Mar 28, 2016 · 1 comment

Comments

@warroyo
Copy link

warroyo commented Mar 28, 2016

I am seeing the following error when using the sshd_config resource. The below output is from running inspec cli. I also have the output from inspec shell.

SSH Configuration Banner
      Failure/Error: if @content.empty? && file.size > 0

      NoMethodError:
        undefined method `empty?' for nil:NilClass

Shell output:

sshd_config.content
NoMethodError: undefined method `empty?' for nil:NilClass
from /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/inspec-0.16.4/lib/resources/ssh_conf.rb:57:in `read_content'

@warroyo
Copy link
Author

warroyo commented Mar 29, 2016

turning on the --sudo option fixed this

@warroyo warroyo closed this as completed Mar 29, 2016
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