[ https://issues.apache.org/jira/browse/SSHD-1214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17419999#comment-17419999 ]
Thomas Wolf commented on SSHD-1214: ----------------------------------- I see now that * you have control of the server, since you showed the server-side config in our original report, and * you have {{MaxAuthTries 3}} set. Sorry for not looking better before. So, the server disconnects after the third attempt with that C:\Users\y00509705\.ssh\id_rsa key and ssh-rsa signature. This means that this key indeed does not work. Configure your client to not use it. > sshd login success using sshd 2.6.0 but failure with sshd 2.7.0 > --------------------------------------------------------------- > > Key: SSHD-1214 > URL: https://issues.apache.org/jira/browse/SSHD-1214 > Project: MINA SSHD > Issue Type: Bug > Affects Versions: 2.7.0 > Reporter: wei yao > Priority: Major > Fix For: 2.6.0 > > Attachments: error.txt, ok.txt > > > Hi, dear team. > I'am facing one issue that the following code could login to one ssh server > with sshd 2.6.0 but fail with 2.7.0. The configuration of sshd_config is: > PermitRootLogin yes > PasswordAuthentication yes > UseDNS no > Protocol 2 > LogLevel VERBOSE > MaxAuthTries 3 > PubkeyAuthentication yes > RSAAuthentication yes > IgnoreRhosts yes > RhostsRSAAuthentication no > HostbasedAuthentication no > PermitEmptyPasswords no > PermitUserEnvironment no > Ciphers aes128-ctr,aes192-ctr,aes256-ctr > ClientAliveInterval 300 > ClientAliveCountMax 0 > Banner /etc/issue.net > MACs hmac-sha2-256,hmac-sha2-512 > StrictModes yes > AllowTcpForwarding no > AllowAgentForwarding no > GatewayPorts no > PermitTunnel no > KexAlgorithms > ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 > > the java code is following: > {code:java} > // > public static String sshAndExecCommandThenGetResult(String ip, int port, > String username, String password, String command){ > @Cleanup(value = "stop") > SshClient client = SshClient.setUpDefaultClient(); > client.start(); > try (ClientSession session = client.connect(username, ip, > port).verify(Duration.ofSeconds(20)) > .getSession()) { > session.addPasswordIdentity(password); // for password-based > authentication > ClientSessionImpl c = (ClientSessionImpl)session; > AuthFuture authFuture = session.auth(); > authFuture.verify(Duration.ofSeconds(10)); > return session.executeRemoteCommand(command); > } catch (Exception e) { > log.error(e.getMessage(), e); > return "exception when exec command:" + e.getMessage(); > } > {code} > The debug log is in attachment. > Please check. Thanks. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org