[
https://issues.apache.org/jira/browse/SSHD-1301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17618269#comment-17618269
]
dgü edited comment on SSHD-1301 at 10/16/22 2:44 PM:
-----------------------------------------------------
It looks
{_}org.apache.sshd.client.session.ClientSession{_}{_}#executeRemoteCommand(..){_}
throws an exception if exit value is not 0.
was (Author: JIRAUSER284065):
It looks _org.apache.sshd.client.session#executeRemoteCommand(..)_ throws an
exception if exit value is not 0.
> No exception is thrown if nonexistent command name is executed by ChannelExec
> -----------------------------------------------------------------------------
>
> Key: SSHD-1301
> URL: https://issues.apache.org/jira/browse/SSHD-1301
> Project: MINA SSHD
> Issue Type: Question
> Affects Versions: 2.9.1
> Environment: Java 8
> Reporter: dgü
> Priority: Major
>
> Hello!
> If i execute a remote Linux command such as _ls_ by
> {_}org.apache.sshd.client.session.ClientSession#createExecChannel(String){_},
> it works successfully and _ChannelExec#getExitStatus()_ returns 0.
> If I execute a nonexistent remote comman such as {_}xxx{_}, it doesn't throw
> an exception, _ChannelExec#getExitStatus()_ returns 127 and error stream
> includes _bash: xxx: command not found_
> is this expected behaviour ? if it is expected behavior, it is possible to
> throw an exception after executing remote command if exit code of 0 is a
> result of successful execution.
> Thanks in advance...
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]