From 1a06112f5514a93a45c7422a2b9cc7c31f6147e4 Mon Sep 17 00:00:00 2001 From: roedie Date: Wed, 24 Feb 2016 08:30:07 +0100 Subject: Remove netcat in favor of native ssh tunnel Newer versions of ssh (>=5.4) support the -W option which makes the use of netcat obsolete. Dropping netcat is useful is you want to hop through a router/switch since they rarely have netcat support. --- lib/oxidized/input/ssh.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 7ffdd36..ec1a756 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -23,8 +23,8 @@ module Oxidized secure = Oxidized.config.input.ssh.secure @log = File.open(Oxidized::Config::Log + "-#{@node.ip}-ssh", 'w') if Oxidized.config.input.debug? port = vars(:ssh_port) || 22 - if proxy_host = vars(:proxy) - proxy = Net::SSH::Proxy::Command.new("ssh #{proxy_host} nc %h %p") + if proxy_host = vars(:ssh_proxy) + proxy = Net::SSH::Proxy::Command.new("ssh #{proxy_host} -W %h:%p") end ssh_opts = { :port => port.to_i, -- cgit v1.2.1