# File lib/net/ssh/authentication/agent.rb, line 83 83: def negotiate! 84: # determine what type of agent we're communicating with 85: type, body = send_and_wait(SSH2_AGENT_REQUEST_VERSION, :string, Transport::ServerVersion::PROTO_VERSION) 86: 87: if type == SSH2_AGENT_VERSION_RESPONSE 88: raise NotImplementedError, "SSH2 agents are not yet supported" 89: elsif type != SSH_AGENT_RSA_IDENTITIES_ANSWER1 && type != SSH_AGENT_RSA_IDENTITIES_ANSWER2 90: raise AgentError, "unknown response from agent: #{type}, #{body.to_s.inspect}" 91: end 92: end