diff options
author | ytti <saku@ytti.fi> | 2017-03-16 20:35:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-16 20:35:11 +0200 |
commit | e4f510d3202b6e4000b59f4bdd991b255eb652f2 (patch) | |
tree | ea6d97204023fec4bac7808cf03deee75e89d398 /lib/oxidized/input | |
parent | 45bc305a2b60a31638ad95d8c1b87e5dbf74a5c5 (diff) | |
parent | d21aeefb6ad3fca04d25a7af57fd9bd350a18fd8 (diff) |
Merge pull request #769 from funzoneq/feature/disable-host-checking
Ignore the host key checking
Diffstat (limited to 'lib/oxidized/input')
-rw-r--r-- | lib/oxidized/input/ssh.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 9a5c508..858d5cd 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -25,7 +25,10 @@ module Oxidized @log = File.open(Oxidized::Config::Log + "/#{@node.ip}-ssh", 'w') if Oxidized.config.input.debug? port = vars(:ssh_port) || 22 if proxy_host = vars(:ssh_proxy) - proxy = Net::SSH::Proxy::Command.new("ssh #{proxy_host} -W %h:%p") + proxy_command = "ssh " + proxy_command += "-o StrictHostKeyChecking=no " unless secure + proxy_command += "#{proxy_host} -W %h:%p" + proxy = Net::SSH::Proxy::Command.new(proxy_command) end ssh_opts = { :port => port.to_i, |