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

Lyor Goldstein commented on SSHD-1211:
--------------------------------------

I fail to understand why {{sudo scp}} is required. The {{sudo}} part is 
meaningless since the MINA code intercepts the {{scp}} command and "executes" 
it in pure Java code. Furthermore, the 
[documentation|https://github.com/apache/mina-sshd/blob/master/docs/scp.md#server-side-scp]
 clearly shows that if one provides a delegate command to the 
{{ScpCommandFactory}} then any non-{{scp}} command is transferred to it. So if 
your code needs some special semantics for {{sudo}} simply add a command 
delegate and handle it however you see fit.

> ScpCommandFactory does not allow "sudo scp..." commands
> -------------------------------------------------------
>
>                 Key: SSHD-1211
>                 URL: https://issues.apache.org/jira/browse/SSHD-1211
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.7.0
>            Reporter: Kaushal Kumar
>            Priority: Major
>
> ScpCommandFactory validates if the command is valid via 
> [isSupportedCommand|https://github.com/apache/mina-sshd/blob/master/sshd-scp/src/main/java/org/apache/sshd/scp/server/ScpCommandFactory.java#L219].
>  Here it check if the command starts with "scp".
> This check blocks any command which starts with "sudo scp". Kindly check if 
> this could be resolved.
> As far as i see the change will be required at 2 location.
>  # 
> [https://github.com/apache/mina-sshd/blob/master/sshd-scp/src/main/java/org/apache/sshd/scp/server/ScpCommandFactory.java#L219]
>  # 
> https://github.com/apache/mina-sshd/blob/master/sshd-scp/src/main/java/org/apache/sshd/scp/server/ScpCommand.java#L111



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to