From bd2c06fcc972560063499f25d685e11e7f16fc24 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Fri, 22 Jun 2018 19:50:06 +0300 Subject: smell reduction bug fixes --- lib/oxidized/input/ssh.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/oxidized/input') diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index ccc3d1c..f881ff1 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -118,6 +118,7 @@ module Oxidized end def make_ssh_opts + secure = Oxidized.config.input.ssh.secure? ssh_opts = { port: (vars(:ssh_port) || 22).to_i, paranoid: secure, @@ -131,7 +132,7 @@ module Oxidized if proxy_host = vars(:ssh_proxy) proxy_command = "ssh " - proxy_command += "-o StrictHostKeyChecking=no " unless Oxidized.config.input.ssh.secure? + proxy_command += "-o StrictHostKeyChecking=no " unless secure proxy_command += "#{proxy_host} -W %h:%p" proxy = Net::SSH::Proxy::Command.new(proxy_command) ssh_opts[:proxy] = proxy -- cgit v1.2.1