You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Susmit Sarkar (Jira)" <ji...@apache.org> on 2021/01/20 14:56:02 UTC
[jira] [Created] (SSHD-1120) Taking considerable time before
PublickeyAuthenticator being invoked
Susmit Sarkar created SSHD-1120:
-----------------------------------
Summary: Taking considerable time before PublickeyAuthenticator being invoked
Key: SSHD-1120
URL: https://issues.apache.org/jira/browse/SSHD-1120
Project: MINA SSHD
Issue Type: Bug
Reporter: Susmit Sarkar
{code:java}
// code placeholder
// Login via winscp
final SSHDPasswordAuthenticator passwordAuthenticator = new SSHDPasswordAuthenticator(config,final SSHDPasswordAuthenticator passwordAuthenticator = new SSHDPasswordAuthenticator(config, policyInterface);
// Login via ssh terminal like PUTTY
SSHDPublicKeyAuthenticator publicKeyAuthenticator = new SSHDPublicKeyAuthenticator(config, policyInterface); sshdServer.setPublickeyAuthenticator(publicKeyAuthenticator); sshdServer.setPasswordAuthenticator(passwordAuthenticator);
-------------------------------------------------------
Case 1 // During winscp and filezilla
public class SSHDPasswordAuthenticator extends UserAuthPassword implements PasswordAuthenticator {
public boolean authenticate(String username, String password, ServerSession session)public boolean authenticate(String username, String password, ServerSession session) throws AsyncAuthException, PasswordChangeRequiredException {
}
}
-------------------------------------------------------
Case 2 // During SSH TERMINAL like PUTTY
public class SSHDPublicKeyAuthenticator implements PublickeyAuthenticator {
public boolean authenticate(String username, PublicKey key, ServerSession session) throws AsyncAuthException {public boolean authenticate(String username, PublicKey key, ServerSession session) throws AsyncAuthException {
-------------------------------------------------------------------
Case 2 is quite slow it gets stuck before the authenticate is being called.
On debugging found that:
@Override
public void messageReceived(IoSession ioSession, Object message) throws Exception{
org.apache.sshd.common.io.IoSession session = getSession(ioSession);
Readable ioBuffer = MinaSupport.asReadable((IoBuffer) message);
handler.messageReceived(session, ioBuffer);
}
is causing to delay/stuck state. Am i doing anything wrong ?{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org