[jira] [Resolved] (SSHD-1046) Getting wrong IP in session

2020-07-29 Thread Lyor Goldstein (Jira)


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

Lyor Goldstein resolved SSHD-1046.
--
Resolution: Information Provided

> Getting wrong IP in session
> ---
>
> Key: SSHD-1046
> URL: https://issues.apache.org/jira/browse/SSHD-1046
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: Sandeep
>Priority: Major
>
> Hi Team, this is small query I have :
> On My VM by using ifconfig:  I get vm IP as *10.15.101.71*
>  
> But in sftpSubsystem when I try below code I got  *10.2.116.84*
>  
> {code:java}
> ServerSession session = getServerSession(); 
> InetSocketAddress addr = (InetSocketAddress) session.getRemoteAddress();
> String hostIP = addr.getAddress().getHostAddress(); 
> System.out.println("ip:"+hostIP )
> {code}
>  
> Output as :
> ip: *10.2.116.84*
>  
> *So can you help me to find the details* 
>  # why am getting this new ip which is not exit in our intranet 
>  # What is different between *session.getRemoteAddress()* vs 
> *session.getLocalAddress()* methods?
>  



--
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-1046) Getting wrong IP in session

2020-07-29 Thread Lyor Goldstein (Jira)


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

Lyor Goldstein edited comment on SSHD-1046 at 7/30/20, 5:55 AM:


Please use dev@mina.apache.org mailing list for such questions... That being 
said, the answer is in the Javadoc
{code:java}
/**
 * @return the socket address of remote peer.
 */
SocketAddress getRemoteAddress();

/**
 * @return the socket address of local machine which is associated with 
this session.
 */
SocketAddress getLocalAddress();
{code}


was (Author: lgoldstein):
Please use dev@mina.apache.org mailing list for such questions...

> Getting wrong IP in session
> ---
>
> Key: SSHD-1046
> URL: https://issues.apache.org/jira/browse/SSHD-1046
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: Sandeep
>Priority: Major
>
> Hi Team, this is small query I have :
> On My VM by using ifconfig:  I get vm IP as *10.15.101.71*
>  
> But in sftpSubsystem when I try below code I got  *10.2.116.84*
>  
> {code:java}
> ServerSession session = getServerSession(); 
> InetSocketAddress addr = (InetSocketAddress) session.getRemoteAddress();
> String hostIP = addr.getAddress().getHostAddress(); 
> System.out.println("ip:"+hostIP )
> {code}
>  
> Output as :
> ip: *10.2.116.84*
>  
> *So can you help me to find the details* 
>  # why am getting this new ip which is not exit in our intranet 
>  # What is different between *session.getRemoteAddress()* vs 
> *session.getLocalAddress()* methods?
>  



--
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-1046) Getting wrong IP in session

2020-07-29 Thread Lyor Goldstein (Jira)


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

Lyor Goldstein commented on SSHD-1046:
--

Please use dev@mina.apache.org mailing list for such questions...

> Getting wrong IP in session
> ---
>
> Key: SSHD-1046
> URL: https://issues.apache.org/jira/browse/SSHD-1046
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: Sandeep
>Priority: Major
>
> Hi Team, this is small query I have :
> On My VM by using ifconfig:  I get vm IP as *10.15.101.71*
>  
> But in sftpSubsystem when I try below code I got  *10.2.116.84*
>  
> {code:java}
> ServerSession session = getServerSession(); 
> InetSocketAddress addr = (InetSocketAddress) session.getRemoteAddress();
> String hostIP = addr.getAddress().getHostAddress(); 
> System.out.println("ip:"+hostIP )
> {code}
>  
> Output as :
> ip: *10.2.116.84*
>  
> *So can you help me to find the details* 
>  # why am getting this new ip which is not exit in our intranet 
>  # What is different between *session.getRemoteAddress()* vs 
> *session.getLocalAddress()* methods?
>  



--
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-1046) Getting wrong IP in session

2020-07-29 Thread Sandeep (Jira)


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

Sandeep updated SSHD-1046:
--
Summary: Getting wrong IP in session  (was: Getting wrong IP in )

> Getting wrong IP in session
> ---
>
> Key: SSHD-1046
> URL: https://issues.apache.org/jira/browse/SSHD-1046
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: Sandeep
>Priority: Major
>
> Hi Team, this is small query I have :
> On My VM by using ifconfig:  I get vm IP as *10.15.101.71*
>  
> But in sftpSubsystem when I try below code I got  *10.2.116.84*
>  
> {code:java}
> ServerSession session = getServerSession(); 
> InetSocketAddress addr = (InetSocketAddress) session.getRemoteAddress();
> String hostIP = addr.getAddress().getHostAddress(); 
> System.out.println("ip:"+hostIP )
> {code}
>  
> Output as :
> ip: *10.2.116.84*
>  
> *So can you help me to find the details* 
>  # why am getting this new ip which is not exit in our intranet 
>  # What is different between *session.getRemoteAddress()* vs 
> *session.getLocalAddress()* methods?
>  



--
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-1044) How to improve sftp transfer speed

2020-07-29 Thread barry-gq (Jira)


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

barry-gq commented on SSHD-1044:


Ok thanks for your help

