Greetings all,

Here's my test code:

package test.sshd;

import java.io.IOException;

import org.apache.sshd.SshServer;
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider;

public class RequestListener {

    private static void run(String[] args) {
        SshServer sshd = SshServer.setUpDefaultServer();
        sshd.setPort(57000);
        sshd.setKeyPairProvider(new
SimpleGeneratorHostKeyProvider("hostkey.ser"));
        sshd.setCommandFactory(new OrCommandFactory());
        try {
            sshd.start();
        }
        catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        run(args);
    }
}

Here's the result when I run:

250 [main] INFO org.apache.sshd.common.util.SecurityUtils - Trying to
register BouncyCastle as a JCE provider
1426 [main] INFO org.apache.sshd.common.util.SecurityUtils - Registration
succeeded
Exception in thread "main" java.lang.IllegalArgumentException:
UserAuthFactories not set
    at org.apache.sshd.SshServer.checkConfig(SshServer.java:302)
    at org.apache.sshd.SshServer.start(SshServer.java:337)
    at test.sshd.RequestListener.run(RequestListener.java:16)
    at test.sshd.RequestListener.main(RequestListener.java:27)

How come?

Thanks.

Lou.

Reply via email to