diff options
author | Samer Abdel-Hafez <sam@arahant.net> | 2015-03-06 12:07:50 +0100 |
---|---|---|
committer | Samer Abdel-Hafez <sam@arahant.net> | 2015-03-06 12:07:56 +0100 |
commit | cb851fdc9bfdeae603f8c56fe5bc69838b01f420 (patch) | |
tree | 7fb241645347e45d096d230816c2cd341df4544d /lib/oxidized/input/ssh.rb | |
parent | 100c4480aa2f1e6e16e47ac6c1bd85429e2ab6a0 (diff) |
Log prompt detection failures
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 |