![Forrest logo](/images/logo.png)
openssl-s_client:tldr:04296
openssl-s_client: Set the Server Name Indicator (SNI) when connecting to the SSL/TLS server.
$ openssl s_client -connect ${host}:${port} -servername ${hostname}
try on your machine
The openssl s_client -connect ${host}:${port} -servername ${hostname}
command is a way to use the OpenSSL library to establish a secure connection to a specified server.
Here's a breakdown of the command and its parameters:
openssl
: This is the command to run theopenssl
program, which is a command-line tool for using the OpenSSL library.s_client
: This is a subcommand ofopenssl
that specifically deals with SSL/TLS connections from a client perspective.-connect ${host}:${port}
: This specifies the host IP address or domain name and the port number to establish the connection with.${host}
and${port}
should be replaced with the actual values.-servername ${hostname}
: This parameter specifies the hostname to be sent as the SNI (Server Name Indication) extension in the ClientHello message.${hostname}
should be replaced with the actual value.
Basically, this command is used to test and interact with SSL/TLS servers from the client-side using OpenSSL. It establishes a secure connection to the server specified by ${host}
and ${port}
, sending the ${hostname}
as the Server Name Indication.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.