net-ssh / net-scp

Pure Ruby implementation of the SCP protocol
http://github.com/delano/net-scp
MIT License
152 stars 62 forks source link

Handle remote server closes channel without exit-status #71

Closed robertcheramy closed 6 months ago

robertcheramy commented 7 months ago

Some ssh-server (APC Network Management Card AP9640) close the channel without sending an exit-status. This is correctly handled by openssh, so NET:SCP should also handle it. I added two test cases: successful download without exit-status and interrupted download.

It would be great if you could review (and hopefully accept this PR), as it will help me to resove an issue on oxidized (https://github.com/ytti/oxidized/issues/1802)

robertcheramy commented 7 months ago

The code of the test does not pass rubocop tests, I will fix this.

robertcheramy commented 7 months ago

The code of the test does not pass rubocop tests, I will fix this.

This has been done with last commit, and this PR can be reviewed now. I will be happy to make any changes if needed.

robertcheramy commented 6 months ago

Thank you very much for approving this PR. Can someone merge it into master?