]> git.openstreetmap.org Git - chef.git/commitdiff
Remove any legacy DSA host keys
authorTom Hughes <tom@compton.nu>
Tue, 16 Jun 2020 18:37:40 +0000 (19:37 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 16 Jun 2020 18:37:40 +0000 (19:37 +0100)
cookbooks/openssh/recipes/default.rb

index 3349dc85d8bd7bc184a3398d2c37f289c1b6747e..c5738f45b6bc102e3afed7cd7a942d2949946d69 100644 (file)
@@ -28,6 +28,14 @@ service "ssh" do
   supports :status => true, :restart => true, :reload => true
 end
 
+file "/etc/ssh/ssh_host_dsa_key" do
+  action :delete
+end
+
+file "/etc/ssh/ssh_host_dsa_key.pub" do
+  action :delete
+end
+
 hosts = search(:node, "networking:interfaces").sort_by { |n| n[:hostname] }.collect do |node|
   name = node.name.split(".").first
 
@@ -42,8 +50,7 @@ hosts = search(:node, "networking:interfaces").sort_by { |n| n[:hostname] }.coll
   end
 
   keys = {
-    "ssh-rsa" => node[:keys][:ssh][:host_rsa_public],
-    "ssh-dss" => node[:keys][:ssh][:host_dsa_public]
+    "ssh-rsa" => node[:keys][:ssh][:host_rsa_public]
   }
 
   if node[:keys][:ssh][:host_ecdsa_public]