Skip to content

Commit

Permalink
Fix remaining issues from Mina SSHD Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
rzo1 committed Apr 30, 2024
1 parent 1515917 commit ac55dd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@
*/
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<Command> {
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;
this.port = port;
}

@Override
public Command create() {
public Command createShell(ChannelSession channelSession) {
return new OpenEJBCommands(bind, port);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ac55dd6

Please sign in to comment.