liuziyu1226 opened a new issue, #650: URL: https://github.com/apache/mina-sshd/issues/650
### Version 2.8.0 ### Bug description I overwrote the authenticate function of the PublickeyAuthenticator.java and registered it with the ssh server. `sshServer.setPublickeyAuthenticator(publicKeyAuth);` But when the client provides the key and certificate, MINA SSHD displays an error: `2024-12-25 17:29:30.882 sshd-SshServer[53600a30](port=2222)-nio2-thread-5 WARN org.apache.sshd.server.session.ServerUserAuthService.warn - handleUserAuthRequestMessage(ServerSessionImpl[null@/127.0.0.1:56562]) Failed (InvalidKeyException) to authenticate using factory method=publickey: Supplied key (org.apache.sshd.common.config.keys.OpenSshCertificateImpl) is not a RSAPublicKey instance` After debugging, I found that the problem is that when MINA SSHD initializes the signature verifier of the public key, the public key passed in is of type OpenSshCertificateImpl, while Signature expects an RSAPublicKey object. Why does this problem occur? How can I solve it? ### Actual behavior My ssh server configuration: `sshServer = SshServer.setUpDefaultServer(); sshServer.setPort(2222); sshServer.setKeyPairProvider(ResolveServerKeys.getKey()); sshServer.setPasswordAuthenticator(passwordAuth); sshServer.setKeyboardInteractiveAuthenticator(interactiveAuth); sshServer.setPublickeyAuthenticator(publicKeyAuth); sshServer.setShellFactory(jumperShellFactory); ... ` ### Expected behavior I expect that when the client uses public key authentication, it can enter the authenticate function I overwrote to verify it and return the result, but it has not entered my method yet and an exception is thrown when initializing the signature verifier. ### Relevant log output _No response_ ### Other information _No response_ -- 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.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