Skip to content

Commit 4182777

Browse files
committed
Support SSH shell/exec channel request output
Looks like channel[:data] was initialized but never used.
1 parent 9b01f3d commit 4182777

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/net/ssh/command_stream.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def shell_requested(channel, success)
2121
end
2222

2323
channel[:data] = ''
24+
channel[:extended_data] = ''
2425

2526
channel.on_eof do
2627
cleanup
@@ -32,10 +33,12 @@ def shell_requested(channel, success)
3233

3334
channel.on_data do |ch, data|
3435
self.rsock.write(data)
36+
channel[:data] << data
3537
end
3638

3739
channel.on_extended_data do |ch, ctype, data|
3840
self.rsock.write(data)
41+
channel[:extended_data] << data
3942
end
4043

4144
self.channel = channel

0 commit comments

Comments
 (0)