lib/ohai/plugins/ssh_host_key.rb in ohai-8.13.0 vs lib/ohai/plugins/ssh_host_key.rb in ohai-8.14.0

- old
+ new

@@ -49,10 +49,10 @@ end if sshd_config File.open(sshd_config) do |conf| conf.each_line do |line| - if line.match(/^hostkey\s/i) + if line =~ /^hostkey\s/i pub_file = "#{line.split[1]}.pub" content = IO.read(pub_file).split key_type, key_subtype = extract_keytype?(content) keys[:ssh]["host_#{key_type}_public"] = content[1] unless key_type.nil? keys[:ssh]["host_#{key_type}_type"] = key_subtype unless key_subtype.nil?