Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to Curl a SSL page on my ubuntu 12.04 TLS server, it won't work:

not ssl page:

$ curl -vv
[the entire webpage]

ssl page:

$ curl -vv
* About to connect() to port 443 (#0)
*   Trying connected
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* Unknown SSL protocol error in connection to 
* Closing connection #0
curl: (35) Unknown SSL protocol error in connection to 

This does work on my own machine (OS X).

When I try it via openSSL:

$ openssl s_client -connect
connect: Connection timed out

openSSL version:

$ openssl version
OpenSSL 1.0.1c 10 May 2012
share|improve this question
If you are using cloud services.. then makes sense to check (with your cloud provider) if theres any proxy in between that could be dropping your connection – Derrick Lobo Apr 8 at 16:14
up vote 4 down vote accepted

You seem to have a typo.

$ openssl s_client -connect

Port 433 is not open on the remote host, which is why you got error 110 (Connection refused).

Try using port 443 (the standard HTTPS port) instead.

As for curl, I can replicate the problem when using, but works properly (though it sends a 302 redirect to

$ curl -vv
* About to connect() to port 443 (#0)
*   Trying
* connected
* Connected to ( port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* NSS error -5938 (PR_END_OF_FILE_ERROR)
* Encountered end of file
* Closing connection #0
curl: (35) Encountered end of file

This means that the server killed the connection. For whatever reason it really doesn't want to talk to us.

This is probably not something that you can fix.

share|improve this answer
The openssl command had a typo indeed. But my curl command gives a different error: curl: (35) Unknown SSL protocol error in connection to . The error disappears on so I guess it's the server. – askmike Sep 12 '12 at 14:08

Had very similar problem - there was an issue in protocol negotiation, which probably led to some miscommunication with the crypto provider (OpenSSL libs). Try setting the secure protocol explicitly, e.g.:

curl --sslv3 # OR
curl --sslv2 # OR
curl --tlsv1
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.