> How to improve sftp transfer speed
> --
>
> Key: SSHD-1044
> URL: https://issues.apache.org/jira/browse/SSHD-1044
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: barry-gq
>Assignee: Guillaume Nodet
>Priority: Blocker
> Attachments: image-2020-07-29-10-56-20-207.png, 
> image-2020-07-29-15-09-12-806.png
>
>
> *Phenomenon*:
>       In my project, I used mina sftp version 2.4.0. When my project created 
> a sshdServer and connected to a linux device using the sftp protocol, the 
> speed was very slow when performing file transfer (upload) operations, About 
> one-tenth the speed of connecting the same device with filezilla and 
> uploading the same file
> *Question:*
>       Is there any configuration in mina sftp 2.4.0 to increase the speed of 
> file transfer
>  
> *I look forward to your reply, thank you!*
>  



--
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] (SSHD-1044) How to improve sftp transfer speed

2020-07-29 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet resolved SSHD-1044.
---
Resolution: Not A Problem

> How to improve sftp transfer speed
> --
>
> Key: SSHD-1044
> URL: https://issues.apache.org/jira/browse/SSHD-1044
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: barry-gq
>Assignee: Guillaume Nodet
>Priority: Blocker
> Attachments: image-2020-07-29-10-56-20-207.png, 
> image-2020-07-29-15-09-12-806.png
>
>
> *Phenomenon*:
>       In my project, I used mina sftp version 2.4.0. When my project created 
> a sshdServer and connected to a linux device using the sftp protocol, the 
> speed was very slow when performing file transfer (upload) operations, About 
> one-tenth the speed of connecting the same device with filezilla and 
> uploading the same file
> *Question:*
>       Is there any configuration in mina sftp 2.4.0 to increase the speed of 
> file transfer
>  
> *I look forward to your reply, thank you!*
>  



--
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] [Work logged] (SSHD-1042) Command Limiting Policy SSH_FXP_READDIR closing connection

2020-07-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1042?focusedWorklogId=464126=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464126
 ]

ASF GitHub Bot logged work on SSHD-1042:


Author: ASF GitHub Bot
Created on: 29/Jul/20 17:38
Start Date: 29/Jul/20 17:38
Worklog Time Spent: 10m 
  Work Description: tomaswolf closed pull request #151:
URL: https://github.com/apache/mina-sshd/pull/151


   



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: 464126)
Time Spent: 40m  (was: 0.5h)

> Command Limiting Policy SSH_FXP_READDIR closing connection
> --
>
> Key: SSHD-1042
> URL: https://issues.apache.org/jira/browse/SSHD-1042
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Shahbaz
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.6.0
>
> Attachments: apache rmdir.PNG, maverick filesystem.PNG
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> *This are the below commands which prevent the execution of process for the 
> user at instance level relating to permission of open, read, write, opendir, 
> readdir, remove, rename, makedir, removedir respectively.*
> *SSH_FXP_OPEN*
>  *SSH_FXP_READ*
>  *SSH_FXP_WRITE*
>  *SSH_FXP_OPENDIR*
>  *SSH_FXP_READDIR*
>  *SSH_FXP_REMOVE*
>  *SSH_FXP_RENAME*
>  *SSH_FXP_MKDIR*
>  *SSH_FXP_RMDIR*
> *But the command for* *SSH_FXP_READDIR is not executed as it directly closes 
> the connection. This connection is closed because while throwing the 
> exception it directly calls destroy method from filesystem. Is there any 
> workaround to inhibit its execution when we extend sftpsubsytem class where 
> exception is thrown.***
> *While reading the directory when SH_FXP_READDIR is applied, the operation is 
> interrupted, as it evokes the destroy function to close the connection 
> directly when an IOException is thrown. The issue is how can we make sure the 
> destroy function is not called, when exception is thrown in a class which 
> extends SFTPSubsystem.*
>  
> *Exact working scenarios of the above issue:* 
> We have our implementation of Command Limiting Policy to prevent specific IP 
> addresses or users from executing 
>  certain commands on an SFTP server.  
>  After validation of the policy, we don't want user to perform the operation 
> based on the command which is applied on the policy. 
>  For example: When the SSH_FXP_OPENDIR is invoked, the user is restricted 
> from open directory operation. 
>  Our issue is related to command SSH_FXP_READDIR command.
>  Expected Behaviour : Prevent user from reading the directory when sftp ls 
> command is executed, by giving the message like "Unable to read the 
> directory". 
>  But we see that, though we throw AcessDeniedException on validating the 
> policy, the connection is getting closed, and we get an error as "Connection 
> closed". 
>  We have the same implementation for validating the policy and we throw 
> AcessDeniedException in case of all the sftp commands(if we need to prevent 
> the user/ip)
>  We find that all the sftp commands work as expected, except SSH_FXP_READDIR. 
> The difference we find is that destroy() method in SFTP Subsystem is getting 
> invoked after our policy validation in SSH_FXP_READDIR. In case of all other 
> commands, we dont see destro() getting invoked.
>  
> Is there any specific thing that needs to be handled in our implementation to 
> prevent destroy() from getting invoked and connection getting closed. We are 
> unable to find why destroy() is invoked in case of SSH_FXP_READDIR command, 
> even though AcessDeniedException is thrown from our implementation.
>  
>  
>  
> *Below attached are the images which shows how destroy is invoked in both 
> maverick and apache case.* 
>  
>  
>  
>  



--
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] tomaswolf commented on pull request #152: ProxyTest with HostKeyVerification

