Skip to content

Commit fef3eb4

Browse files
Merge pull request #163 from dev-sec/micheelengronne-patch-2
custom path for hostkeys
2 parents 81a5c8d + 4228bd5 commit fef3eb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ssh_crypto.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def valid_algorithms # rubocop:disable Metrics/CyclomaticComplexity
256256

257257
# returns the hostkeys value based on valid_algorithms
258258
def valid_hostkeys
259-
hostkeys = valid_algorithms.map { |alg| "/etc/ssh/ssh_host_#{alg}_key" }
259+
hostkeys = valid_algorithms.map { |alg| "#{sshd_custom_path}/ssh_host_#{alg}_key" }
260260
# its('HostKey') provides a string for a single-element value.
261261
# we have to return a string if we have a single-element
262262
# https://github.com/chef/inspec/issues/1434

0 commit comments

Comments
 (0)