BUG-9261: Add basic public key auth to testtool
[netconf.git] / netconf / netconf-ssh / src / main / java / org / opendaylight / netconf / ssh / SshProxyServer.java
index 17af06e796d9eec8ea16fb77d6558c737611a837..f525674436d9a9e01eef95575199edfc032e9187 100644 (file)
@@ -70,6 +70,8 @@ public class SshProxyServer implements AutoCloseable {
             (username, password, session)
                 -> sshProxyServerConfiguration.getAuthenticator().authenticated(username, password));
 
+        sshProxyServerConfiguration.getPublickeyAuthenticator().ifPresent(sshServer::setPublickeyAuthenticator);
+
         sshServer.setKeyPairProvider(sshProxyServerConfiguration.getKeyPairProvider());
 
         sshServer.setIoServiceFactoryFactory(nioServiceWithPoolFactoryFactory);