From 194b6893bde341c4fc3ba4c8041d9a6b6775a97d Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Mon, 4 Jun 2018 13:21:00 +0300 Subject: make login username/passord detection generic --- lib/oxidized/input/ssh.rb | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'lib/oxidized/input/ssh.rb') diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 780bdf2..d321a11 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -118,19 +118,6 @@ module Oxidized end end - # some models have SSH auth or terminal auth based on version of code - # if SSH is configured for terminal auth, we'll still try to detect prompt - def login - match_re = [@node.prompt] - match_re << @username if @username - match_re << @password if @password - until (match = expect(match_re)) == @node.prompt - cmd(@node.auth[:username], nil) if match == @username - cmd(@node.auth[:password], nil) if match == @password - match_re.delete match - end - end - def exec state = nil state == nil ? @exec : (@exec = state) unless vars :ssh_no_exec end -- cgit v1.2.1