OpenSSL "s_client -connect" - Connect to HTTPS Web Site


How to connect to a HTTPS Web site using OpenSSL? I see the Web sites using the "https:\" format.



If you see a Web sites using the "https:\" format, for example, you can try to connect the Web site using the "x509 -connect" command as shown below:


OpenSSL> s_client -connect -quiet

depth=1 C = US, O = DigiCert Inc, OU =, CN = DigiCert
nded Validation Server CA
verify error:num=20:unable to get local issuer certificate


Options used in these commands are:

  • "-connect" - Establish a secure communication connection with server "" at port # "443". Remember that HTTPS Web site uses the default port # 443.
  • "-quiet" - Do not print too much debugging information while establishing the connection.
  • "<Ctrl-C>" - Send the cancel signal to close the connection


OpenSSL "s_client -connect" - View Server Certificate

OpenSSL "s_client" Command Options

OpenSSL "s_client" Command

⇑⇑ OpenSSL Tutorials

2012-07-24, 19814👍, 0💬