ids.add(new KeyPairIdentity(session.getFactoryManager(), (KeyPair) o));
}
}
SshAgentFactory factory = session.getFactoryManager().getAgentFactory();
if (factory != null) {
this.agent = factory.createClient(session.getFactoryManager());
for (SshAgent.Pair<PublicKey, String> pair : agent.getIdentities()) {
ids.add(new KeyAgentIdentity(agent, pair.getFirst()));
}
} else {
this.agent = null;