I am learning ssh module. I have a question about the channel.
Please kindly give me some tips if you are familiar with this module.
Thank you in advice!!
Net::SSH.start(host,user,:password=>pass) do |ssh|
ssh.open_channel do |channel|
channel.on_data do |ch, data|
if data =~ /Done/
ch.exec(“command2”) --here is the question
channel.exec(“command1”) --cmd1 will return different result
Can I invoke exec(channel) twice in one channel?
If not, what is the use for “ch” variable here.