Skip to content
MtrXTools

Unable to establish SSL connection.

wget could not complete the TLS handshake

Seen in wget

wget connected to the server but the TLS handshake failed; the OpenSSL or GnuTLS line just above gives the reason.

Common causes

  • An old wget or TLS library without TLS 1.2 or 1.3, or without SNI support.
  • The server only accepts TLS versions or ciphers the client does not offer.
  • The port does not speak TLS, or a proxy or firewall reset the connection.

How to fix it

  1. Read the line printed before this one (for example "OpenSSL: error:... alert handshake failure").
  2. Update wget and OpenSSL or GnuTLS, or use curl for comparison.
  3. Check the URL uses https:// only on a TLS port, and check https_proxy.
Check the TLS versions the server accepts

Got a different message? Paste it into the error explainer.

Related errors

All 34 Command line & code errors