libssh2 scp file transfer (eg. curl) fails to some server implementations (not OpenSSH)
Issue
-
libssh2scp file transfer (eg.curl) fails to some server implementations (not OpenSSH)# curl -v -L -u user:"" --insecure -T ~/file.txt scp://host.domain.com/file-curl-scp <snip> * Authentication complete * SSH CONNECT phase done * failed to send file * Connection #0 to host host.domain.com left intact curl: (79) failed to send file -
The
libssh2transfer may also fail; howevercurlexits with return code of zero. Was able to trigger this slightly different error message simply by using~to indicate user's home directory for file upload.# curl -v -L -u user:"" --insecure -T ~/file.txt scp://host.domain.com/~/file-curl-scp-tilde <snip> * Authentication complete * SSH CONNECT phase done } [data not shown] * We are completely uploaded and fine * Channel failed to close: -34 <------------------------- Actually FAILED!!! * Connection #0 to host host.domain.com left intact # echo $? 0
Environment
- Red Hat Enterprise Linux 7
libssh2-1.4.3-10.el7_2.1(and older)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
