Check secure services with(out) telnet

Back in the good ole days, you could use your telnet client (or netcat) to check most services. For example, a mail account via POP3:

$ telnet pop.mailserver.tld 110
+OK [...]
user username
+OK [...]
pass yourpassword
+OK [...]
list
[...]
quit

Today many servers require a secure connection, so that your data (including username and password!) won’t be readable by anyone snooping your connection. It’s a good security policy, but telnet is not able to speak to secure services. You should use Openssl instead:

$ openssl s_client -connect pop.mailserver.tld:995
[...]
+OK [...]
user username
[...]

It also works on different services, for example HTTP:

$ openssl s_client -connect google.com:443
[...]
---
GET / HTTP/1.0

HTTP/1.0 302 Found
Location: https://www.google.it/
[...]

Using this command you can easily check and debug your secure POP, IMAP, HTTP services.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s