summaryrefslogtreecommitdiff
path: root/lib/oxidized/input/telnet.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/input/telnet.rb')
-rw-r--r--lib/oxidized/input/telnet.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/oxidized/input/telnet.rb b/lib/oxidized/input/telnet.rb
index 4b9a656..102bc8c 100644
--- a/lib/oxidized/input/telnet.rb
+++ b/lib/oxidized/input/telnet.rb
@@ -20,14 +20,8 @@ module Oxidized
'Log' => @log }
@telnet = Net::Telnet.new telnet_opts
- if @node.auth[:username] and @node.auth[:username].length > 0
- expect username
- @telnet.puts @node.auth[:username]
- end
- expect password
- @telnet.puts @node.auth[:password]
begin
- expect @node.prompt
+ login
rescue Timeout::Error
raise PromptUndetect, ['unable to detect prompt:', @node.prompt].join(' ')
end