class Net::SSH::Authentication::Methods::Abstract

def userauth_request(username, next_service, auth_method, *others)

of the packet. The new packet is returned, ready for sending.
must be either boolean values or strings, and are tacked onto the end
Creates a new USERAUTH_REQUEST packet. The extra arguments on the end
def userauth_request(username, next_service, auth_method, *others)
  buffer = Net::SSH::Buffer.from(:byte, USERAUTH_REQUEST,
    :string, username, :string, next_service, :string, auth_method)
  others.each do |value|
    case value
    when true, false then buffer.write_bool(value)
    when String      then buffer.write_string(value)
    else raise ArgumentError, "don't know how to write #{value.inspect}"
    end
  end
  buffer
end