}
throw new IllegalStateException("No ssh agent found");
}
public SshAgentServer createServer(ConnectionService service) throws IOException {
Session session = service.getSession();
if (!(session instanceof ServerSession)) {
throw new IllegalStateException("The session used to create an agent server proxy must be a server session");
}
final AgentServerProxy proxy = new AgentServerProxy(service);
proxies.put(proxy.getId(), proxy);