lib/ohai/plugins/ssh_host_key.rb in ohai-8.0.1 vs lib/ohai/plugins/ssh_host_key.rb in ohai-8.1.0
- old
+ new
@@ -26,10 +26,12 @@
[ "dsa", nil ]
when "ssh-rsa"
[ "rsa", nil ]
when /^ecdsa/
[ "ecdsa", content[0] ]
+ when 'ssh-ed25519'
+ [ 'ed25519', nil ]
else
[ nil, nil ]
end
end
@@ -70,8 +72,12 @@
if keys[:ssh][:host_ecdsa_public].nil? && File.exists?("/etc/ssh/ssh_host_ecdsa_key.pub")
content = IO.read("/etc/ssh/ssh_host_ecdsa_key.pub")
keys[:ssh][:host_ecdsa_public] = content.split[1]
keys[:ssh][:host_ecdsa_type] = content.split[0]
+ end
+
+ if keys[:ssh][:host_ed25519_public].nil? && File.exists?("/etc/ssh/ssh_host_ed25519_key.pub")
+ keys[:ssh][:host_ed25519_public] = IO.read("/etc/ssh/ssh_host_ed25519_key.pub").split[1]
end
end
end