Yesterday I needed to install a telnet client to finish re-configuring my wifi router (telnet turns out to be a handy tool for testing services such as mail servers – don’t use it for remote shell logins). Because general use of telnet is very insecure and frowned on by admins everywhere, this turned out to be a bit of a pain on my Gentoo installation. It didn’t look like I could install a telnet client without also installing a telnet server, which I definitely don’t need!
Thankfully, I learned that I already had a telnet client installed: GNU screen! Besides being an all-round useful tool for shell sessions, screen is easy to use as a telnet client:
# screen //telnet [host] [port]
As an example of something telnet is still useful for, suppose you needed to test the basic functionality of your mail server:
# screen //telnet mail.example.com 25 helo mail from:<email@example.com> rcpt to:<firstname.lastname@example.org> data This is the body of the test e-mail. Make sure it ends with CRLF . CRLF . quit
Thanks to Google Postini for the details on SMTP sessions – I can never remember the details.