diff options
author | roedie <github@roedie.nl> | 2016-02-24 08:30:07 +0100 |
---|---|---|
committer | roedie <github@roedie.nl> | 2016-02-24 20:47:56 +0100 |
commit | 1a06112f5514a93a45c7422a2b9cc7c31f6147e4 (patch) | |
tree | 1f015530dbb7977eccda29fcc964565d0212f723 /lib | |
parent | 1d6be9c011a9195626f59d3d62ac2febe9dd3149 (diff) |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/input/ssh.rb | 4 |
1 files 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, |