I mentioned I used telnet quite a bit a few posts ago. I don’t use it to log into anything (plain-text passwords over the wire anyone?), instead I use it as a basic TCP connection utility. I see if I can establish a TCP connection, and then I might throw a “GET /” to see if the web servers responds.
So what if you’re using SSL? Fortunately, there’s a utility out there that works pretty much the same. It’s part of the freeware OpenSSL package, which is included with just about every Linux, Solaris, BSD, Unix system around, and a Windows version is pretty easy to get.
To specific utility is openssl s_client -host [ip address or hostname] -port [tcp port]. To use, do the following on a command line prompt:
openssl s_client -host 192.168.0.200 -port 443
This will attempt an SSL/TLS connection to the host 192.168.0.200 on port 443. Initially, this spits out a bunch of debugging on the specifics of the connection, including the type of certificate, full certificate chain, cypher, etc.
....
Protocol : TLSv1
Cipher : DHE-RSA-AES256-SHA
Session-ID: 07764E503260A11EBF0D690
Session-ID-ctx:
Master-Key: B108C37807C831EC1895324ED83FDFD4A8DDA0
Key-Arg : None
Krb5 Principal: None
Start Time: 1197668809
Timeout : 300 (sec)
Verify return code: 18 (self signed certificate)
---
You’re then connected to the other end as if you’d used telnet. You can give the other end whatever HTTP requests (or other protocols) you’d like. This utility works not only with HTTPS, but any other SSL/TLS wrapped protocol, including SMTPS, IMAPS, etc.
Enjoy.

