[ https://issues.apache.org/jira/browse/SSHD-930?focusedWorklogId=276772&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-276772 ]
ASF GitHub Bot logged work on SSHD-930: --------------------------------------- Author: ASF GitHub Bot Created on: 15/Jul/19 15:13 Start Date: 15/Jul/19 15:13 Worklog Time Spent: 10m Work Description: tomaswolf commented on pull request #105: SSHD-930 Send the client version string after receiving the version string of the server URL: https://github.com/apache/mina-sshd/pull/105#discussion_r303486677 ########## File path: sshd-core/src/main/java/org/apache/sshd/client/session/AbstractClientSession.java ########## @@ -231,37 +240,55 @@ public KeyPair removePublicKeyIdentity(KeyPair kp) { return null; } - int index = AuthenticationIdentitiesProvider.findIdentityIndex( - identities, AuthenticationIdentitiesProvider.KEYPAIR_IDENTITY_COMPARATOR, kp); + int index = AuthenticationIdentitiesProvider.findIdentityIndex(identities, + AuthenticationIdentitiesProvider.KEYPAIR_IDENTITY_COMPARATOR, kp); if (index >= 0) { return (KeyPair) identities.remove(index); } else { return null; } } - protected IoWriteFuture sendClientIdentification() throws Exception { - clientVersion = resolveIdentificationString(ClientFactoryManager.CLIENT_IDENTIFICATION); + protected void initializeKexPhase() throws Exception { + sendClientIdentification(); + + KexExtensionHandler extHandler = getKexExtensionHandler(); + if ((extHandler == null) || (!extHandler.isKexExtensionsAvailable(this, AvailabilityPhase.PREKEX))) { + kexState.set(KexState.INIT); + sendKexInit(); + } else { + if (log.isDebugEnabled()) { + log.debug("initializeKexPhase({}) delay KEX-INIT until server-side one received", this); + } + } + } + protected ClientProxyConnector initializeProxyConnector() throws Exception { Review comment: Why return the ClientProxyConnector here? The only place it's called the return value is ignored, and subclasses could get it via `getClientProxyConnector()` anyway. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 276772) Time Spent: 40m (was: 0.5h) > Send the client version string after receiving the version string of the > server > ------------------------------------------------------------------------------- > > Key: SSHD-930 > URL: https://issues.apache.org/jira/browse/SSHD-930 > Project: MINA SSHD > Issue Type: Improvement > Affects Versions: 2.2.0 > Reporter: Zhenliang Su > Assignee: Goldstein Lyor > Priority: Major > Fix For: 2.3.1 > > Time Spent: 40m > Remaining Estimate: 0h > > The rfc4253 does not indicate whether the ssh client must send its own > version number right after receiving the version number of the server. > I have encountered a situation where mina-sshd is used to connect to cisco's > sshd service, sometimes it can be connected, sometimes not connected. > Some rules are found by capturing packets. If the client sends its own > version number after receiving the version number of the server, it can be > connected. If the client sends its own version number before receiving the > version number of the server, then it will not be connected. > I think, a better way is to change the SshClient code to send the version > number of the client right after receiving the version number of the server. -- This message was sent by Atlassian JIRA (v7.6.14#76016) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org