diff --git a/server/openejb-ssh/src/main/java/org/apache/openejb/server/ssh/OpenEJBShellFactory.java b/server/openejb-ssh/src/main/java/org/apache/openejb/server/ssh/OpenEJBShellFactory.java index 55b67ad2efd..9971e80f7b6 100644 --- a/server/openejb-ssh/src/main/java/org/apache/openejb/server/ssh/OpenEJBShellFactory.java +++ b/server/openejb-ssh/src/main/java/org/apache/openejb/server/ssh/OpenEJBShellFactory.java @@ -16,12 +16,13 @@ */ package org.apache.openejb.server.ssh; -import org.apache.sshd.common.Factory; +import org.apache.sshd.server.channel.ChannelSession; import org.apache.sshd.server.command.Command; +import org.apache.sshd.server.shell.ShellFactory; -public class OpenEJBShellFactory implements Factory { - private String bind; - private int port; +public class OpenEJBShellFactory implements ShellFactory { + private final String bind; + private final int port; public OpenEJBShellFactory(String bind, int port) { this.bind = bind; @@ -29,7 +30,7 @@ public OpenEJBShellFactory(String bind, int port) { } @Override - public Command create() { + public Command createShell(ChannelSession channelSession) { return new OpenEJBCommands(bind, port); } } diff --git a/server/openejb-ssh/src/test/java/org/apache/openejb/server/ssh/SSHServerTest.java b/server/openejb-ssh/src/test/java/org/apache/openejb/server/ssh/SSHServerTest.java index 1ea451d556a..25d4c7593c6 100644 --- a/server/openejb-ssh/src/test/java/org/apache/openejb/server/ssh/SSHServerTest.java +++ b/server/openejb-ssh/src/test/java/org/apache/openejb/server/ssh/SSHServerTest.java @@ -67,7 +67,7 @@ public void call() throws Exception { try { final ClientSession session = client.connect("jonathan", "localhost", 4222).verify().getSession(); session.addPasswordIdentity("secret"); - session.auth().verify(FactoryManager.DEFAULT_AUTH_TIMEOUT); + session.auth().verify(); final ClientChannel channel = session.createChannel("shell"); ByteArrayOutputStream sent = new ByteArrayOutputStream();