I am trying to establish multiple ssh connections using the NET:SSH ruby
gem to a host one at a time in sequential order. I am using the
following code to do that. If I am trying making multiple
connections(say 10000) to a host in this manner, the program hangs
without any error. I am thinking that its because of the channel waiting
on_data from reading input from the remote servers STDOUT. I am also
thinking that when the STDOUT doesn’t have any of these characters $%#>
( the prompt characters), it just waits. Is there a way to gracefully
exit out of this state and continue to process the remaining
transactions?
I am new to this forum and dont know how to paste code. So posting my
code in pastebin.
Thanks,