net-ssh (4.2.0)
net-ssh-telnet (0.2.1)
ssh = Net::SSH.start(target_server, target_user, :keepalive => true, :keepalive_interval => 10)
shell = Net::SSH::Telnet.new("Session" => ssh, "Timeout" => 60)
ssh.exec!("sleep 3600")
puts "i am still ok"
It will be fine
ssh = Net::SSH.start(target_server, target_user, :keepalive => true, :keepalive_interval => 10)
shell = Net::SSH::Telnet.new("Session" => ssh, "Timeout" => 60)
shell.cmd("sleep 3600")
puts "i am still ok"
it will never puts 'i am still ok' and will raise exception:
/home/deploy/.rvm/gems/ruby-2.3.1@rails4.2/gems/net-ssh-telnet-0.2.1/lib/net/ssh/telnet.rb:363:in `waitfor': uninitialized constant Net::ReadTimeout (NameError)
from /home/deploy/.rvm/gems/ruby-2.3.1@rails4.2/gems/net-ssh-telnet-0.2.1/lib/net/ssh/telnet.rb:473:in `cmd'
I increase timeout to 5000. Client will like not response and cannot execute next step When sleep time up
net-ssh (4.2.0)
net-ssh-telnet (0.2.1)
It will be fine
it will never puts 'i am still ok' and will raise exception:
I increase timeout to 5000. Client will like not response and cannot execute next step When sleep time up