diff options
Diffstat (limited to 'lib/oxidized/input/ssh.rb')
-rw-r--r-- | lib/oxidized/input/ssh.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb index 62a31eb..ec33d37 100644 --- a/lib/oxidized/input/ssh.rb +++ b/lib/oxidized/input/ssh.rb @@ -26,7 +26,11 @@ module Oxidized :paranoid => secure unless @exec shell_open @ssh - @username ? shell_login : expect(@node.prompt) + begin + @username ? shell_login : expect(@node.prompt) + rescue Timeout::Error + raise PromptUndetect, [ @output, 'not matching configured prompt', @node.prompt ].join(' ') + end end connected? end |