2020-07-29 Thread GitBox


tomaswolf commented on pull request #152:
URL: https://github.com/apache/mina-sshd/pull/152#issuecomment-665529294







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



[GitHub] [mina-sshd] tomaswolf edited a comment on pull request #152: ProxyTest with HostKeyVerification

2020-07-29 Thread GitBox


tomaswolf edited a comment on pull request #152:
URL: https://github.com/apache/mina-sshd/pull/152#issuecomment-665529294


   @gnodet: BTW, note that the exception stack trace does not point back to 
user code but to `Nio2Session.handleReadCycleCompletion`. That's not helpful to 
debug such problems.
   
   The reason for this is probably that `AbstractSshFuture.verifyResult()` 
re-throws the original `IOException`. It would be more useful if that always 
threw a new `IOException` with the original as cause. At least for any future 
that is handed out to client code.



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



[GitHub] [mina-sshd] gnodet opened a new pull request #153: Do not rethrow, but always wrap in an IOException

2020-07-29 Thread GitBox


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


   



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



[GitHub] [mina-sshd] tomaswolf closed pull request #151: [SSHD-1042] Improve SftpEventListener

2020-07-29 Thread GitBox


tomaswolf closed pull request #151:
URL: https://github.com/apache/mina-sshd/pull/151


   



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] [Created] (SSHD-1046) Getting wrong IP in

2020-07-29 Thread Sandeep (Jira)
Sandeep created SSHD-1046:
-

 Summary: Getting wrong IP in 
 Key: SSHD-1046
 URL: https://issues.apache.org/jira/browse/SSHD-1046
 Project: MINA SSHD
  Issue Type: Question
Reporter: Sandeep


Hi Team, this is small query I have :

On My VM by using ifconfig:  I get vm IP as *10.15.101.71*

 

But in sftpSubsystem when I try below code I got  *10.2.116.84*

 
{code:java}
ServerSession session = getServerSession(); 
InetSocketAddress addr = (InetSocketAddress) session.getRemoteAddress();
String hostIP = addr.getAddress().getHostAddress(); 
System.out.println("ip:"+hostIP )
{code}
 

Output as :

ip: *10.2.116.84*

 

*So can you help me to find the details* 
 # why am getting this new ip which is not exit in our intranet 
 # What is different between *session.getRemoteAddress()* vs 
*session.getLocalAddress()* methods?

 



--
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] [Created] (SSHD-1045) Improve SftpRemotePathChannel to leverage the Sftp(Input|Output)StreamAsync for better transfer rate

2020-07-29 Thread Guillaume Nodet (Jira)
Guillaume Nodet created SSHD-1045:
-

 Summary: Improve SftpRemotePathChannel to leverage the 
Sftp(Input|Output)StreamAsync for better transfer rate
 Key: SSHD-1045
 URL: https://issues.apache.org/jira/browse/SSHD-1045
 Project: MINA SSHD
  Issue Type: Improvement
Reporter: Guillaume Nodet






--
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-1044) How to improve sftp transfer speed

2020-07-29 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet edited comment on SSHD-1044 at 7/29/20, 11:14 AM:
--

Just use one of the {{OutputStream write(String path)}} methods on the 
{{SftpClient}} and write to the returned stream to upload your file.


was (Author: gnt):
Just use one of the {{OutputStream write(String path)}} methods on the 
{{SftpClient}} to upload.

> How to improve sftp transfer speed
> --
>
> Key: SSHD-1044
> URL: https://issues.apache.org/jira/browse/SSHD-1044
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: barry-gq
>Assignee: Guillaume Nodet
>Priority: Blocker
> Attachments: image-2020-07-29-10-56-20-207.png, 
> image-2020-07-29-15-09-12-806.png
>
>
> *Phenomenon*:
>       In my project, I used mina sftp version 2.4.0. When my project created 
> a sshdServer and connected to a linux device using the sftp protocol, the 
> speed was very slow when performing file transfer (upload) operations, About 
> one-tenth the speed of connecting the same device with filezilla and 
> uploading the same file
> *Question:*
>       Is there any configuration in mina sftp 2.4.0 to increase the speed of 
> file transfer
>  
> *I look forward to your reply, thank you!*
>  



--
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-1044) How to improve sftp transfer speed

2020-07-29 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet edited comment on SSHD-1044 at 7/29/20, 11:13 AM:
--

Just use one of the {{OutputStream write(String path)}} methods on the 
{{SftpClient}} to upload.


was (Author: gnt):
Just use one of the {{SftpClient.write}} methods to upload.

> How to improve sftp transfer speed
> --
>
> Key: SSHD-1044
> URL: https://issues.apache.org/jira/browse/SSHD-1044
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: barry-gq
>Assignee: Guillaume Nodet
>Priority: Blocker
> Attachments: image-2020-07-29-10-56-20-207.png, 
> image-2020-07-29-15-09-12-806.png
>
>
> *Phenomenon*:
>       In my project, I used mina sftp version 2.4.0. When my project created 
> a sshdServer and connected to a linux device using the sftp protocol, the 
> speed was very slow when performing file transfer (upload) operations, About 
> one-tenth the speed of connecting the same device with filezilla and 
> uploading the same file
> *Question:*
>       Is there any configuration in mina sftp 2.4.0 to increase the speed of 
> file transfer
>  
> *I look forward to your reply, thank you!*
>  



