# File lib/net/ssh/userauth/agent.rb, line 69 def connect! @socket = @socket_factory.open( @socket_name ) # determine what type of agent we're communicating with buffer = @buffers.writer buffer.write_string Net::SSH::Transport::Session.version type, body = send_with_reply SSH2_AGENT_REQUEST_VERSION, buffer if type == SSH2_AGENT_VERSION_RESPONSE raise NotImplementedError, "SSH2 agents are not yet supported" elsif type != SSH_AGENT_RSA_IDENTITIES_ANSWER raise AgentError, "unknown response from agent: #{type}, #{body.to_s.inspect}" end end