Dear all,

Could anyone help me work out a difference in behaviour between using curl with 
an scp protocol vs /usr/bin/scp ? On the server, I have a small Python wrapper 
script which defers to an scp subprocess, using ForceCommand in my sshd config.


Using either curl or scp on the client copies the file successfully, the 
difference is that when I use curl, the server-side scp subprocess returns 1, 
whereas if I use scp client side, the server-side scp subprocess returns 0.


I had assumed that the server-side scp subprocess would only return a non-zero 
code to indicate an error, but I don't see any errors in the sshd log, nor does 
anything actually go wrong (the full file copies fine in both cases, and the 
client doesn't report any errors either). Does anyone know what the exit code 
indicates, and if there's a correct way for me to determine if there are errors 
with the server-side scp subprocess?


Here's a minimal working reproduction https://github.com/dansebcar/curl-scp


Thank you for your time,

Dan

[https://avatars1.githubusercontent.com/u/32105446?s=400&v=4]<https://github.com/dansebcar/curl-scp>

GitHub - dansebcar/curl-scp<https://github.com/dansebcar/curl-scp>
github.com
Contribute to dansebcar/curl-scp development by creating an account on GitHub.


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to