Created
September 11, 2015 22:00
-
-
Save scarolan/7d8083aaf5c4206d72a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
control_group 'SSH Security' do | |
control 'SSH' do | |
it 'should be listening on port 22' do | |
expect(port(22)).to be_listening | |
end | |
it 'disables root logins over ssh' do | |
expect(file('/etc/ssh/sshd_config')).to contain('PermitRootLogin no') | |
end | |
it "PasswordAuthentication is disabled" do | |
expect(file('/etc/ssh/sshd_config')).to match(/PasswordAuthentication\s+no/) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment