summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--lib/oxidized/input/ssh.rb2
-rw-r--r--spec/input/ssh_spec.rb4
3 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index 5158ed5..370d07b 100644
--- a/README.md
+++ b/README.md
@@ -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/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb
index ec1a756..fef20d6 100644
--- a/lib/oxidized/input/ssh.rb
+++ b/lib/oxidized/input/ssh.rb
@@ -92,7 +92,7 @@ module Oxidized
@output << data
@output = @node.model.expects @output
end
- ch.request_pty (opts={:term=>'vt100'}) do |_ch, success_pty|
+ ch.request_pty (_opts={:term=>'vt100'}) do |_ch, success_pty|
raise NoShell, "Can't get PTY" unless success_pty
ch.send_channel_request 'shell' do |_ch, success_shell|
raise NoShell, "Can't get shell" unless success_shell
diff --git a/spec/input/ssh_spec.rb b/spec/input/ssh_spec.rb
index 43c7d66..c4210f2 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,7 +25,7 @@ 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})