class Net::SSH::Authentication::Session
def expect_message(type)
Blocks until a packet is received, and returns it if it is of the given
def expect_message(type) message = next_message raise Net::SSH::Exception, "expected #{type}, got #{message.type} (#{message})" unless message.type == type message end