diff options
author | ytti <saku@ytti.fi> | 2016-02-25 11:21:50 +0200 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2016-02-25 11:21:50 +0200 |
commit | 83b4524ef8aa3a0caba7bad66eae094c43c21307 (patch) | |
tree | ca86b206504ae4cbe9c0edecf5545d7dc91f7967 | |
parent | 7ecf4e2b7024ab9597a4ec7d2c5723a3424b65c5 (diff) | |
parent | 1a68e83169f1fc16d8a222cb18f3f390c9c5d51d (diff) |
Merge pull request #339 from roedie/update-ssh_proxy
Update ssh proxy
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | spec/input/ssh_spec.rb | 6 |
2 files changed, 5 insertions, 5 deletions
@@ -304,7 +304,7 @@ source: ### SSH Proxy Command -Oxidized can `ssh` through a proxy as well. To do so we just need to set `proxy` variable. +Oxidized can `ssh` through a proxy as well. To do so we just need to set `ssh_proxy` variable. ``` ... @@ -313,7 +313,7 @@ map: model: 1 vars_map: enable: 2 - proxy: 3 + ssh_proxy: 3 ... ``` diff --git a/spec/input/ssh_spec.rb b/spec/input/ssh_spec.rb index 43c7d66..0b6cf72 100644 --- a/spec/input/ssh_spec.rb +++ b/spec/input/ssh_spec.rb @@ -12,7 +12,7 @@ describe Oxidized::SSH do model: 'junos', username: 'alma', password: 'armud', - vars: {proxy: 'test.com'}) + vars: {ssh_proxy: 'test.com'}) end @@ -25,10 +25,10 @@ describe Oxidized::SSH do @node.expects(:model).returns(model) proxy = mock() - Net::SSH::Proxy::Command.expects(:new).with("ssh test.com nc %h %p").returns(proxy) + Net::SSH::Proxy::Command.expects(:new).with("ssh test.com -W %h:%p").returns(proxy) Net::SSH.expects(:start).with('93.184.216.34', 'alma', {:port => 22, :password => 'armud', :timeout => Oxidized.config.timeout, :paranoid => Oxidized.config.input.ssh.secure, :auth_methods => ['none', 'publickey', 'password', 'keyboard-interactive'], - :number_of_password_prompts => 0, :proxy => proxy}) + :number_of_password_prompts => 0, :ssh_roxy => proxy}) ssh.instance_variable_set("@exec", true) ssh.connect(@node) |