'Set up a connection to the authentication agent and trigger its
initialization.
@param endpoint: An endpoint which can be used to connect to the
authentication agent.
@type endpoint: L{IStreamClientEndpoint} provider
@return: A L{Deferred} which fires when the agent connection is ready
for use.'

def connectToAgent(self, endpoint):

    factory = Factory()
    factory.protocol = SSHAgentClient
    d = endpoint.connect(factory)
    def connected(agent):
        self.agent = agent
        return agent.getPublicKeys()
    d.addCallback(connected)
    return d
