]> git.openstreetmap.org Git - chef.git/commitdiff
Handle new ssh host key types
authorTom Hughes <tom@compton.nu>
Sat, 23 Jun 2018 16:23:41 +0000 (17:23 +0100)
committerTom Hughes <tom@compton.nu>
Sat, 23 Jun 2018 16:23:41 +0000 (17:23 +0100)
cookbooks/openssh/recipes/default.rb

index 3d5f4a4609260452863781b4a650624c0f676f30..08d1aded8fe3408bbcac83594f7b867859ef42de 100644 (file)
@@ -41,8 +41,8 @@ hosts = search(:node, "networking:interfaces").sort_by { |n| n[:hostname] }.coll
   end
 
   keys = {
-    "rsa" => node[:keys][:ssh][:host_rsa_public],            # ~FC039
-    "dsa" => node[:keys][:ssh][:host_dsa_public]             # ~FC039
+    "ssh-rsa" => node[:keys][:ssh][:host_rsa_public],        # ~FC039
+    "ssh-dss" => node[:keys][:ssh][:host_dsa_public]         # ~FC039
   }
 
   if node[:keys][:ssh][:host_ecdsa_public]                   # ~FC039
@@ -51,6 +51,10 @@ hosts = search(:node, "networking:interfaces").sort_by { |n| n[:hostname] }.coll
     keys[ecdsa_type] = node[:keys][:ssh][:host_ecdsa_public] # ~FC039
   end
 
+  if node[:keys][:ssh][:host_ed25519_public]                      # ~FC039
+    keys["ssh-ed25519"] = node[:keys][:ssh][:host_ed25519_public] # ~FC039
+  end
+
   Hash[
     :names => names.sort,
     :addresses => node.ipaddresses.sort,