diff options
author | ja-frog <31773963+ja-frog@users.noreply.github.com> | 2018-04-09 15:40:16 -0500 |
---|---|---|
committer | ja-frog <jesse.mcdermid@gmail.com> | 2018-04-19 09:38:17 -0500 |
commit | 72a4fb26446f74903e69b75a69c45d58500d6d19 (patch) | |
tree | 1a624ee242118e3ac02767f11d79ca4f85190882 /lib | |
parent | f013f7865b459534e82bc0e28692f821ded18533 (diff) |
Add handling for devices that only prompt for a password via SSH
An approach to handling devices that do not prompt for a username, only a password when connecting via ssh. The Calix B6 inspired this.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/input/ssh.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 27e81e0..d84b349 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -123,6 +123,11 @@ module Oxidized cmd @node.auth[:username], password cmd @node.auth[:password] end + elsif @password + match = expect password, @node.prompt + if match == password + cmd @node.auth[:password] + end else expect @node.prompt end |