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

Thomas Wolf commented on SSHD-1308:
-----------------------------------

Like OpenSSH, Apache MINA sshd sends the channel requests for setting 
environment variables with {{{}want-reply = false{}}}.

You could implement this yourself, but it'd be quite involved. Better figure 
some other way to pass data to the server-side command, for instance via 
command arguments.

> No exception is thrown if setting environment variable is ignored by SSH 
> server
> -------------------------------------------------------------------------------
>
>                 Key: SSHD-1308
>                 URL: https://issues.apache.org/jira/browse/SSHD-1308
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 2.9.1
>         Environment: Java 8
>            Reporter: dgü
>            Priority: Major
>
> Hello!
> If an environment variable set by 
> _org.apache.sshd.client.session.ClientSession#createExecChannel(command,null,env)_
>  is ignored by SSH server and exit code returns 0, then this may cause 
> unexpected behaviour in client application.
> For example, client application may do different tasks when an environment 
> variable is set and not set. In both cases, client application may return 0. 
> Client application may assume that it worked successfully. But, indeed its 
> environment variable is ignored and worked as if environment variable is not 
> set.
> is it possible throw an exception if setting environment variable is ignored 
> by SSH server ?
> Thanks in advance...
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to