summaryrefslogtreecommitdiff
path: root/lib/oxidized/input/ssh.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/input/ssh.rb')
-rw-r--r--lib/oxidized/input/ssh.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb
index a858213..bd0a459 100644
--- a/lib/oxidized/input/ssh.rb
+++ b/lib/oxidized/input/ssh.rb
@@ -27,6 +27,10 @@ module Oxidized
shell_open @ssh
@username ? shell_login : expect(@node.prompt)
end
+ connected?
+ end
+
+ def connected?
@ssh and not @ssh.closed?
end