diff --git a/dns-client.rb b/dns-client.rb index 11a4503..abe0012 100644 --- a/dns-client.rb +++ b/dns-client.rb @@ -220,9 +220,9 @@ end def host_sshfp(keys) keys.flat_map { |keyfile| - `ssh-keygen -r hostname #{keyfile}`.split("\n") + `ssh-keygen -r hostname -f #{keyfile}`.split("\n") }.map { |fp| - fp..match(/[0-9] [0-9] [a-fA-F0-9]{32,64}$/)[0] + fp.match(/[0-9] [0-9] [a-fA-F0-9]{32,64}$/)[0] }.compact end