Unix How-To: When Telnet isn't Telnet

By Sandra Henry-Stocker  Add a new comment

The security dudes have been badmouthing telnet for a couple of decades now, reminding us that this old time tool for connecting to remote systems exposes our passwords to the snooping masses. But the telnet command itself still has some handy uses that shouldn't be abandoned.

Telnet is, first and foremost, a tool for creating a terminal-like login session on a remote system. As such, it does just what the security dudes have been warning us about -- it sends your login information across the network in clear text. Given that, anyone running snoop, tcpdump, wireshark (nee ethereal) or any other packet grabber can steal and use your credentials. In short, that's a bad thing.

Telnet for connecting to a service that doesn't use encryption, on the other hand, is a friendly and useful tool. Want to check whether a web site that you manage is running from the command line? No problem, try "telnet remhost 80" and you will connect to the web service. Once connected, you can issue a "GET /" command and grab the home page. If you don't mind reading a little HTML (which is good for our little dweebish souls now and then), you'll get a nice confirmation that the web site is up and doing the right thing.

You can also test a mail server using telnet by aiming the tool at port 25. In fact, if you like, you can send out a test message by speaking the "sendmail lingo", otherwise known as the SMTP protocol. The conversation goes through greeting the remote system (after it acknowledges the connection) by saying something like "HELO myname" and then piecing your message together using "MAIL FROM: myserver@mydomain.com", "RCPT TO: recip@recipdomain.org", "DATA", your text message, a "." on a line by itself to end the message and, finally, a "quit" to exit.

220  mailserver.domain.com  someorg ESMTP MAIL Service, Version: 1.2.3.4
helo myserver.domain.com
250 mailserver.domain.com Hello [10.2.3.4]
mail from:
250 2.1.0 myname@mydomain.com....Sender OK
rcpt to:
250 2.1.5 recip@recipdomain.org
data
354 Start mail input; end with <CRLF>.<CRLF>
subject: Testing 1 2 3
This is a test.  You may ignore it.
.
250 2.6.0  Queued mail for delivery
quit

You can use telnet to test a range of applications, though not every application will cooperate with telnet's communications. Try it with POP3, MS Exchange and numerous text-based applications. It can be a useful tool for checking whether a service is not just running, but responding properly.

Yes, you will still be sending information in plain text, but for many applications (such as web servers), that's par for the course. When you use telnet to test a service in this way, you're not talking with a telnet daemon, but only using the telnet command to make the connection for you to connect to the service if your choice.

ITworld LIVE

IT Management/StrategyWhite Papers & Webcasts

White Paper

The Cloud: Reinventing Enterprise Collaboration

Collaboration and content sharing are not, of course, new concepts. But cloud computing has changed the nature of collaboration, content sharing, document storage and project management to enable more efficient, faster-acting and cost-effective enterprises. According to a new study by IDG Research, the vast majority of knowledge workers (86%) placed a very high level of importance on collaborating with internal coworkers and external stakeholders, and having access to the most up-to-date corporate information. Read how organizations are realizing massive productivity gains by transitioning their content management solutions to cloud-based models.

White Paper

Empowering Your Mobile Worker

Today's most productive employees are mobile, and your company's IT strategy must be ready to support them with 24/7 access to the business information they need across a range of mobile devices.See how corporations are meeting the many needs of their mobile workers with the help of Box.

White Paper

Market Landscape Report: Online File Sharing and Collaboration in the Enterprise

The trend toward "consumerization" marches onward in IT; more and more end-users are choosing their own hardware plaforms and software applications in lieu of the IT-sanctioned business tools provided by their companies. These end-users are looking to tackle issues like data sharing, portability, and access from multiple intelligent endpoint devices, creating a conundrum for IT as it needs to balance business enablement, ease of access, and collaborative capacity with the need to maintain control and security of information assets. This need for balance is one of the drivers of the fast growing online file sharing and collaboration segment of the SaaS market. This paper examines the market drivers, inhibitors, and top vendors in this segment, including Box, Citrix Sharefile, Dropbox, Egnyte, Nomadesk, Sugarsync, Syncplicity and YouSendIt.

White Paper

Sharing Simplified - Consolidating File-sharing Technologies

Employees need to share content with colleagues within their organization and outside. Yet, ECMs make it hard to share content within a business and impossible between organizations. Read how one company consolidated multiple file sharing technologies to increase productivity and reduce complexity.

White Paper

Content Sharing 2.0: The Road Ahead

A growing number of companies are taking advantage of the natural synergies that exist between cloud-based IT services and content access and sharing. Legacy content management and collaboration systems simply weren't designed to meet the evolving requirements of today's IT and business managers, as well as the needs of content users. Box provides cloud-based content storage, access and collaboration services that require virtually no user training and supports file access and delivery on almost all popular PC and mobile devices. Read how Box let companies rapidly implement a cost-effective and secure content storage and sharing system that can easily expand to accommodate any size and number of files.

See more White Papers | Webcasts

Ask a question

Ask a Question