I need to make continuous connection attempts to www.example.com at port 443.
telnet www.example.com 443
But once done, it will keep getting connected
[root@localhost ~]# bash c_telnet.sh
Trying 142.250.195.164...
Connected to www.google.com.
Escape character is '^]'.
Connection closed by foreign host.
Trying 142.250.205.228...
Connected to www.google.com.
Escape character is '^]'.
As you can see, there is not much that you can deduce from this output. I want to test exactly when the server wasn't reachable.
I'd prefer curl only if curl -I https://www.google.com
worked fast enough. Are there any alternatives?
I am not aware if I can ping port 443.
netcat
is a great tool but I can't have installed it quickly, meanwhile telnet
, curl
etc are all available.
nc -vz www.example.com 443
,nc
(netcat) should be pre installed on your system, if not, it's really not hard to install it. PSnc -vt
is some kind of telnet emulation, you could also useopenssl s_client www.example.com:443
, there you could also check the certificate in one go.