[
https://issues.apache.org/jira/browse/SSHD-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15117135#comment-15117135
]
Moshe Moshe commented on SSHD-628:
----------------------------------
SCP command can fail without throwing IOException, for example if the SSHD
server closes the ExecChannel(user not allowed to SCP in /etc/scpusers).
here is the log:
[main] DEBUG ClientConnectionService:166 - registerChannel(id=1)
ChannelExec[id=1, recipient=0]
[main] DEBUG ClientSessionImpl:363 - createExecChannel(id=1)[scp -f --
/var/tmp/file.tgz] created
[main] DEBUG ChannelExec:234 - Send SSH_MSG_CHANNEL_OPEN on channel
ChannelExec[id=1, recipient=0]
[main] DEBUG Nio2Session:114 - Writing 64 bytes
[sshd-SshClient[36359f55]-nio2-thread-5] DEBUG Nio2Session:269 - Finished
writing
[sshd-SshClient[36359f55]-nio2-thread-1] DEBUG Nio2Session:218 - Read 48 bytes
[sshd-SshClient[36359f55]-nio2-thread-1] DEBUG ClientConnectionService:236 -
Received SSH_MSG_CHANNEL_OPEN_CONFIRMATION on channel 1
[sshd-SshClient[36359f55]-nio2-thread-1] DEBUG ChannelExec:45 - Send
SSH_MSG_CHANNEL_REQUEST exec
[sshd-SshClient[36359f55]-nio2-thread-1] DEBUG Nio2Session:114 - Writing 112
bytes
[sshd-SshClient[36359f55]-nio2-thread-1] DEBUG Nio2Session:269 - Finished
writing
[main] DEBUG Window:173 - Waiting for some space on ChannelExec[id=0,
recipient=0]: client remote window
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG Nio2Session:218 - Read 176 bytes
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG ChannelExec:362 - Received
SSH_MSG_CHANNEL_WINDOW_ADJUST on channel ChannelExec[id=1, recipient=1]
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG Window:104 - Increase
ChannelExec[id=0, recipient=0]: client remote window by 131072 up to 131072
[main] DEBUG Window:181 - Space available for ChannelExec[id=0, recipient=0]:
client remote window
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG ChannelExec:146 - Received
SSH_MSG_CHANNEL_REQUEST exit-status on channel ChannelExec[id=1, recipient=1]
(wantReply false)
[main] DEBUG ChannelExec:142 - Send SSH_MSG_CHANNEL_DATA on channel 1
[main] DEBUG Nio2Session:114 - Writing 48 bytes
[sshd-SshClient[36359f55]-nio2-thread-2] DEBUG Nio2Session:269 - Finished
writing
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG ChannelExec:177 -
sendResponse(exit-status) result=ReplySuccess, want-reply=false
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG ChannelExec:355 - Received
SSH_MSG_CHANNEL_EOF on channel ChannelExec[id=1, recipient=1]
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG ChannelExec:213 - Received
SSH_MSG_CHANNEL_CLOSE on channel ChannelExec[id=1, recipient=1]
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG ChannelExec:354 - Closing
ChannelExec[id=1, recipient=1] gracefully
[main] DEBUG ChannelExec:375 - ChannelExec[id=1, recipient=1] is already closing
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG
AbstractChannel$GracefulChannelCloseable:254 - Send SSH_MSG_CHANNEL_CLOSE on
channel ChannelExec[id=1, recipient=1]
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG Nio2Session:114 - Writing 48
bytes
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG Nio2Session:269 - Finished
writing
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG
AbstractChannel$GracefulChannelCloseable:264 - Message SSH_MSG_CHANNEL_CLOSE
written on channel ChannelExec[id=1, recipient=1]
[sshd-SshClient[36359f55]-nio2-thread-3] DEBUG ChannelExec:364 -
ChannelExec[id=1, recipient=1] closed
> ExitStatus on SCP download and upload
> -------------------------------------
>
> Key: SSHD-628
> URL: https://issues.apache.org/jira/browse/SSHD-628
> Project: MINA SSHD
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Moshe Moshe
> Attachments: return_exit_status_on_scp.patch
>
>
> Hi,
> I believe we should return the exitStatus on SCP upload/download, this is
> important to know if SCP command was successful.
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)