File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 22
22
command ( 'ssh' ) . exist?
23
23
end
24
24
25
+ ssh_version = command ( 'ssh -V 2>&1 | cut -f1 -d" " | cut -f2 -d"_"' ) . stdout . to_f
26
+
25
27
control 'ssh-01' do
26
28
impact 1.0
27
29
title 'client: Check ssh_config owner, group and permissions.'
154
156
impact 1.0
155
157
title 'Client: Disable rhosts-based authentication'
156
158
desc 'Avoid rhosts-based authentication, as it opens more ways for an attacker to enter a system.'
159
+ only_if { ssh_version < 7.6 }
157
160
describe ssh_config do
158
161
its ( 'RhostsRSAAuthentication' ) { should eq ( 'no' ) }
159
162
end
163
166
impact 1.0
164
167
title 'Client: Enable RSA authentication'
165
168
desc 'Make sure RSA authentication is used by default.'
169
+ only_if { ssh_version < 7.6 }
166
170
describe ssh_config do
167
171
its ( 'RSAAuthentication' ) { should eq ( 'yes' ) }
168
172
end
You can’t perform that action at this time.
0 commit comments