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.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/oxidized/input/ssh.rb b/lib/oxidized/input/ssh.rb
index 69b36b0..e7296b5 100644
--- a/lib/oxidized/input/ssh.rb
+++ b/lib/oxidized/input/ssh.rb
@@ -79,11 +79,14 @@ module Oxidized
def shell_open ssh
@ses = ssh.open_channel do |ch|
ch.on_data do |_ch, data|
- @log.print data if Oxidized.config.input.debug?
+ if Oxidized.config.input.debug?
+ @log.print data
+ @log.fsync
+ end
@output << data
@output = @node.model.expects @output
end
- ch.request_pty do |_ch, success_pty|
+ ch.request_pty (opts={:term=>'vt100'}) do |_ch, success_pty|
raise NoShell, "Can't get PTY" unless success_pty
ch.send_channel_request 'shell' do |_ch, success_shell|
raise NoShell, "Can't get shell" unless success_shell