--
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-1044) How to improve sftp transfer speed

2020-07-29 Thread Guillaume Nodet (Jira)


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

Guillaume Nodet commented on SSHD-1044:
---

Just use one of the {{SftpClient.write}} methods to upload.

> How to improve sftp transfer speed
> --
>
> Key: SSHD-1044
> URL: https://issues.apache.org/jira/browse/SSHD-1044
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: barry-gq
>Assignee: Guillaume Nodet
>Priority: Blocker
> Attachments: image-2020-07-29-10-56-20-207.png, 
> image-2020-07-29-15-09-12-806.png
>
>
> *Phenomenon*:
>       In my project, I used mina sftp version 2.4.0. When my project created 
> a sshdServer and connected to a linux device using the sftp protocol, the 
> speed was very slow when performing file transfer (upload) operations, About 
> one-tenth the speed of connecting the same device with filezilla and 
> uploading the same file
> *Question:*
>       Is there any configuration in mina sftp 2.4.0 to increase the speed of 
> file transfer
>  
> *I look forward to your reply, thank you!*
>  



--
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] [Work logged] (SSHD-506) Add support for aes128/256-gcm ciphers

2020-07-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-506?focusedWorklogId=464007=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464007
 ]

ASF GitHub Bot logged work on SSHD-506:
---

Author: ASF GitHub Bot
Created on: 29/Jul/20 07:52
Start Date: 29/Jul/20 07:52
Worklog Time Spent: 10m 
  Work Description: lgoldstein commented on pull request #132:
URL: https://github.com/apache/mina-sshd/pull/132#issuecomment-665110258







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: 464007)
Time Spent: 7.5h  (was: 7h 20m)

