From f04bd945b871acd478d70b70ea6e9b7206d11116 Mon Sep 17 00:00:00 2001 From: Jonas Duarte Date: Tue, 15 Aug 2017 16:47:36 -0300 Subject: [PATCH] =?UTF-8?q?Amazon=20Linux=20set=20the=20parameter=20HostKe?= =?UTF-8?q?y=20on=20the=20file=20=E2=80=9C/etc/ssh/sshd=5Fconfig=E2=80=9D?= =?UTF-8?q?=20with=20the=20value=20"/etc/ssh/ssh=5Fhost=5Frsa=5Fkey",=20ca?= =?UTF-8?q?using=20the=20control=20sshd-14=20to=20fail.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To get it fixed I added a condition on the code block that set the valid_algorithms on the file ssh_crypto.rb, stating that when inspec.os[:name] returns ’amazon’, alg = alg53. --- libraries/ssh_crypto.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/ssh_crypto.rb b/libraries/ssh_crypto.rb index e54674c..4ebf900 100644 --- a/libraries/ssh_crypto.rb +++ b/libraries/ssh_crypto.rb @@ -247,6 +247,8 @@ def valid_algorithms # rubocop:disable Metrics/CyclomaticComplexity, Metrics/Met when /10.10\./, /10.11\./, /10.12\./ alg66 end + when 'amazon' + alg = alg53 end alg