ssh-rs icon indicating copy to clipboard operation
ssh-rs copied to clipboard

Getting command exit status

Open larsch opened this issue 1 year ago • 3 comments

Would it be possible to retrieve the command exit status and signal status after running a command with ChannelExec<S>::send_command?

exit_status channel request: https://datatracker.ietf.org/doc/html/rfc4254#section-6.10

larsch avatar Dec 19 '23 08:12 larsch

Let me do some research to find out if we can do this. Maybe update later this week.

BRs.

HsuJv avatar Dec 19 '23 14:12 HsuJv

Hi there, Sorry for the late Please refer to the latest example files to find how to get the exit status BRs.

https://github.com/1148118271/ssh-rs/blob/2699b3d75bf35ee6f33d5ed30f826e8ec2be979d/examples/exec/src/main.rs#L27-L33

HsuJv avatar Dec 26 '23 09:12 HsuJv

Thank you very much! This works beautifully.

larsch avatar Jan 10 '24 08:01 larsch