cslgo commented on issue #436:
URL: https://github.com/apache/mina-sshd/issues/436#issuecomment-1882797626

   ` @Test
       public void testProxyWithHostKeyVerificationAndCustomConfig3() throws 
Exception {
           try (SshClient client = setupTestClient()) {
               client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);
               
client.setHostConfigEntryResolver(HostConfigEntry.toHostConfigEntryResolver(Arrays.asList(
                       new HostConfigEntry("server", "ip1", 22, "root", 
"proxy"),
                       new HostConfigEntry("proxy", "ip2", 22, "root"))));
               client.start();
               //Connect via the proxy
               //client.addPasswordIdentity("pass@xord123");
               //client.addPasswordIdentity("cloxi!#@048987");
   
               ConnectFuture verifySession = 
client.connect("server").verify(CONNECT_TIMEOUT);
               if (!verifySession.isConnected()) {
                   logger.error("Session connect failed after {} mill seconds", 
CONNECT_TIMEOUT);
                   throw new RuntimeException(
                           "Session connect failed after " + CONNECT_TIMEOUT + 
" mill seconds.");
               }
               try (ClientSession session = verifySession.getSession()) {
                   session.addPasswordIdentity("pass@word123");
                   session.addPasswordIdentity("cloxi!544048987");
                   session.auth().verify(AUTH_TIMEOUT);
   
                   assertTrue(session.isOpen());
                   doTestCommand(session, "ls -la");
               }
               // make sure the proxy session is closed / closing
               assertTrue(proxySession == null || proxySession.isClosing() || 
proxySession.isClosed());
           }
       }`
   
   console printout:
   `Finished 
com.chinamobile.cmdi.framework.util.ssh.ProxyTest:testProxyWithHostKeyVerificationAndCustomConfig3
 in 77640 ms
   
   org.apache.sshd.common.SshException: No more authentication methods available
   
        at 
org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:141)
        at 
org.apache.sshd.client.future.DefaultConnectFuture.verify(DefaultConnectFuture.java:55)
        at 
org.apache.sshd.client.future.DefaultConnectFuture.verify(DefaultConnectFuture.java:36)
        at 
org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:74)
        at 
com.chinamobile.cmdi.framework.util.ssh.ProxyTest.testProxyWithHostKeyVerificationAndCustomConfig3(ProxyTest.java:239)`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to