Java mina sshd

Hi guys, I want to build an SSH server with Java mina and finally managed to get all the dependencies necessary to resolve class missing errors. Now I am encountering a new error which just blows my mind....
Unexpected problem occurred during version sanity check
Reported exception:
java.lang.AbstractMethodError: Receiver class org.slf4j.simple.SimpleServiceProvider does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequestedApiVersion()' of interface org.slf4j.spi.SLF4JServiceProvider.
at org.slf4j.LoggerFactory.versionSanityCheck(LoggerFactory.java:366)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:184)
at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:490)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:476)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:425)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:451)
at org.apache.sshd.common.util.logging.AbstractLoggingBean.<init>(AbstractLoggingBean.java:66)
at org.apache.sshd.common.util.logging.AbstractLoggingBean.<init>(AbstractLoggingBean.java:44)
at org.apache.sshd.common.auth.AbstractUserAuthMethodFactory.<init>(AbstractUserAuthMethodFactory.java:36)
at org.apache.sshd.server.auth.AbstractUserAuthFactory.<init>(AbstractUserAuthFactory.java:32)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<init>(UserAuthPublicKeyFactory.java:57)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<init>(UserAuthPublicKeyFactory.java:53)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory$1.<init>(UserAuthPublicKeyFactory.java:36)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<clinit>(UserAuthPublicKeyFactory.java:36)
at org.apache.sshd.server.ServerAuthenticationManager.<clinit>(ServerAuthenticationManager.java:56)
at src.Main.main(Main.java:19)
Unexpected problem occurred during version sanity check
Reported exception:
java.lang.AbstractMethodError: Receiver class org.slf4j.simple.SimpleServiceProvider does not define or inherit an implementation of the resolved method 'abstract java.lang.String getRequestedApiVersion()' of interface org.slf4j.spi.SLF4JServiceProvider.
at org.slf4j.LoggerFactory.versionSanityCheck(LoggerFactory.java:366)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:184)
at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:490)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:476)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:425)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:451)
at org.apache.sshd.common.util.logging.AbstractLoggingBean.<init>(AbstractLoggingBean.java:66)
at org.apache.sshd.common.util.logging.AbstractLoggingBean.<init>(AbstractLoggingBean.java:44)
at org.apache.sshd.common.auth.AbstractUserAuthMethodFactory.<init>(AbstractUserAuthMethodFactory.java:36)
at org.apache.sshd.server.auth.AbstractUserAuthFactory.<init>(AbstractUserAuthFactory.java:32)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<init>(UserAuthPublicKeyFactory.java:57)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<init>(UserAuthPublicKeyFactory.java:53)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory$1.<init>(UserAuthPublicKeyFactory.java:36)
at org.apache.sshd.server.auth.pubkey.UserAuthPublicKeyFactory.<clinit>(UserAuthPublicKeyFactory.java:36)
at org.apache.sshd.server.ServerAuthenticationManager.<clinit>(ServerAuthenticationManager.java:56)
at src.Main.main(Main.java:19)
The code I am trying to run:
4 Replies
JavaBot
JavaBot6mo ago
This post has been reserved for your question.
Hey @netty.bootstrap! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
netty
nettyOP6mo ago
package src;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.apache.sshd.common.cipher.BuiltinCiphers;
import org.apache.sshd.common.util.GenericUtils;
import org.apache.sshd.server.SshServer;
import org.apache.sshd.server.shell.ProcessShellFactory;

public class Main {

public static void main(String[] args) throws IOException {

SshServer sshd = SshServer.setUpDefaultServer();
sshd.setPort(999);

sshd.setCipherFactories(Arrays.asList(BuiltinCiphers.aes256ctr, BuiltinCiphers.aes192ctr, BuiltinCiphers.aes128ctr));
/* sshd.setPasswordAuthenticator(new MyPasswordAuthenticator());
sshd.setPublickeyAuthenticator(new MyPublickeyAuthenticator());
sshd.setKeyboardInteractiveAuthenticator(new MyKeyboardInteractiveAuthenticator()); */
sshd.start();

}


}
package src;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.apache.sshd.common.cipher.BuiltinCiphers;
import org.apache.sshd.common.util.GenericUtils;
import org.apache.sshd.server.SshServer;
import org.apache.sshd.server.shell.ProcessShellFactory;

public class Main {

public static void main(String[] args) throws IOException {

SshServer sshd = SshServer.setUpDefaultServer();
sshd.setPort(999);

sshd.setCipherFactories(Arrays.asList(BuiltinCiphers.aes256ctr, BuiltinCiphers.aes192ctr, BuiltinCiphers.aes128ctr));
/* sshd.setPasswordAuthenticator(new MyPasswordAuthenticator());
sshd.setPublickeyAuthenticator(new MyPublickeyAuthenticator());
sshd.setKeyboardInteractiveAuthenticator(new MyKeyboardInteractiveAuthenticator()); */
sshd.start();

}


}
Help??
netty
nettyOP6mo ago
GitHub
mina-sshd/docs at master · apache/mina-sshd
Apache MINA sshd is a comprehensive Java library for client- and server-side SSH. - apache/mina-sshd
JavaBot
JavaBot6mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server