[jira] [Resolved] (DIRMINA-1121) Mina v2.1.1 -v2.1.3 are unable to receive writeRequest message(packet loss) in concurrent access

2020-06-08 Thread li-libo (Jira)


 [ 
https://issues.apache.org/jira/browse/DIRMINA-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

li-libo resolved DIRMINA-1121.
--
Resolution: Not A Problem

> Mina v2.1.1 -v2.1.3 are unable to receive writeRequest message(packet loss) 
> in concurrent access
> 
>
> Key: DIRMINA-1121
> URL: https://issues.apache.org/jira/browse/DIRMINA-1121
> Project: MINA
>  Issue Type: Bug
>  Components: Filter
>Affects Versions: 2.1.1, 2.1.2, 2.1.3
>Reporter: li-libo
>Assignee: Jonathan Valliere
>Priority: Major
>
> Mina v2.1.1-v2.1.3 are unable to receive writeRequest message(packet loss) in 
> concurrent access, the following code is bug and my bug fix in 
> ProtocolCodecFilter # filterWrite method
> {color:#ff}Note: The bug 2 is the cause of packet loss!{color}
> /**
>  * {@inheritDoc}*/
>  @Override
>  public void filterWrite(NextFilter nextFilter, IoSession session, 
> WriteRequest writeRequest) throws Exception
>  { Object message = writeRequest.getMessage(); // Bypass the encoding if the 
> message is contained in a IoBuffer, // as it has already been encoded before 
> if ((message instanceof IoBuffer) || (message instanceof FileRegion))
> { nextFilter.filterWrite(session, writeRequest); return; }
> // Get the encoder in the session
>  ProtocolEncoder encoder = factory.getEncoder(session);
> {color:#ff}// bug 1:{color} {color:#00875a}The encoderOut is public that 
> may cause {color}{color:#00875a}duplicated message to sent.
>  // ProtocolEncoderOutput encoderOut = getEncoderOut(session, nextFilter, 
> writeRequest);{color}
> {color:#ff}// bug 1 fix:{color}
>  {color:#de350b}ProtocolEncoderOutput encoderOut = new 
> ProtocolEncoderOutputImpl(session, nextFilter, writeRequest);{color}
> if (encoder == null)
> { throw new ProtocolEncoderException("The encoder is null for the session " + 
> session); }
> try {
>  // Now we can try to encode the response
>  encoder.encode(session, message, encoderOut);
> // Send it directly
>  Queue bufferQueue = ((AbstractProtocolEncoderOutput) 
> encoderOut).getMessageQueue();
> // Write all the encoded messages now
>  while (!bufferQueue.isEmpty()) {
>  Object encodedMessage = bufferQueue.poll();
> if (encodedMessage == null)
> { break; }
> // Flush only when the buffer has remaining.
>  if (!(encodedMessage instanceof IoBuffer) || ((IoBuffer) 
> encodedMessage).hasRemaining()) {
>  {color:#ff}// major bug 2:{color} {color:#00875a}The same writeRequest's 
> message may be rewritten when the code enters while loop repeatedly,{color} 
> {color:#00875a}it will lead to the current message  is lost.{color}
> {color:#00875a}// writeRequest.setMessage(encodedMessage);{color}
>  {color:#00875a} // nextFilter.filterWrite(session, writeRequest);{color}
>  {color:#ff}// bug 2 fix:{color}
>  {color:#de350b}DefaultWriteRequest defaultWriteRequest = new 
> DefaultWriteRequest(writeRequest.getOriginalMessage(),{color}
>  {color:#de350b} writeRequest.getFuture(), 
> writeRequest.getDestination());{color}
>  {color:#de350b} defaultWriteRequest.setMessage(encodedMessage);{color}
>  {color:#de350b} nextFilter.filterWrite(session, defaultWriteRequest);{color}
>  }
>  }
>  } catch (Exception e) {
>  ProtocolEncoderException pee;
> // Generate the correct exception
>  if (e instanceof ProtocolEncoderException)
> { pee = (ProtocolEncoderException) e; }
> else
> { pee = new ProtocolEncoderException(e); }
> throw pee;
>  }
>  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Assigned] (DIRMINA-1121) Mina v2.1.1 -v2.1.3 are unable to receive writeRequest message(packet loss) in concurrent access

2020-06-08 Thread Jonathan Valliere (Jira)


 [ 
https://issues.apache.org/jira/browse/DIRMINA-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Valliere reassigned DIRMINA-1121:
--

Assignee: Jonathan Valliere

> Mina v2.1.1 -v2.1.3 are unable to receive writeRequest message(packet loss) 
> in concurrent access
> 
>
> Key: DIRMINA-1121
> URL: https://issues.apache.org/jira/browse/DIRMINA-1121
> Project: MINA
>  Issue Type: Bug
>  Components: Filter
>Affects Versions: 2.1.1, 2.1.2, 2.1.3
>Reporter: li-libo
>Assignee: Jonathan Valliere
>Priority: Major
>
> Mina v2.1.1-v2.1.3 are unable to receive writeRequest message(packet loss) in 
> concurrent access, the following code is bug and my bug fix in 
> ProtocolCodecFilter # filterWrite method
> {color:#ff}Note: The bug 2 is the cause of packet loss!{color}
> /**
>  * {@inheritDoc}*/
>  @Override
>  public void filterWrite(NextFilter nextFilter, IoSession session, 
> WriteRequest writeRequest) throws Exception
>  { Object message = writeRequest.getMessage(); // Bypass the encoding if the 
> message is contained in a IoBuffer, // as it has already been encoded before 
> if ((message instanceof IoBuffer) || (message instanceof FileRegion))
> { nextFilter.filterWrite(session, writeRequest); return; }
> // Get the encoder in the session
>  ProtocolEncoder encoder = factory.getEncoder(session);
> {color:#ff}// bug 1:{color} {color:#00875a}The encoderOut is public that 
> may cause {color}{color:#00875a}duplicated message to sent.
>  // ProtocolEncoderOutput encoderOut = getEncoderOut(session, nextFilter, 
> writeRequest);{color}
> {color:#ff}// bug 1 fix:{color}
>  {color:#de350b}ProtocolEncoderOutput encoderOut = new 
> ProtocolEncoderOutputImpl(session, nextFilter, writeRequest);{color}
> if (encoder == null)
> { throw new ProtocolEncoderException("The encoder is null for the session " + 
> session); }
> try {
>  // Now we can try to encode the response
>  encoder.encode(session, message, encoderOut);
> // Send it directly
>  Queue bufferQueue = ((AbstractProtocolEncoderOutput) 
> encoderOut).getMessageQueue();
> // Write all the encoded messages now
>  while (!bufferQueue.isEmpty()) {
>  Object encodedMessage = bufferQueue.poll();
> if (encodedMessage == null)
> { break; }
> // Flush only when the buffer has remaining.
>  if (!(encodedMessage instanceof IoBuffer) || ((IoBuffer) 
> encodedMessage).hasRemaining()) {
>  {color:#ff}// major bug 2:{color} {color:#00875a}The same writeRequest's 
> message may be rewritten when the code enters while loop repeatedly,{color} 
> {color:#00875a}it will lead to the current message  is lost.{color}
> {color:#00875a}// writeRequest.setMessage(encodedMessage);{color}
>  {color:#00875a} // nextFilter.filterWrite(session, writeRequest);{color}
>  {color:#ff}// bug 2 fix:{color}
>  {color:#de350b}DefaultWriteRequest defaultWriteRequest = new 
> DefaultWriteRequest(writeRequest.getOriginalMessage(),{color}
>  {color:#de350b} writeRequest.getFuture(), 
> writeRequest.getDestination());{color}
>  {color:#de350b} defaultWriteRequest.setMessage(encodedMessage);{color}
>  {color:#de350b} nextFilter.filterWrite(session, defaultWriteRequest);{color}
>  }
>  }
>  } catch (Exception e) {
>  ProtocolEncoderException pee;
> // Generate the correct exception
>  if (e instanceof ProtocolEncoderException)
> { pee = (ProtocolEncoderException) e; }
> else
> { pee = new ProtocolEncoderException(e); }
> throw pee;
>  }
>  }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Resolved] (DIRMINA-1120) ProtocolCodecFilter does not support concurrent access

2020-06-08 Thread Jonathan Valliere (Jira)


 [ 
https://issues.apache.org/jira/browse/DIRMINA-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Valliere resolved DIRMINA-1120.

Resolution: Not A Bug

Writing the same WriteRequest more than once is UNSUPPORTED in MINA unless it 
is confirmed that the WriteRequest has fully written to the underlying IO prior 
to the time the object was reused.

> ProtocolCodecFilter does not support concurrent access
> --
>
> Key: DIRMINA-1120
> URL: https://issues.apache.org/jira/browse/DIRMINA-1120
> Project: MINA
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.1.1, 2.1.2, 2.1.3
>Reporter: Cloudor Pu
>Assignee: Jonathan Valliere
>Priority: Major
>
> In ProtocolCodecFilter#filterWrite method, the same writeRequest might be 
> written more than once and previous encoded message would be overwritten by 
> next ones and cause message lost problems.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Comment Edited] (SSHD-1014) Password Change Request - 'handleClientPasswordChangeRequest' not getting invoked with the sshd-core-2.3.1 jar version used.

2020-06-08 Thread Lyor Goldstein (Jira)


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

Lyor Goldstein edited comment on SSHD-1014 at 6/8/20, 4:56 PM:
---

I am not sure that this flag is related to the 
{{handleClientPasswordChangeRequest}} - it only relaxes the requirement that 
password authentication take place only if executed over secure connection. It 
still  does not explain the behavior - if indeed it is a bug. As far as I can 
tell the method is invoked only if {{SSH_MSG_USERAUTH_REQUEST}} message has a 
TRUE indicator - as described in [RFC4252 - section 
8|https://tools.ietf.org/html/rfc4252#section-8]. Therefore, in order for this 
to be considered a bug then we must make sure that we get a _true_ flag but it 
is not handled properly...


was (Author: lgoldstein):
I am not sure that this flag is related to the 
{{handleClientPasswordChangeRequest}} - it only relaxes the requirement that 
password authentication take place only if executed over secure connection. It 
still  does not explain the behavior - if indeed it is a bug. As far as I can 
tell the method is invoked only if {{SSH_MSG_USERAUTH_REQUEST}} message has a 
TRUE indicator - as described in [RFC4252 - secion 
8|https://tools.ietf.org/html/rfc4252#section-8]

> Password Change Request - 'handleClientPasswordChangeRequest' not getting 
> invoked with the sshd-core-2.3.1 jar version used.
> 
>
> Key: SSHD-1014
> URL: https://issues.apache.org/jira/browse/SSHD-1014
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Rohini Jori
>Priority: Major
> Attachments: Normal-Login-LOGS.txt, error1.png, 
> handleClientPasswordChange  CODE.txt, password-change-Request- LOGS.txt
>
>
> *Question:*
> Wanted to know  why the 'handleClientPasswordChangeRequest' method is working 
> with 'sshd-core-2.3.0' jar and not with the 'sshd-core-2.3.1' jar?
> *Description*:
>  In case of password change request, the authenticate method of 
> PasswordAuthenticator class throws the 'PasswordChangeRequiredException' 
>  which will internally calls 'handleClientPasswordChangeRequest' method where 
> the password is changed for the user.
> Method calls sequence-
>  1. PasswordAuthenticator.authenticate()
>  2. authenticate() method throws PasswordChangeRequiredException.
>  3. UserAuthPassword.checkPassword()
>  4. UserAuthPassword.handlePasswordChangeRequest()
>  5. shows the prompt to get the new password from user. Then click ok.
>  6. UserAuthPassword.handleClientPasswordChangeRequest() - change old 
> password.
>   
>   
>  *So the problem* is that  when we used the sshd-core-2.3.1 jar, The 
> 'handleClientPasswordChangeRequest' is not getting called after we receive 
> the password-change request. 
>   
>  But  When we used the 'sshd-core-2.3.0' jar  the 
> 'handleClientPasswordChangeRequest' method is getting called and also the 
> password changed successfully.
>  But after that we got the problem in authentication. we get the  'Server 
> refused to start a shell/command' authentication failed error.
> I have attached the logs & image for reference.
>  
> So Is this dependent on 'sshd-core' jar? Could you please help?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SSHD-1014) Password Change Request - 'handleClientPasswordChangeRequest' not getting invoked with the sshd-core-2.3.1 jar version used.

2020-06-08 Thread Lyor Goldstein (Jira)


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

Lyor Goldstein commented on SSHD-1014:
--

I am not sure that this flag is related to the 
{{handleClientPasswordChangeRequest}} - it only relaxes the requirement that 
password authentication take place only if executed over secure connection. It 
still  does not explain the behavior - if indeed it is a bug. As far as I can 
tell the method is invoked only if {{SSH_MSG_USERAUTH_REQUEST}} message has a 
TRUE indicator - as described in [RFC4252 - secion 
8|https://tools.ietf.org/html/rfc4252#section-8]

> Password Change Request - 'handleClientPasswordChangeRequest' not getting 
> invoked with the sshd-core-2.3.1 jar version used.
> 
>
> Key: SSHD-1014
> URL: https://issues.apache.org/jira/browse/SSHD-1014
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Rohini Jori
>Priority: Major
> Attachments: Normal-Login-LOGS.txt, error1.png, 
> handleClientPasswordChange  CODE.txt, password-change-Request- LOGS.txt
>
>
> *Question:*
> Wanted to know  why the 'handleClientPasswordChangeRequest' method is working 
> with 'sshd-core-2.3.0' jar and not with the 'sshd-core-2.3.1' jar?
> *Description*:
>  In case of password change request, the authenticate method of 
> PasswordAuthenticator class throws the 'PasswordChangeRequiredException' 
>  which will internally calls 'handleClientPasswordChangeRequest' method where 
> the password is changed for the user.
> Method calls sequence-
>  1. PasswordAuthenticator.authenticate()
>  2. authenticate() method throws PasswordChangeRequiredException.
>  3. UserAuthPassword.checkPassword()
>  4. UserAuthPassword.handlePasswordChangeRequest()
>  5. shows the prompt to get the new password from user. Then click ok.
>  6. UserAuthPassword.handleClientPasswordChangeRequest() - change old 
> password.
>   
>   
>  *So the problem* is that  when we used the sshd-core-2.3.1 jar, The 
> 'handleClientPasswordChangeRequest' is not getting called after we receive 
> the password-change request. 
>   
>  But  When we used the 'sshd-core-2.3.0' jar  the 
> 'handleClientPasswordChangeRequest' method is getting called and also the 
> password changed successfully.
>  But after that we got the problem in authentication. we get the  'Server 
> refused to start a shell/command' authentication failed error.
> I have attached the logs & image for reference.
>  
> So Is this dependent on 'sshd-core' jar? Could you please help?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Assigned] (DIRMINA-1120) ProtocolCodecFilter does not support concurrent access

2020-06-08 Thread Jonathan Valliere (Jira)


 [ 
https://issues.apache.org/jira/browse/DIRMINA-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Valliere reassigned DIRMINA-1120:
--

Assignee: Jonathan Valliere

> ProtocolCodecFilter does not support concurrent access
> --
>
> Key: DIRMINA-1120
> URL: https://issues.apache.org/jira/browse/DIRMINA-1120
> Project: MINA
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 2.1.1, 2.1.2, 2.1.3
>Reporter: Cloudor Pu
>Assignee: Jonathan Valliere
>Priority: Major
>
> In ProtocolCodecFilter#filterWrite method, the same writeRequest might be 
> written more than once and previous encoded message would be overwritten by 
> next ones and cause message lost problems.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SSHD-1009) Support WinSCP shell interactions

2020-06-08 Thread Lyor Goldstein (Jira)


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

Lyor Goldstein commented on SSHD-1009:
--

{quote}
 pushed an updated fix, all is good on OSX.
{quote}
Great - thanks a lot...

> Support WinSCP shell interactions
> -
>
> Key: SSHD-1009
> URL: https://issues.apache.org/jira/browse/SSHD-1009
> Project: MINA SSHD
>  Issue Type: New Feature
>Affects Versions: 2.3.0
>Reporter: Sreedhar J
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.5.0
>
> Attachments: ApacheSCPSFTPServer.java, ApacheSCPSFTPServer.java, 
> WinSCP_Error.png, WinSCP_Error_With_NewFix.png, WinSCP_Success_with 
> _Linux_System.png, winscp-logging.png
>
>
> Hi,
>  
> I am trying to setup the  SFTP/SCP server using Apache SSHD 2.3.0.  Was able 
> to transfer a file using SCP from command line , but when I tried using 
> WinSCP,  I get a error saying Server could not start the Shell.
>  
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.auth.keyboard.UserAuthKeyboardInteractive - 
> doAuth(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407]) authenticate 1 
> responses result: true
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerUserAuthService - 
> handleAuthenticationSuccess(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407])
>  SSH_MSG_USERAUTH_INFO_RESPONSE
> 15:44:06.963 [NioProcessor-2] INFO 
> org.apache.sshd.server.session.ServerSessionImpl - Session 
> admin@/0:0:0:0:0:0:0:1:58407 authenticated
> 15:44:06.965 [NioProcessor-2] DEBUG 
> org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter 
> - handleIgnoreMessage(ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_IGNORE
> 15:44:06.966 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> channelOpen(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])
>  SSH_MSG_CHANNEL_OPEN sender=256, type=session, window-size=2147483647, 
> packet-size=16384
> 15:44:06.982 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - init() 
> service=ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]]
>  session=ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407] id=0
> 15:44:06.982 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) size=2097152, 
> max=2097152, packet=32768
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> registerChannel(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])[id=0]
>  ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> setRecipient(ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) recipient=256
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/remote](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2147483647, max=2147483647, packet=16384
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> re-initializing
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2097152, max=2097152, packet=32768
> 15:44:06.985 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> operationComplete(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) send 
> SSH_MSG_CHANNEL_OPEN_CONFIRMATION recipient=256, sender=0, 
> window-size=2097152, packet-size=32768
> 15:44:06.986 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> handleChannelRequest(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_CHANNEL_REQUEST sim...@putty.projects.tartarus.org wantReply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> request=sim...@putty.projects.tartarus.org result=ReplySuccess, 
> want-reply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> request=sim...@pu

[jira] [Commented] (SSHD-1014) Password Change Request - 'handleClientPasswordChangeRequest' not getting invoked with the sshd-core-2.3.1 jar version used.

2020-06-08 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet commented on SSHD-1014:
---

It's part of 2.4.0 release (2.3.1 does not actually exists).  See 
https://github.com/apache/mina-sshd/blob/sshd-2.4.0/sshd-common/src/main/java/org/apache/sshd/common/auth/UserAuthMethodFactory.java#L70

> Password Change Request - 'handleClientPasswordChangeRequest' not getting 
> invoked with the sshd-core-2.3.1 jar version used.
> 
>
> Key: SSHD-1014
> URL: https://issues.apache.org/jira/browse/SSHD-1014
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Rohini Jori
>Priority: Major
> Attachments: Normal-Login-LOGS.txt, error1.png, 
> handleClientPasswordChange  CODE.txt, password-change-Request- LOGS.txt
>
>
> *Question:*
> Wanted to know  why the 'handleClientPasswordChangeRequest' method is working 
> with 'sshd-core-2.3.0' jar and not with the 'sshd-core-2.3.1' jar?
> *Description*:
>  In case of password change request, the authenticate method of 
> PasswordAuthenticator class throws the 'PasswordChangeRequiredException' 
>  which will internally calls 'handleClientPasswordChangeRequest' method where 
> the password is changed for the user.
> Method calls sequence-
>  1. PasswordAuthenticator.authenticate()
>  2. authenticate() method throws PasswordChangeRequiredException.
>  3. UserAuthPassword.checkPassword()
>  4. UserAuthPassword.handlePasswordChangeRequest()
>  5. shows the prompt to get the new password from user. Then click ok.
>  6. UserAuthPassword.handleClientPasswordChangeRequest() - change old 
> password.
>   
>   
>  *So the problem* is that  when we used the sshd-core-2.3.1 jar, The 
> 'handleClientPasswordChangeRequest' is not getting called after we receive 
> the password-change request. 
>   
>  But  When we used the 'sshd-core-2.3.0' jar  the 
> 'handleClientPasswordChangeRequest' method is getting called and also the 
> password changed successfully.
>  But after that we got the problem in authentication. we get the  'Server 
> refused to start a shell/command' authentication failed error.
> I have attached the logs & image for reference.
>  
> So Is this dependent on 'sshd-core' jar? Could you please help?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SSHD-1014) Password Change Request - 'handleClientPasswordChangeRequest' not getting invoked with the sshd-core-2.3.1 jar version used.

2020-06-08 Thread Rohini Jori (Jira)


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

Rohini Jori commented on SSHD-1014:
---

I tried setting property as:

*PropertyResolverUtils.updateProperty(sshd, 
UserAuthMethodFactory.ALLOW_NON_INTEGRITY_AUTH, false);*

But UserAuthMethodFactory doesn't have the field 'ALLOW_NON_INTEGRITY_AUTH'.
+_ALLOW_NON_INTEGRITY_AUTH cannot be resolved or is not a field._+

Then how can we set this property?

> Password Change Request - 'handleClientPasswordChangeRequest' not getting 
> invoked with the sshd-core-2.3.1 jar version used.
> 
>
> Key: SSHD-1014
> URL: https://issues.apache.org/jira/browse/SSHD-1014
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Rohini Jori
>Priority: Major
> Attachments: Normal-Login-LOGS.txt, error1.png, 
> handleClientPasswordChange  CODE.txt, password-change-Request- LOGS.txt
>
>
> *Question:*
> Wanted to know  why the 'handleClientPasswordChangeRequest' method is working 
> with 'sshd-core-2.3.0' jar and not with the 'sshd-core-2.3.1' jar?
> *Description*:
>  In case of password change request, the authenticate method of 
> PasswordAuthenticator class throws the 'PasswordChangeRequiredException' 
>  which will internally calls 'handleClientPasswordChangeRequest' method where 
> the password is changed for the user.
> Method calls sequence-
>  1. PasswordAuthenticator.authenticate()
>  2. authenticate() method throws PasswordChangeRequiredException.
>  3. UserAuthPassword.checkPassword()
>  4. UserAuthPassword.handlePasswordChangeRequest()
>  5. shows the prompt to get the new password from user. Then click ok.
>  6. UserAuthPassword.handleClientPasswordChangeRequest() - change old 
> password.
>   
>   
>  *So the problem* is that  when we used the sshd-core-2.3.1 jar, The 
> 'handleClientPasswordChangeRequest' is not getting called after we receive 
> the password-change request. 
>   
>  But  When we used the 'sshd-core-2.3.0' jar  the 
> 'handleClientPasswordChangeRequest' method is getting called and also the 
> password changed successfully.
>  But after that we got the problem in authentication. we get the  'Server 
> refused to start a shell/command' authentication failed error.
> I have attached the logs & image for reference.
>  
> So Is this dependent on 'sshd-core' jar? Could you please help?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SSHD-1009) Support WinSCP shell interactions

2020-06-08 Thread Sreedhar J (Jira)


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

Sreedhar J commented on SSHD-1009:
--

[~lgoldstein] [~gnodet]   when is 2.5 release  planned?  As this fix is part of 
2.5,  we need to  plan our product release accordingly, whether to fork this 
fix on top of 2.3 or consume 2.5

> Support WinSCP shell interactions
> -
>
> Key: SSHD-1009
> URL: https://issues.apache.org/jira/browse/SSHD-1009
> Project: MINA SSHD
>  Issue Type: New Feature
>Affects Versions: 2.3.0
>Reporter: Sreedhar J
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.5.0
>
> Attachments: ApacheSCPSFTPServer.java, ApacheSCPSFTPServer.java, 
> WinSCP_Error.png, WinSCP_Error_With_NewFix.png, WinSCP_Success_with 
> _Linux_System.png, winscp-logging.png
>
>
> Hi,
>  
> I am trying to setup the  SFTP/SCP server using Apache SSHD 2.3.0.  Was able 
> to transfer a file using SCP from command line , but when I tried using 
> WinSCP,  I get a error saying Server could not start the Shell.
>  
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.auth.keyboard.UserAuthKeyboardInteractive - 
> doAuth(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407]) authenticate 1 
> responses result: true
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerUserAuthService - 
> handleAuthenticationSuccess(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407])
>  SSH_MSG_USERAUTH_INFO_RESPONSE
> 15:44:06.963 [NioProcessor-2] INFO 
> org.apache.sshd.server.session.ServerSessionImpl - Session 
> admin@/0:0:0:0:0:0:0:1:58407 authenticated
> 15:44:06.965 [NioProcessor-2] DEBUG 
> org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter 
> - handleIgnoreMessage(ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_IGNORE
> 15:44:06.966 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> channelOpen(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])
>  SSH_MSG_CHANNEL_OPEN sender=256, type=session, window-size=2147483647, 
> packet-size=16384
> 15:44:06.982 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - init() 
> service=ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]]
>  session=ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407] id=0
> 15:44:06.982 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) size=2097152, 
> max=2097152, packet=32768
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> registerChannel(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])[id=0]
>  ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> setRecipient(ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) recipient=256
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/remote](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2147483647, max=2147483647, packet=16384
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> re-initializing
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2097152, max=2097152, packet=32768
> 15:44:06.985 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> operationComplete(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) send 
> SSH_MSG_CHANNEL_OPEN_CONFIRMATION recipient=256, sender=0, 
> window-size=2097152, packet-size=32768
> 15:44:06.986 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> handleChannelRequest(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_CHANNEL_REQUEST sim...@putty.projects.tartarus.org wantReply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> request=sim...@putty.projects.tartarus.org result=ReplySuccess, 
> want-reply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelS

[jira] [Resolved] (SSHD-1009) Support WinSCP shell interactions

2020-06-08 Thread Guillaume Nodet (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet resolved SSHD-1009.
---
Resolution: Fixed

> Support WinSCP shell interactions
> -
>
> Key: SSHD-1009
> URL: https://issues.apache.org/jira/browse/SSHD-1009
> Project: MINA SSHD
>  Issue Type: New Feature
>Affects Versions: 2.3.0
>Reporter: Sreedhar J
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.5.0
>
> Attachments: ApacheSCPSFTPServer.java, ApacheSCPSFTPServer.java, 
> WinSCP_Error.png, WinSCP_Error_With_NewFix.png, WinSCP_Success_with 
> _Linux_System.png, winscp-logging.png
>
>
> Hi,
>  
> I am trying to setup the  SFTP/SCP server using Apache SSHD 2.3.0.  Was able 
> to transfer a file using SCP from command line , but when I tried using 
> WinSCP,  I get a error saying Server could not start the Shell.
>  
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.auth.keyboard.UserAuthKeyboardInteractive - 
> doAuth(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407]) authenticate 1 
> responses result: true
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerUserAuthService - 
> handleAuthenticationSuccess(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407])
>  SSH_MSG_USERAUTH_INFO_RESPONSE
> 15:44:06.963 [NioProcessor-2] INFO 
> org.apache.sshd.server.session.ServerSessionImpl - Session 
> admin@/0:0:0:0:0:0:0:1:58407 authenticated
> 15:44:06.965 [NioProcessor-2] DEBUG 
> org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter 
> - handleIgnoreMessage(ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_IGNORE
> 15:44:06.966 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> channelOpen(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])
>  SSH_MSG_CHANNEL_OPEN sender=256, type=session, window-size=2147483647, 
> packet-size=16384
> 15:44:06.982 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - init() 
> service=ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]]
>  session=ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407] id=0
> 15:44:06.982 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) size=2097152, 
> max=2097152, packet=32768
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> registerChannel(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])[id=0]
>  ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> setRecipient(ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) recipient=256
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/remote](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2147483647, max=2147483647, packet=16384
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> re-initializing
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2097152, max=2097152, packet=32768
> 15:44:06.985 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> operationComplete(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) send 
> SSH_MSG_CHANNEL_OPEN_CONFIRMATION recipient=256, sender=0, 
> window-size=2097152, packet-size=32768
> 15:44:06.986 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> handleChannelRequest(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_CHANNEL_REQUEST sim...@putty.projects.tartarus.org wantReply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> request=sim...@putty.projects.tartarus.org result=ReplySuccess, 
> want-reply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> request=sim...@putty.projects.tartarus.org no pending command
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel

[jira] [Resolved] (SSHD-1006) File transfer mode is supported by SSHD?

2020-06-08 Thread Guillaume Nodet (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1006?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet resolved SSHD-1006.
---
  Assignee: Guillaume Nodet
Resolution: Not A Problem

> File transfer mode is supported by SSHD?
> 
>
> Key: SSHD-1006
> URL: https://issues.apache.org/jira/browse/SSHD-1006
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: Sandeep
>Assignee: Guillaume Nodet
>Priority: Major
> Attachments: image-2020-05-28-16-18-03-057.png
>
>
> Many modern client are support file transfer mode as show in winscp 
> screenshot.
> So while creating server in sshd which classes we need to use? Any help?
> !image-2020-05-28-16-18-03-057.png|width=637,height=358!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Comment Edited] (SSHD-1006) File transfer mode is supported by SSHD?

2020-06-08 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet edited comment on SSHD-1006 at 6/8/20, 12:02 PM:
-

Also, the transfer mode is a client side feature and it's definitely not 
supported by the protocol.  For example, the linux {{scp}} client has never 
supported such feature, so it's not really _many modern client_, but rather 
*WinSCP*.  And FWIW, binary / text mode works fine using WinSCP and SSHD.


was (Author: gnt):
Also, the transfer mode is a client side feature and it's definitely not 
supported by the protocol.  For example, the linux {{scp}} client has never 
supported such feature, so it's not really _many modern client_, but rather 
*WinSCP*.

> File transfer mode is supported by SSHD?
> 
>
> Key: SSHD-1006
> URL: https://issues.apache.org/jira/browse/SSHD-1006
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: Sandeep
>Priority: Major
> Attachments: image-2020-05-28-16-18-03-057.png
>
>
> Many modern client are support file transfer mode as show in winscp 
> screenshot.
> So while creating server in sshd which classes we need to use? Any help?
> !image-2020-05-28-16-18-03-057.png|width=637,height=358!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SSHD-1006) File transfer mode is supported by SSHD?

2020-06-08 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet commented on SSHD-1006:
---

Also, the transfer mode is a client side feature and it's definitely not 
supported by the protocol.  For example, the linux {{scp}} client has never 
supported such feature, so it's not really _many modern client_, but rather 
*WinSCP*.

> File transfer mode is supported by SSHD?
> 
>
> Key: SSHD-1006
> URL: https://issues.apache.org/jira/browse/SSHD-1006
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: Sandeep
>Priority: Major
> Attachments: image-2020-05-28-16-18-03-057.png
>
>
> Many modern client are support file transfer mode as show in winscp 
> screenshot.
> So while creating server in sshd which classes we need to use? Any help?
> !image-2020-05-28-16-18-03-057.png|width=637,height=358!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Comment Edited] (SSHD-1014) Password Change Request - 'handleClientPasswordChangeRequest' not getting invoked with the sshd-core-2.3.1 jar version used.

2020-06-08 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet edited comment on SSHD-1014 at 6/8/20, 11:41 AM:
-

That looks like a consequence of https://issues.apache.org/jira/browse/SSHD-948 
which has been fixed in 2.3.1.

You could try configuring the 
{{UserAuthMethodFactory.ALLOW_NON_INTEGRITY_AUTH}} property to {{false}} on the 
SSHD server and this if this is better ?


was (Author: gnt):
That looks like a consequence of https://issues.apache.org/jira/browse/SSHD-948 
which has been fixed in 2.3.1.

> Password Change Request - 'handleClientPasswordChangeRequest' not getting 
> invoked with the sshd-core-2.3.1 jar version used.
> 
>
> Key: SSHD-1014
> URL: https://issues.apache.org/jira/browse/SSHD-1014
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Rohini Jori
>Priority: Major
> Attachments: Normal-Login-LOGS.txt, error1.png, 
> handleClientPasswordChange  CODE.txt, password-change-Request- LOGS.txt
>
>
> *Question:*
> Wanted to know  why the 'handleClientPasswordChangeRequest' method is working 
> with 'sshd-core-2.3.0' jar and not with the 'sshd-core-2.3.1' jar?
> *Description*:
>  In case of password change request, the authenticate method of 
> PasswordAuthenticator class throws the 'PasswordChangeRequiredException' 
>  which will internally calls 'handleClientPasswordChangeRequest' method where 
> the password is changed for the user.
> Method calls sequence-
>  1. PasswordAuthenticator.authenticate()
>  2. authenticate() method throws PasswordChangeRequiredException.
>  3. UserAuthPassword.checkPassword()
>  4. UserAuthPassword.handlePasswordChangeRequest()
>  5. shows the prompt to get the new password from user. Then click ok.
>  6. UserAuthPassword.handleClientPasswordChangeRequest() - change old 
> password.
>   
>   
>  *So the problem* is that  when we used the sshd-core-2.3.1 jar, The 
> 'handleClientPasswordChangeRequest' is not getting called after we receive 
> the password-change request. 
>   
>  But  When we used the 'sshd-core-2.3.0' jar  the 
> 'handleClientPasswordChangeRequest' method is getting called and also the 
> password changed successfully.
>  But after that we got the problem in authentication. we get the  'Server 
> refused to start a shell/command' authentication failed error.
> I have attached the logs & image for reference.
>  
> So Is this dependent on 'sshd-core' jar? Could you please help?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SSHD-1014) Password Change Request - 'handleClientPasswordChangeRequest' not getting invoked with the sshd-core-2.3.1 jar version used.

2020-06-08 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet commented on SSHD-1014:
---

That looks like a consequence of https://issues.apache.org/jira/browse/SSHD-948 
which has been fixed in 2.3.1.

> Password Change Request - 'handleClientPasswordChangeRequest' not getting 
> invoked with the sshd-core-2.3.1 jar version used.
> 
>
> Key: SSHD-1014
> URL: https://issues.apache.org/jira/browse/SSHD-1014
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Rohini Jori
>Priority: Major
> Attachments: Normal-Login-LOGS.txt, error1.png, 
> handleClientPasswordChange  CODE.txt, password-change-Request- LOGS.txt
>
>
> *Question:*
> Wanted to know  why the 'handleClientPasswordChangeRequest' method is working 
> with 'sshd-core-2.3.0' jar and not with the 'sshd-core-2.3.1' jar?
> *Description*:
>  In case of password change request, the authenticate method of 
> PasswordAuthenticator class throws the 'PasswordChangeRequiredException' 
>  which will internally calls 'handleClientPasswordChangeRequest' method where 
> the password is changed for the user.
> Method calls sequence-
>  1. PasswordAuthenticator.authenticate()
>  2. authenticate() method throws PasswordChangeRequiredException.
>  3. UserAuthPassword.checkPassword()
>  4. UserAuthPassword.handlePasswordChangeRequest()
>  5. shows the prompt to get the new password from user. Then click ok.
>  6. UserAuthPassword.handleClientPasswordChangeRequest() - change old 
> password.
>   
>   
>  *So the problem* is that  when we used the sshd-core-2.3.1 jar, The 
> 'handleClientPasswordChangeRequest' is not getting called after we receive 
> the password-change request. 
>   
>  But  When we used the 'sshd-core-2.3.0' jar  the 
> 'handleClientPasswordChangeRequest' method is getting called and also the 
> password changed successfully.
>  But after that we got the problem in authentication. we get the  'Server 
> refused to start a shell/command' authentication failed error.
> I have attached the logs & image for reference.
>  
> So Is this dependent on 'sshd-core' jar? Could you please help?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[GitHub] [mina-sshd] gnodet opened a new pull request #138: Sshd 1009

2020-06-08 Thread GitBox


gnodet opened a new pull request #138:
URL: https://github.com/apache/mina-sshd/pull/138


   



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



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



[jira] [Commented] (SSHD-1009) Support WinSCP shell interactions

2020-06-08 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet commented on SSHD-1009:
---

I pushed an updated fix, all is good on OSX. [~lgoldstein]

> Support WinSCP shell interactions
> -
>
> Key: SSHD-1009
> URL: https://issues.apache.org/jira/browse/SSHD-1009
> Project: MINA SSHD
>  Issue Type: New Feature
>Affects Versions: 2.3.0
>Reporter: Sreedhar J
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.5.0
>
> Attachments: ApacheSCPSFTPServer.java, ApacheSCPSFTPServer.java, 
> WinSCP_Error.png, WinSCP_Error_With_NewFix.png, WinSCP_Success_with 
> _Linux_System.png, winscp-logging.png
>
>
> Hi,
>  
> I am trying to setup the  SFTP/SCP server using Apache SSHD 2.3.0.  Was able 
> to transfer a file using SCP from command line , but when I tried using 
> WinSCP,  I get a error saying Server could not start the Shell.
>  
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.auth.keyboard.UserAuthKeyboardInteractive - 
> doAuth(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407]) authenticate 1 
> responses result: true
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerUserAuthService - 
> handleAuthenticationSuccess(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407])
>  SSH_MSG_USERAUTH_INFO_RESPONSE
> 15:44:06.963 [NioProcessor-2] INFO 
> org.apache.sshd.server.session.ServerSessionImpl - Session 
> admin@/0:0:0:0:0:0:0:1:58407 authenticated
> 15:44:06.965 [NioProcessor-2] DEBUG 
> org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter 
> - handleIgnoreMessage(ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_IGNORE
> 15:44:06.966 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> channelOpen(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])
>  SSH_MSG_CHANNEL_OPEN sender=256, type=session, window-size=2147483647, 
> packet-size=16384
> 15:44:06.982 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - init() 
> service=ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]]
>  session=ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407] id=0
> 15:44:06.982 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) size=2097152, 
> max=2097152, packet=32768
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> registerChannel(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])[id=0]
>  ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> setRecipient(ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) recipient=256
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/remote](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2147483647, max=2147483647, packet=16384
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> re-initializing
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2097152, max=2097152, packet=32768
> 15:44:06.985 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> operationComplete(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) send 
> SSH_MSG_CHANNEL_OPEN_CONFIRMATION recipient=256, sender=0, 
> window-size=2097152, packet-size=32768
> 15:44:06.986 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> handleChannelRequest(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_CHANNEL_REQUEST sim...@putty.projects.tartarus.org wantReply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> request=sim...@putty.projects.tartarus.org result=ReplySuccess, 
> want-reply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> request=sim...@putty.projects.tartarus.o

[jira] [Commented] (SSHD-1009) Support WinSCP shell interactions

2020-06-08 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet commented on SSHD-1009:
---

Actually, there's still a problem from the command line, let me investigate a 
bit more.

> Support WinSCP shell interactions
> -
>
> Key: SSHD-1009
> URL: https://issues.apache.org/jira/browse/SSHD-1009
> Project: MINA SSHD
>  Issue Type: New Feature
>Affects Versions: 2.3.0
>Reporter: Sreedhar J
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.5.0
>
> Attachments: ApacheSCPSFTPServer.java, ApacheSCPSFTPServer.java, 
> WinSCP_Error.png, WinSCP_Error_With_NewFix.png, WinSCP_Success_with 
> _Linux_System.png, winscp-logging.png
>
>
> Hi,
>  
> I am trying to setup the  SFTP/SCP server using Apache SSHD 2.3.0.  Was able 
> to transfer a file using SCP from command line , but when I tried using 
> WinSCP,  I get a error saying Server could not start the Shell.
>  
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.auth.keyboard.UserAuthKeyboardInteractive - 
> doAuth(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407]) authenticate 1 
> responses result: true
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerUserAuthService - 
> handleAuthenticationSuccess(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407])
>  SSH_MSG_USERAUTH_INFO_RESPONSE
> 15:44:06.963 [NioProcessor-2] INFO 
> org.apache.sshd.server.session.ServerSessionImpl - Session 
> admin@/0:0:0:0:0:0:0:1:58407 authenticated
> 15:44:06.965 [NioProcessor-2] DEBUG 
> org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter 
> - handleIgnoreMessage(ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_IGNORE
> 15:44:06.966 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> channelOpen(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])
>  SSH_MSG_CHANNEL_OPEN sender=256, type=session, window-size=2147483647, 
> packet-size=16384
> 15:44:06.982 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - init() 
> service=ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]]
>  session=ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407] id=0
> 15:44:06.982 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) size=2097152, 
> max=2097152, packet=32768
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> registerChannel(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])[id=0]
>  ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> setRecipient(ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) recipient=256
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/remote](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2147483647, max=2147483647, packet=16384
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> re-initializing
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2097152, max=2097152, packet=32768
> 15:44:06.985 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> operationComplete(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) send 
> SSH_MSG_CHANNEL_OPEN_CONFIRMATION recipient=256, sender=0, 
> window-size=2097152, packet-size=32768
> 15:44:06.986 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> handleChannelRequest(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_CHANNEL_REQUEST sim...@putty.projects.tartarus.org wantReply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> request=sim...@putty.projects.tartarus.org result=ReplySuccess, 
> want-reply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> request=si

[jira] [Commented] (SSHD-1009) Support WinSCP shell interactions

2020-06-08 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet commented on SSHD-1009:
---

[~lgoldstein] the following commit fixes the problems on OSX 
https://github.com/gnodet/mina-sshd/commit/3e8b187e7f97e48619f5f435a0e4a1c9114d3937

> Support WinSCP shell interactions
> -
>
> Key: SSHD-1009
> URL: https://issues.apache.org/jira/browse/SSHD-1009
> Project: MINA SSHD
>  Issue Type: New Feature
>Affects Versions: 2.3.0
>Reporter: Sreedhar J
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.5.0
>
> Attachments: ApacheSCPSFTPServer.java, ApacheSCPSFTPServer.java, 
> WinSCP_Error.png, WinSCP_Error_With_NewFix.png, WinSCP_Success_with 
> _Linux_System.png, winscp-logging.png
>
>
> Hi,
>  
> I am trying to setup the  SFTP/SCP server using Apache SSHD 2.3.0.  Was able 
> to transfer a file using SCP from command line , but when I tried using 
> WinSCP,  I get a error saying Server could not start the Shell.
>  
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.auth.keyboard.UserAuthKeyboardInteractive - 
> doAuth(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407]) authenticate 1 
> responses result: true
> 15:44:06.956 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerUserAuthService - 
> handleAuthenticationSuccess(admin@ServerSessionImpl[null@/0:0:0:0:0:0:0:1:58407])
>  SSH_MSG_USERAUTH_INFO_RESPONSE
> 15:44:06.963 [NioProcessor-2] INFO 
> org.apache.sshd.server.session.ServerSessionImpl - Session 
> admin@/0:0:0:0:0:0:0:1:58407 authenticated
> 15:44:06.965 [NioProcessor-2] DEBUG 
> org.apache.sshd.common.session.helpers.ReservedSessionMessagesHandlerAdapter 
> - handleIgnoreMessage(ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_IGNORE
> 15:44:06.966 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> channelOpen(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])
>  SSH_MSG_CHANNEL_OPEN sender=256, type=session, window-size=2147483647, 
> packet-size=16384
> 15:44:06.982 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - init() 
> service=ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]]
>  session=ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407] id=0
> 15:44:06.982 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) size=2097152, 
> max=2097152, packet=32768
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> registerChannel(ServerConnectionService[ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]])[id=0]
>  ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]
> 15:44:06.983 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> setRecipient(ChannelSession[id=0, 
> recipient=-1]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) recipient=256
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/remote](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2147483647, max=2147483647, packet=16384
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> re-initializing
> 15:44:06.983 [NioProcessor-2] DEBUG org.apache.sshd.common.channel.Window - 
> init(Window[server/local](ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407])) 
> size=2097152, max=2097152, packet=32768
> 15:44:06.985 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.session.ServerConnectionService - 
> operationComplete(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) send 
> SSH_MSG_CHANNEL_OPEN_CONFIRMATION recipient=256, sender=0, 
> window-size=2097152, packet-size=32768
> 15:44:06.986 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> handleChannelRequest(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> SSH_MSG_CHANNEL_REQUEST sim...@putty.projects.tartarus.org wantReply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:58407]) 
> request=sim...@putty.projects.tartarus.org result=ReplySuccess, 
> want-reply=false
> 15:44:06.987 [NioProcessor-2] DEBUG 
> org.apache.sshd.server.channel.ChannelSession - 
> sendResponse(ChannelSession[id=0, 
> recipient=256]-Serve

[jira] [Updated] (SSHD-1014) Password Change Request - 'handleClientPasswordChangeRequest' not getting invoked with the sshd-core-2.3.1 jar version used.

2020-06-08 Thread Rohini Jori (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rohini Jori updated SSHD-1014:
--
Summary: Password Change Request - 'handleClientPasswordChangeRequest' not 
getting invoked with the sshd-core-2.3.1 jar version used.  (was: Password 
Change Request - 'handleClientPasswordChangeRequest' not getting called with 
the sshd-core-2.3.1 jar version used.)

> Password Change Request - 'handleClientPasswordChangeRequest' not getting 
> invoked with the sshd-core-2.3.1 jar version used.
> 
>
> Key: SSHD-1014
> URL: https://issues.apache.org/jira/browse/SSHD-1014
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Rohini Jori
>Priority: Major
> Attachments: Normal-Login-LOGS.txt, error1.png, 
> handleClientPasswordChange  CODE.txt, password-change-Request- LOGS.txt
>
>
> *Question:*
> Wanted to know  why the 'handleClientPasswordChangeRequest' method is working 
> with 'sshd-core-2.3.0' jar and not with the 'sshd-core-2.3.1' jar?
> *Description*:
>  In case of password change request, the authenticate method of 
> PasswordAuthenticator class throws the 'PasswordChangeRequiredException' 
>  which will internally calls 'handleClientPasswordChangeRequest' method where 
> the password is changed for the user.
> Method calls sequence-
>  1. PasswordAuthenticator.authenticate()
>  2. authenticate() method throws PasswordChangeRequiredException.
>  3. UserAuthPassword.checkPassword()
>  4. UserAuthPassword.handlePasswordChangeRequest()
>  5. shows the prompt to get the new password from user. Then click ok.
>  6. UserAuthPassword.handleClientPasswordChangeRequest() - change old 
> password.
>   
>   
>  *So the problem* is that  when we used the sshd-core-2.3.1 jar, The 
> 'handleClientPasswordChangeRequest' is not getting called after we receive 
> the password-change request. 
>   
>  But  When we used the 'sshd-core-2.3.0' jar  the 
> 'handleClientPasswordChangeRequest' method is getting called and also the 
> password changed successfully.
>  But after that we got the problem in authentication. we get the  'Server 
> refused to start a shell/command' authentication failed error.
> I have attached the logs & image for reference.
>  
> So Is this dependent on 'sshd-core' jar? Could you please help?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SSHD-1014) Password Change Request - 'handleClientPasswordChangeRequest' not getting called with the sshd-core-2.3.1 jar version used.

2020-06-08 Thread Rohini Jori (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rohini Jori updated SSHD-1014:
--
Issue Type: New Feature  (was: Bug)

> Password Change Request - 'handleClientPasswordChangeRequest' not getting 
> called with the sshd-core-2.3.1 jar version used.
> ---
>
> Key: SSHD-1014
> URL: https://issues.apache.org/jira/browse/SSHD-1014
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Rohini Jori
>Priority: Major
> Attachments: Normal-Login-LOGS.txt, error1.png, 
> handleClientPasswordChange  CODE.txt, password-change-Request- LOGS.txt
>
>
> *Question:*
> Wanted to know  why the 'handleClientPasswordChangeRequest' method is working 
> with 'sshd-core-2.3.0' jar and not with the 'sshd-core-2.3.1' jar?
> *Description*:
>  In case of password change request, the authenticate method of 
> PasswordAuthenticator class throws the 'PasswordChangeRequiredException' 
>  which will internally calls 'handleClientPasswordChangeRequest' method where 
> the password is changed for the user.
> Method calls sequence-
>  1. PasswordAuthenticator.authenticate()
>  2. authenticate() method throws PasswordChangeRequiredException.
>  3. UserAuthPassword.checkPassword()
>  4. UserAuthPassword.handlePasswordChangeRequest()
>  5. shows the prompt to get the new password from user. Then click ok.
>  6. UserAuthPassword.handleClientPasswordChangeRequest() - change old 
> password.
>   
>   
>  *So the problem* is that  when we used the sshd-core-2.3.1 jar, The 
> 'handleClientPasswordChangeRequest' is not getting called after we receive 
> the password-change request. 
>   
>  But  When we used the 'sshd-core-2.3.0' jar  the 
> 'handleClientPasswordChangeRequest' method is getting called and also the 
> password changed successfully.
>  But after that we got the problem in authentication. we get the  'Server 
> refused to start a shell/command' authentication failed error.
> I have attached the logs & image for reference.
>  
> So Is this dependent on 'sshd-core' jar? Could you please help?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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