use of org.apache.sshd.server.config.keys.AuthorizedKeysAuthenticator in project winery by eclipse.
the class TestWithGitRepoAndSshServer method setUp.
protected static void setUp() throws IOException, URISyntaxException {
sshd = SshServer.setUpDefaultServer();
sshd.setHost("localhost");
sshd.setPort(sshPort);
sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider(new File("host.ser").toPath()));
sshd.setPublickeyAuthenticator(new AuthorizedKeysAuthenticator(Paths.get(Objects.requireNonNull(ClassLoader.getSystemClassLoader().getResource("authorized_keys")).toURI())));
sshd.start();
}
Aggregations