Remote compiling works okay and 9 out of 10 deploy tasks will fail with LIBSSH2_ERROR_SOCKET_SEND. 1 in 10 (or so) will succeed. My solution has several binaries and sometimes several will deploy to the target for debugging but one will fail. Please advise.
This error means that the SSH server simply drops the connection. The only way to diagnose this is to reproduce it on a simpler setup (1 machine, 1 project) and experiment with the SSH server settings to see what causes the error. Perhaps deploying a large file or trying to deploy several files sequentially causes the problem.