Saltstack Official OpenSSH Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233
  1. # Overide by Platform
  2. root_group = 'root'
  3. if platform[:family] == 'freebsd'
  4. root_group = 'wheel'
  5. end
  6. control 'openssh configuration' do
  7. title 'should match desired lines'
  8. describe file('/etc/ssh/sshd_config') do
  9. it { should be_file }
  10. its('mode') { should cmp '0644' }
  11. it { should be_owned_by 'root' }
  12. it { should be_grouped_into root_group }
  13. its('content') { should include 'ChallengeResponseAuthentication no' }
  14. its('content') { should include 'X11Forwarding yes' }
  15. its('content') { should include 'PrintMotd no' }
  16. its('content') { should include 'AcceptEnv LANG LC_*' }
  17. its('content') { should include 'Subsystem sftp /usr/lib/openssh/sftp-server' }
  18. its('content') { should include 'UsePAM yes' }
  19. end
  20. describe file('/etc/ssh/ssh_config') do
  21. it { should be_file }
  22. its('mode') { should cmp '0644' }
  23. it { should be_owned_by 'root' }
  24. it { should be_grouped_into root_group }
  25. its('content') { should include 'Host *' }
  26. its('content') { should include ' GSSAPIAuthentication yes' }
  27. its('content') { should include ' HashKnownHosts yes' }
  28. its('content') { should include ' SendEnv LANG LC_*' }
  29. end
  30. end