> Add support for aes128/256-gcm ciphers
> --
>
> Key: SSHD-506
> URL: https://issues.apache.org/jira/browse/SSHD-506
> Project: MINA SSHD
>  Issue Type: Improvement
>Reporter: Lyor Goldstein
>Assignee: Lyor Goldstein
>Priority: Major
>  Time Spent: 7.5h
>  Remaining Estimate: 0h
>
> See:
> * [rfc5647|https://tools.ietf.org/html/rfc5647]
> * 
> [draft-igoe-secsh-aes-gcm-01|https://tools.ietf.org/html/draft-igoe-secsh-aes-gcm-01]
> * [OpenSSH v6.2|http://www.openssh.com/txt/release-6.2]
> * [JAVA AES 256 GCM encrypt/decrypt 
> example|https://javainterviewpoint.com/java-aes-256-gcm-encryption-and-decryption/]
>  - especially the usage of {{GCMParameterSpec}} to initialize the cipher
> * [OpenJDK 8 AESCipher.java source 
> code|https://github.com/frohoff/jdk8u-dev-jdk/blob/master/src/share/classes/com/sun/crypto/provider/AESCipher.java]
> ** See also 
> [CipherCore.java|https://github.com/frohoff/jdk8u-dev-jdk/blob/master/src/share/classes/com/sun/crypto/provider/CipherCore.java],
>  
> [FeedbackCipher.java|https://github.com/frohoff/jdk8u-dev-jdk/blob/master/src/share/classes/com/sun/crypto/provider/FeedbackCipher.java],
>  
> [GaloisCounterMode.java|https://github.com/frohoff/jdk8u-dev-jdk/blob/master/src/share/classes/com/sun/crypto/provider/GaloisCounterMode.java]



--
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] [Work logged] (SSHD-506) Add support for aes128/256-gcm ciphers

2020-07-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-506?focusedWorklogId=463869=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-463869
 ]

ASF GitHub Bot logged work on SSHD-506:
---

Author: ASF GitHub Bot
Created on: 29/Jul/20 07:39
Start Date: 29/Jul/20 07:39
Worklog Time Spent: 10m 
  Work Description: jvz commented on pull request #132:
URL: https://github.com/apache/mina-sshd/pull/132#issuecomment-665138067


   Oh hey, sorry about that. This branch is basically ready at this point as I 
got stuck trying to get ChaCha20-Poly1305 to work properly. From what I recall, 
I already updated the code in this branch to match the same style I was hoping 
to use for that cipher (particularly by making the ChaCha version of 
`updateAAD` handle the encryption/decryption aspect, too). As that aspect 
shouldn't change too much, and based on the refactoring culture here, I don't 
think there's much need to wait any longer on the second feature.



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: 463869)
Time Spent: 7h 20m  (was: 7h 10m)

> Add support for aes128/256-gcm ciphers
> --
>
> Key: SSHD-506
> URL: https://issues.apache.org/jira/browse/SSHD-506
> Project: MINA SSHD
>  Issue Type: Improvement
>Reporter: Lyor Goldstein
>Assignee: Lyor Goldstein
>Priority: Major
>  Time Spent: 7h 20m
>  Remaining Estimate: 0h
>
> See:
> * [rfc5647|https://tools.ietf.org/html/rfc5647]
> * 
> [draft-igoe-secsh-aes-gcm-01|https://tools.ietf.org/html/draft-igoe-secsh-aes-gcm-01]
> * [OpenSSH v6.2|http://www.openssh.com/txt/release-6.2]
> * [JAVA AES 256 GCM encrypt/decrypt 
> example|https://javainterviewpoint.com/java-aes-256-gcm-encryption-and-decryption/]
>  - especially the usage of {{GCMParameterSpec}} to initialize the cipher
> * [OpenJDK 8 AESCipher.java source 
> code|https://github.com/frohoff/jdk8u-dev-jdk/blob/master/src/share/classes/com/sun/crypto/provider/AESCipher.java]
> ** See also 
> [CipherCore.java|https://github.com/frohoff/jdk8u-dev-jdk/blob/master/src/share/classes/com/sun/crypto/provider/CipherCore.java],
>  
> [FeedbackCipher.java|https://github.com/frohoff/jdk8u-dev-jdk/blob/master/src/share/classes/com/sun/crypto/provider/FeedbackCipher.java],
>  
> [GaloisCounterMode.java|https://github.com/frohoff/jdk8u-dev-jdk/blob/master/src/share/classes/com/sun/crypto/provider/GaloisCounterMode.java]



--
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 commented on pull request #150: Add a test exercising the connection through an ssh proxy

2020-07-29 Thread GitBox


gnodet commented on pull request #150:
URL: https://github.com/apache/mina-sshd/pull/150#issuecomment-664820906


   @tomaswolf would you mind creating a patch / PR ? I've done a simple test 
and the client will have to accept both the proxy and the server keys, but I'm 
not sure what you'd like to see in the test.



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



[GitHub] [mina-sshd] tomaswolf commented on pull request #152: ProxyTest with HostKeyVerification

2020-07-29 Thread GitBox


tomaswolf commented on pull request #152:
URL: https://github.com/apache/mina-sshd/pull/152#issuecomment-665183072


   This is a failing test; not intended to be merged as is.



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



[GitHub] [mina-sshd] jvz commented on pull request #132: [SSHD-506] Add support for RFC 5647

2020-07-29 Thread GitBox


jvz commented on pull request #132:
URL: https://github.com/apache/mina-sshd/pull/132#issuecomment-665138067


   Oh hey, sorry about that. This branch is basically ready at this point as I 
got stuck trying to get ChaCha20-Poly1305 to work properly. From what I recall, 
I already updated the code in this branch to match the same style I was hoping 
to use for that cipher (particularly by making the ChaCha version of 
`updateAAD` handle the encryption/decryption aspect, too). As that aspect 
shouldn't change too much, and based on the refactoring culture here, I don't 
think there's much need to wait any longer on the second feature.



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



[GitHub] [mina-sshd] lgoldstein commented on pull request #132: [SSHD-506] Add support for RFC 5647

2020-07-29 Thread GitBox


lgoldstein commented on pull request #132:
URL: https://github.com/apache/mina-sshd/pull/132#issuecomment-665110258







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



[GitHub] [mina-sshd] tomaswolf opened a new pull request #152: ProxyTest with HostKeyVerification

2020-07-29 Thread GitBox


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


   This just serves to show that this way of setting up a proxy won't
   work with real host key verification. The session ends up trying to
   find an entry for the local end of the tunnel to the server in the
   knownhosts file, but of course there is none.



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



[GitHub] [mina-sshd] lgoldstein commented on pull request #151: [SSHD-1042] Improve SftpEventListener

2020-07-29 Thread GitBox


lgoldstein commented on pull request #151:
URL: https://github.com/apache/mina-sshd/pull/151#issuecomment-665071196


   Merged - split into 2 commits [`DirectoryHandle` related 
one](https://github.com/apache/mina-sshd/commit/50391abbd285d331a33f4ce9f300afeb99b078ed)
 and [`SftpEventListener` 
one](https://github.com/apache/mina-sshd/commit/20c2392d2b5f933c43ac60d530e6f95d44c08509).
   
   Added also a [specific 
`readingEntries`](https://github.com/apache/mina-sshd/commit/192ad6acdf24b7b7c8714b8d5fe4c95cc7d8de4d)
 API that would enable implementing the policy referenced in the issue more 
easily
   
   Please close the PR - many thanks.



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



[GitHub] [mina-sshd] tomaswolf commented on pull request #150: Add a test exercising the connection through an ssh proxy

2020-07-29 Thread GitBox


tomaswolf commented on pull request #150:
URL: https://github.com/apache/mina-sshd/pull/150#issuecomment-664672962







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] [Work logged] (SSHD-1042) Command Limiting Policy SSH_FXP_READDIR closing connection

2020-07-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1042?focusedWorklogId=463681=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-463681
 ]

ASF GitHub Bot logged work on SSHD-1042:


Author: ASF GitHub Bot
Created on: 29/Jul/20 07:21
Start Date: 29/Jul/20 07:21
Worklog Time Spent: 10m 
  Work Description: tomaswolf commented on a change in pull request #151:
URL: https://github.com/apache/mina-sshd/pull/151#discussion_r461132590



##
File path: 
sshd-sftp/src/main/java/org/apache/sshd/sftp/server/SftpEventListener.java
##
@@ -35,6 +36,32 @@
  * @author mailto:dev@mina.apache.org;>Apache MINA SSHD Project
  */
 public interface SftpEventListener extends SshdEventListener {
+
+/**
+ * Called when a SFTP request has been received before it is processed.
+ *
+ * @param  session The {@link ServerSession} through which the request 
was received
+ * @param  typeThe request type; one of the {@code SSH_FXP_*} 
constants from {@link SftpConstants}
+ * @param  id  The id received with the request
+ * @throws IOException If the request shall generate an error response. 
Throwing an exception for
+ * {@code type = }{@link SftpConstants#SSH_FXP_INIT} 
closes the session.
+ */
+default void received(ServerSession session, int type, int id) throws 
IOException {
+// empty
+}
+
+/**
+ * Called when a SFTP extension request {@link 
SftpConstants#SSH_FXP_EXTENDED} has been received before it is processed.
+ *
+ * @param  session The {@link ServerSession} through which the request 
was received
+ * @param  extension   The extension request received; one of the {@code 
SSH_EXT_*} constants from {@link SftpConstants}
+ * @param  id  The id received with the request
+ * @throws IOException If the request shall generate an error response.
+ */
+default void receivedExtension(ServerSession session, String extension, 
int id) throws IOException {
+// empty
+}
+

Review comment:
   These callbacks would enable the SB2Bi team to implement their "Command 
Limiting Policy" via an SftpEventListener.





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: 463681)
Time Spent: 20m  (was: 10m)

> Command Limiting Policy SSH_FXP_READDIR closing connection
> --
>
> Key: SSHD-1042
> URL: https://issues.apache.org/jira/browse/SSHD-1042
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Shahbaz
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.6.0
>
> Attachments: apache rmdir.PNG, maverick filesystem.PNG
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> *This are the below commands which prevent the execution of process for the 
> user at instance level relating to permission of open, read, write, opendir, 
> readdir, remove, rename, makedir, removedir respectively.*
> *SSH_FXP_OPEN*
>  *SSH_FXP_READ*
>  *SSH_FXP_WRITE*
>  *SSH_FXP_OPENDIR*
>  *SSH_FXP_READDIR*
>  *SSH_FXP_REMOVE*
>  *SSH_FXP_RENAME*
>  *SSH_FXP_MKDIR*
>  *SSH_FXP_RMDIR*
> *But the command for* *SSH_FXP_READDIR is not executed as it directly closes 
> the connection. This connection is closed because while throwing the 
> exception it directly calls destroy method from filesystem. Is there any 
> workaround to inhibit its execution when we extend sftpsubsytem class where 
> exception is thrown.***
> *While reading the directory when SH_FXP_READDIR is applied, the operation is 
> interrupted, as it evokes the destroy function to close the connection 
> directly when an IOException is thrown. The issue is how can we make sure the 
> destroy function is not called, when exception is thrown in a class which 
> extends SFTPSubsystem.*
>  
> *Exact working scenarios of the above issue:* 
> We have our implementation of Command Limiting Policy to prevent specific IP 
> addresses or users from executing 
>  certain commands on an SFTP server.  
>  After validation of the policy, we don't want user to perform the operation 
> based on the command which is applied on the policy. 
>  For example: When the SSH_FXP_OPENDIR is invoked, the user is restricted 
> from open directory operation. 
>  Our issue is related to command SSH_FXP_READDIR command.
>  Expected Behaviour : Prevent user from reading the directory when sftp ls 
> command is executed, by giving the message like "Unable to read 

[GitHub] [mina-sshd] tomaswolf commented on a change in pull request #151: [SSHD-1042] Improve SftpEventListener

2020-07-29 Thread GitBox


tomaswolf commented on a change in pull request #151:
URL: https://github.com/apache/mina-sshd/pull/151#discussion_r461132590



##
File path: 
sshd-sftp/src/main/java/org/apache/sshd/sftp/server/SftpEventListener.java
##
@@ -35,6 +36,32 @@
  * @author mailto:dev@mina.apache.org;>Apache MINA SSHD Project
  */
 public interface SftpEventListener extends SshdEventListener {
+
+/**
+ * Called when a SFTP request has been received before it is processed.
+ *
+ * @param  session The {@link ServerSession} through which the request 
was received
+ * @param  typeThe request type; one of the {@code SSH_FXP_*} 
constants from {@link SftpConstants}
+ * @param  id  The id received with the request
+ * @throws IOException If the request shall generate an error response. 
Throwing an exception for
+ * {@code type = }{@link SftpConstants#SSH_FXP_INIT} 
closes the session.
+ */
+default void received(ServerSession session, int type, int id) throws 
IOException {
+// empty
+}
+
+/**
+ * Called when a SFTP extension request {@link 
SftpConstants#SSH_FXP_EXTENDED} has been received before it is processed.
+ *
+ * @param  session The {@link ServerSession} through which the request 
was received
+ * @param  extension   The extension request received; one of the {@code 
SSH_EXT_*} constants from {@link SftpConstants}
+ * @param  id  The id received with the request
+ * @throws IOException If the request shall generate an error response.
+ */
+default void receivedExtension(ServerSession session, String extension, 
int id) throws IOException {
+// empty
+}
+

Review comment:
   These callbacks would enable the SB2Bi team to implement their "Command 
Limiting Policy" via an SftpEventListener.





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



[GitHub] [mina-sshd] tomaswolf edited a comment on pull request #152: ProxyTest with HostKeyVerification

2020-07-29 Thread GitBox


tomaswolf edited a comment on pull request #152:
URL: https://github.com/apache/mina-sshd/pull/152#issuecomment-665183072


   This is a failing test; not intended to be merged as is. Intended to show 
what I mean in the discussion on #150.



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] [Work logged] (SSHD-1042) Command Limiting Policy SSH_FXP_READDIR closing connection

2020-07-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1042?focusedWorklogId=463732=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-463732
 ]

ASF GitHub Bot logged work on SSHD-1042:


Author: ASF GitHub Bot
Created on: 29/Jul/20 07:27
Start Date: 29/Jul/20 07:27
Worklog Time Spent: 10m 
  Work Description: lgoldstein commented on pull request #151:
URL: https://github.com/apache/mina-sshd/pull/151#issuecomment-665071196


   Merged - split into 2 commits [`DirectoryHandle` related 
one](https://github.com/apache/mina-sshd/commit/50391abbd285d331a33f4ce9f300afeb99b078ed)
 and [`SftpEventListener` 
one](https://github.com/apache/mina-sshd/commit/20c2392d2b5f933c43ac60d530e6f95d44c08509).
   
   Added also a [specific 
`readingEntries`](https://github.com/apache/mina-sshd/commit/192ad6acdf24b7b7c8714b8d5fe4c95cc7d8de4d)
 API that would enable implementing the policy referenced in the issue more 
easily
   
   Please close the PR - many thanks.



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: 463732)
Time Spent: 0.5h  (was: 20m)

> Command Limiting Policy SSH_FXP_READDIR closing connection
> --
>
> Key: SSHD-1042
> URL: https://issues.apache.org/jira/browse/SSHD-1042
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Shahbaz
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.6.0
>
> Attachments: apache rmdir.PNG, maverick filesystem.PNG
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> *This are the below commands which prevent the execution of process for the 
> user at instance level relating to permission of open, read, write, opendir, 
> readdir, remove, rename, makedir, removedir respectively.*
> *SSH_FXP_OPEN*
>  *SSH_FXP_READ*
>  *SSH_FXP_WRITE*
>  *SSH_FXP_OPENDIR*
>  *SSH_FXP_READDIR*
>  *SSH_FXP_REMOVE*
>  *SSH_FXP_RENAME*
>  *SSH_FXP_MKDIR*
>  *SSH_FXP_RMDIR*
> *But the command for* *SSH_FXP_READDIR is not executed as it directly closes 
> the connection. This connection is closed because while throwing the 
> exception it directly calls destroy method from filesystem. Is there any 
> workaround to inhibit its execution when we extend sftpsubsytem class where 
> exception is thrown.***
> *While reading the directory when SH_FXP_READDIR is applied, the operation is 
> interrupted, as it evokes the destroy function to close the connection 
> directly when an IOException is thrown. The issue is how can we make sure the 
> destroy function is not called, when exception is thrown in a class which 
> extends SFTPSubsystem.*
>  
> *Exact working scenarios of the above issue:* 
> We have our implementation of Command Limiting Policy to prevent specific IP 
> addresses or users from executing 
>  certain commands on an SFTP server.  
>  After validation of the policy, we don't want user to perform the operation 
> based on the command which is applied on the policy. 
>  For example: When the SSH_FXP_OPENDIR is invoked, the user is restricted 
> from open directory operation. 
>  Our issue is related to command SSH_FXP_READDIR command.
>  Expected Behaviour : Prevent user from reading the directory when sftp ls 
> command is executed, by giving the message like "Unable to read the 
> directory". 
>  But we see that, though we throw AcessDeniedException on validating the 
> policy, the connection is getting closed, and we get an error as "Connection 
> closed". 
>  We have the same implementation for validating the policy and we throw 
> AcessDeniedException in case of all the sftp commands(if we need to prevent 
> the user/ip)
>  We find that all the sftp commands work as expected, except SSH_FXP_READDIR. 
> The difference we find is that destroy() method in SFTP Subsystem is getting 
> invoked after our policy validation in SSH_FXP_READDIR. In case of all other 
> commands, we dont see destro() getting invoked.
>  
> Is there any specific thing that needs to be handled in our implementation to 
> prevent destroy() from getting invoked and connection getting closed. We are 
> unable to find why destroy() is invoked in case of SSH_FXP_READDIR command, 
> even though AcessDeniedException is thrown from our implementation.
>  
>  
>  
> *Below attached are the images which shows how destroy is invoked in both 
> maverick and apache case.* 
>  
>  
>  
>  



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


[jira] [Commented] (SSHD-1044) How to improve sftp transfer speed

2020-07-29 Thread barry-gq (Jira)


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

barry-gq commented on SSHD-1044:


According to the call stack, I found that synchronous transmission is used 
here, and in my project, I created an sshdserver side and then configured sftp. 
It is not directly connected to the device to execute the write method 
transmission like the demo in github, so this jarAre there any problems with 
the default configuration of the package?

!image-2020-07-29-15-09-12-806.png!

> How to improve sftp transfer speed
> --
>
> Key: SSHD-1044
> URL: https://issues.apache.org/jira/browse/SSHD-1044
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: barry-gq
>Assignee: Guillaume Nodet
>Priority: Blocker
> Attachments: image-2020-07-29-10-56-20-207.png, 
> image-2020-07-29-15-09-12-806.png
>
>
> *Phenomenon*:
>       In my project, I used mina sftp version 2.4.0. When my project created 
> a sshdServer and connected to a linux device using the sftp protocol, the 
> speed was very slow when performing file transfer (upload) operations, About 
> one-tenth the speed of connecting the same device with filezilla and 
> uploading the same file
> *Question:*
>       Is there any configuration in mina sftp 2.4.0 to increase the speed of 
> file transfer
>  
> *I look forward to your reply, thank you!*
>  



--
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-1044) How to improve sftp transfer speed

2020-07-29 Thread barry-gq (Jira)


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

barry-gq updated SSHD-1044:
---
Attachment: image-2020-07-29-15-09-12-806.png

> How to improve sftp transfer speed
> --
>
> Key: SSHD-1044
> URL: https://issues.apache.org/jira/browse/SSHD-1044
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: barry-gq
>Assignee: Guillaume Nodet
>Priority: Blocker
> Attachments: image-2020-07-29-10-56-20-207.png, 
> image-2020-07-29-15-09-12-806.png
>
>
> *Phenomenon*:
>       In my project, I used mina sftp version 2.4.0. When my project created 
> a sshdServer and connected to a linux device using the sftp protocol, the 
> speed was very slow when performing file transfer (upload) operations, About 
> one-tenth the speed of connecting the same device with filezilla and 
> uploading the same file
> *Question:*
>       Is there any configuration in mina sftp 2.4.0 to increase the speed of 
> file transfer
>  
> *I look forward to your reply, thank you!*
>  



--
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] [Work logged] (SSHD-1042) Command Limiting Policy SSH_FXP_READDIR closing connection

2020-07-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1042?focusedWorklogId=463613=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-463613
 ]

ASF GitHub Bot logged work on SSHD-1042:


Author: ASF GitHub Bot
Created on: 29/Jul/20 07:15
Start Date: 29/Jul/20 07:15
Worklog Time Spent: 10m 
  Work Description: tomaswolf opened a new pull request #151:
URL: https://github.com/apache/mina-sshd/pull/151


   * Call opening() for DirectoryHandle
   * Add received() and receivedExtension() called just after a
 command has been received.



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: 463613)
Remaining Estimate: 0h
Time Spent: 10m

> Command Limiting Policy SSH_FXP_READDIR closing connection
> --
>
> Key: SSHD-1042
> URL: https://issues.apache.org/jira/browse/SSHD-1042
> Project: MINA SSHD
>  Issue Type: New Feature
>Reporter: Shahbaz
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.6.0
>
> Attachments: apache rmdir.PNG, maverick filesystem.PNG
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> *This are the below commands which prevent the execution of process for the 
> user at instance level relating to permission of open, read, write, opendir, 
> readdir, remove, rename, makedir, removedir respectively.*
> *SSH_FXP_OPEN*
>  *SSH_FXP_READ*
>  *SSH_FXP_WRITE*
>  *SSH_FXP_OPENDIR*
>  *SSH_FXP_READDIR*
>  *SSH_FXP_REMOVE*
>  *SSH_FXP_RENAME*
>  *SSH_FXP_MKDIR*
>  *SSH_FXP_RMDIR*
> *But the command for* *SSH_FXP_READDIR is not executed as it directly closes 
> the connection. This connection is closed because while throwing the 
> exception it directly calls destroy method from filesystem. Is there any 
> workaround to inhibit its execution when we extend sftpsubsytem class where 
> exception is thrown.***
> *While reading the directory when SH_FXP_READDIR is applied, the operation is 
> interrupted, as it evokes the destroy function to close the connection 
> directly when an IOException is thrown. The issue is how can we make sure the 
> destroy function is not called, when exception is thrown in a class which 
> extends SFTPSubsystem.*
>  
> *Exact working scenarios of the above issue:* 
> We have our implementation of Command Limiting Policy to prevent specific IP 
> addresses or users from executing 
>  certain commands on an SFTP server.  
>  After validation of the policy, we don't want user to perform the operation 
> based on the command which is applied on the policy. 
>  For example: When the SSH_FXP_OPENDIR is invoked, the user is restricted 
> from open directory operation. 
>  Our issue is related to command SSH_FXP_READDIR command.
>  Expected Behaviour : Prevent user from reading the directory when sftp ls 
> command is executed, by giving the message like "Unable to read the 
> directory". 
>  But we see that, though we throw AcessDeniedException on validating the 
> policy, the connection is getting closed, and we get an error as "Connection 
> closed". 
>  We have the same implementation for validating the policy and we throw 
> AcessDeniedException in case of all the sftp commands(if we need to prevent 
> the user/ip)
>  We find that all the sftp commands work as expected, except SSH_FXP_READDIR. 
> The difference we find is that destroy() method in SFTP Subsystem is getting 
> invoked after our policy validation in SSH_FXP_READDIR. In case of all other 
> commands, we dont see destro() getting invoked.
>  
> Is there any specific thing that needs to be handled in our implementation to 
> prevent destroy() from getting invoked and connection getting closed. We are 
> unable to find why destroy() is invoked in case of SSH_FXP_READDIR command, 
> even though AcessDeniedException is thrown from our implementation.
>  
>  
>  
> *Below attached are the images which shows how destroy is invoked in both 
> maverick and apache case.* 
>  
>  
>  
>  



--
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] tomaswolf opened a new pull request #151: [SSHD-1042] Improve SftpEventListener

2020-07-29 Thread GitBox


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


   * Call opening() for DirectoryHandle
   * Add received() and receivedExtension() called just after a
 command has been received.



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