curl command results in "curl: (80) Failed to clear the command channel (CCC)"

Solution Unverified - Updated -

Issue

  • Running curl to connect to a FTPS server shows:
/usr/bin/curl 0 -v -# --ftp-ssl --cert /path/to/certs/Public.pem:username --key /path/to/certs/Privatekey.pem --cacert /path/to/certs/Root_Base64.pem -S --user username:password --ftp-ssl-ccc --disable-epsv ftp://example.com/dir/test.txt

--------------------------------------------------------------------------------
* About to connect() to 0 port 80 (#0)
*   Trying 0.0.0.0...
* Failed to connect to 0.0.0.0: Connection refused
* Error 0
* couldn't connect to host
* Closing connection #0
curl: (7) Failed to connect to 0.0.0.0: Connection refused
* About to connect() to example.com port 21 (#0)
*   Trying 198.241.168.20...
* connected
* Connected to example.com (198.241.168.20) port 21 (#0)
< 220 Secure FTP Server ready.
< 234 SSLv23/TLSv1
* successfully set certificate verify locations:
*   CAfile: /path/to/certs/Root_Base64.pem
  CApath: none
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Request CERT (13):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS handshake, CERT verify (15):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*        subject: L=Highlands Ranch; ST=CO; C=US; O=ORG; OU=Inovant; CN=example.com
*        start date: 2017-05-02 14:43:59 GMT
*        expire date: 2020-05-02 14:44:00 GMT
*        subjectAltName: example.com matched
*        issuer: C=US; O=ORG; OU=ORG Services Ltd; CN=ORG Information Delivery Internal CA
*        SSL certificate verify ok.
< 331 Password required for username.
< 230 virtual user username logged in from /192.67.48.41:53896.
< 200 PBSZ=0
< 200 Command PROT okay.
< 200 Command Channel Cleared.
* SSL shutdown timeout
< 257 "/" is current directory.
* Entry path is '/'
< 250 CWD command successful.
* Connect data stream passively
< 227 Entering Passive Mode (198,241,168,20,125,7)
*   Trying 198.241.168.20...
* connected
* Connecting to 198.241.168.20 (198.241.168.20) port 32007
< 200 Type set to I.
< 550 test.txt: No such file or directory.
< 550 test.txt: No such file or directory.
* RETR response: 550
* Remembering we are in dir "1619/"
* Connection #0 to host example.com left intact
curl: (78) SSL shutdown timeout
< 221 Goodbye.
* Closing connection #0
--------------------------------------------------------------------------------
  • Using curl provided by other vendors work fine.

Environment

  • Red Hat Enterprise Linux 7.4
  • curl 7.29.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.