class Net::SSH::Connection::Session
def close
successfully closed, and then closes the underlying transport layer
Closes the session gracefully, blocking until all channels have
def close info { "closing remaining channels (#{channels.length} open)" } channels.each { |id, channel| channel.close } begin loop(0.1) { channels.any? } rescue Net::SSH::Disconnect raise unless channels.empty? end transport.close end