sshd.setPublickeyAuthenticator(new BogusPublickeyAuthenticator());
sshd.setServiceFactories(Arrays.asList(
new ServerUserAuthService.Factory() {
@Override
public Service create(Session session) throws IOException {
return new ServerUserAuthService(session) {
@Override
public void process(byte cmd, Buffer buffer) throws Exception {
authLatch.await();
super.process(cmd, buffer);
}