mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lyor Goldstein (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-1120) Taking considerable time before PublickeyAuthenticator being invoked
Date Thu, 21 Jan 2021 16:48:01 GMT

    [ https://issues.apache.org/jira/browse/SSHD-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17269423#comment-17269423
] 

Lyor Goldstein commented on SSHD-1120:
--------------------------------------

{quote}
i am not replacing anything
{quote}
Then why is your code stating
{code:java}
public class SSHDPasswordAuthenticator extends UserAuthPassword
{code}
FYI {{UserAuthPassword}} is an +internal+ class that you should not override/extend unless
you really know what you are doing.

> Taking considerable time before PublickeyAuthenticator being invoked
> --------------------------------------------------------------------
>
>                 Key: SSHD-1120
>                 URL: https://issues.apache.org/jira/browse/SSHD-1120
>             Project: MINA SSHD
>          Issue Type: Question
>            Reporter: Susmit Sarkar
>            Priority: Major
>
> {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


Mime
View raw message