mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
fix sshd config help
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
This commit is contained in:
parent
f09a100a4a
commit
438a1c52ab
1 changed files with 15 additions and 3 deletions
|
@ -9,10 +9,12 @@ require 'utils/simpleconfig'
|
||||||
module Inspec::Resources
|
module Inspec::Resources
|
||||||
class SshConf < Inspec.resource(1)
|
class SshConf < Inspec.resource(1)
|
||||||
name 'ssh_config'
|
name 'ssh_config'
|
||||||
desc 'Use the sshd_config InSpec audit resource to test configuration data for the Open SSH daemon located at /etc/ssh/sshd_config on Linux and UNIX platforms. sshd---the Open SSH daemon---listens on dedicated ports, starts a daemon for each incoming connection, and then handles encryption, authentication, key exchanges, command execution, and data exchanges.'
|
desc 'Use the `ssh_config` InSpec audit resource to test OpenSSH client configuration data located at `/etc/ssh/ssh_config` on Linux and Unix platforms.'
|
||||||
example "
|
example "
|
||||||
describe sshd_config do
|
describe ssh_config do
|
||||||
its('Protocol') { should eq '2' }
|
its('cipher') { should contain '3des' }
|
||||||
|
its('port') { should eq '22' }
|
||||||
|
its('hostname') { should include('example.com') }
|
||||||
end
|
end
|
||||||
"
|
"
|
||||||
|
|
||||||
|
@ -83,9 +85,19 @@ module Inspec::Resources
|
||||||
|
|
||||||
class SshdConf < SshConf
|
class SshdConf < SshConf
|
||||||
name 'sshd_config'
|
name 'sshd_config'
|
||||||
|
desc 'Use the sshd_config InSpec audit resource to test configuration data for the Open SSH daemon located at /etc/ssh/sshd_config on Linux and UNIX platforms. sshd---the Open SSH daemon---listens on dedicated ports, starts a daemon for each incoming connection, and then handles encryption, authentication, key exchanges, command execution, and data exchanges.'
|
||||||
|
example "
|
||||||
|
describe sshd_config do
|
||||||
|
its('Protocol') { should eq '2' }
|
||||||
|
end
|
||||||
|
"
|
||||||
|
|
||||||
def initialize(path = nil)
|
def initialize(path = nil)
|
||||||
super(path || '/etc/ssh/sshd_config')
|
super(path || '/etc/ssh/sshd_config')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def to_s
|
||||||
|
'SSHD Configuration'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue