summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/ssh_host_key.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/plugins/ssh_host_key.rb')
-rw-r--r--lib/ohai/plugins/ssh_host_key.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/ssh_host_key.rb b/lib/ohai/plugins/ssh_host_key.rb
index d55d777e..19e919c2 100644
--- a/lib/ohai/plugins/ssh_host_key.rb
+++ b/lib/ohai/plugins/ssh_host_key.rb
@@ -51,7 +51,7 @@ Ohai.plugin(:SSHHostKey) do
if sshd_config
File.open(sshd_config) do |conf|
conf.each_line do |line|
- if line =~ /^hostkey\s/i
+ if /^hostkey\s/i.match?(line)
pub_file = "#{line.split[1]}.pub"
content = IO.read(pub_file).split
key_type, key_subtype = extract_keytype?(content)