How to Use Telnet on Mac OS X


Telnet is a way to access the command-prompt interface of a remote <a class="StrongLink" href=";>computer&lt;/a>. There are many Telnet clients available, but since Linux systems, Windows, Mac OS X itself and many embedded devices, such as routers, print servers and other network appliances, already have a Telnet interface available, a client is often unnecessary.

Things You'll Need

  • Mac OS X
  • Remote computer access information
Step 1

Go to "Utilities," then "Applications" on your Mac OS X machine. Open the "Terminal" application to start the command prompt. This line, similar to the MS-DOS prompt found in Windows, is where any number of commands can be run.

Step 2

Determine the IP address and port number of the computer to which you wish to connect. The port number is that of the specific computer--Telnet's standard port number is 23. Since all the <a class="StrongLink" href=";>computers&lt;/a> on the network will be associated with the IP address, you'll need this further identifying information. If the computer is on <a class="StrongLink" href=";>the Internet</a> and has a valid DNS (Domain Name System) hostname, you can use this hostname instead of the IP address.

Step 3

Enter the telnet command followed by the hostname or IP address and port (<code>telnet hostname port number</code> or <code>telnet IP port number</code>). If everything is configured correctly, Telnet will connect to the remote computer, and you will be presented with a login prompt or welcome screen. From this point on, anything displayed by the Telnet client comes directly from the remote computer and anything you type goes directly to the remote computer.

Step 4

Break from the Telnet session if it becomes unresponsive. Normally, you'll be able to log out of a Telnet session with the correct server commands, effectively ending the Telnet session. However, if the Telnet session becomes unresponsive, you'll have to end it manually. Since every key press is sent directly to the server, you have to use the Telnet escape sequence: <code>~^]</code> instead of a typical escape sequence. After pressing that, you'll be back in a Telnet client-side command prompt, and you can use the "quit" command to exit Telnet.

Step 5

Use Telnet for debugging purposes. Telnet is used not only to connect to remote Telnet services, but also to connect to any remote service. Since most services work on an ASCII (American Standard Code for Information Interchange) text protocol, you can connect to a remote service--such as the http service on port 80, used to serve web pages--and enter the HTTP request manually as opposed to entering the URL in a web browser.

Tips & Warnings

  • Using Telnet for manual HTTP requests is useful to see exactly what the web server returns as well as any error messages a web browser might not display. The command terminal will show the path from your IP to the host's IP and show any issues or breakdowns along the way.
Promoted By Zergnet


Related Searches

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!