Skip to content

scp.py does not always close the channel properly

Current situation

The scp module for Paramiko does not always properly close the channel after commands (in particular, if the command is to get a file that does not exist on the server side), which cause unexpected behavior if multiple commands are needed.

For example, if a step was generating two attachments, if the first did not exist the second attachment was ignored.

Desired outcome

No unexpected behavior. We should always close the underlying channel.

Edited by Martin Lafaix