Telnet

Telnet is a set of components that provide terminal-like access to a remote computer. A Telnet session requires a Telnet client that will serve as the remote terminal and a Telnet server, which receives the connection request and allows the connection. This relationship is depicted in Figure 15.1.

Figure 15.1. A Telnet server and client.

graphics/15fig01.gif

Telnet is also a protocol a system of rules defining the interactions between Telnet servers and clients. The Telnet protocol is defined in a series of RFCs. Because Telnet is based on a well-defined open protocol, it can be and has been implemented on a wide range of hardware and software systems. The basic purpose of Telnet is to provide a means by which keyboard commands typed by a remote user can cross the network and become input for a different computer. Screen output related to the session then crosses the network from that different computer (the server) to the client system (see Figure 15.2). The effect is that the remote user can interact with the server as if he were logged in locally.

Figure 15.2. Network input and output with Telnet.

graphics/15fig02.gif

On Unix systems, the telnet command is entered at the command prompt, as follows:

 telnet hostname 

where hostname is the name of the computer to which you'd like to connect. (You can also enter an IP address instead of a hostname.) The preceding command launches the Telnet application. When Telnet is running, the commands you enter are executed on the remote computer. Telnet also provides some special commands that you can use during a Telnet session, as follows:

  • close Use this command to close the connection.

  • display Use this command to display connection settings, such as the port or terminal emulation.

  • environ Use this command to set environment variables. Environment variables are used by the operating system to provide machine-specific or user-specific information.

  • logout Use this command to log out the remote user and close the connection.

  • mode Use this command to toggle between ASCII or binary file transfer mode (see Hour 14, "File Transfer and Access Utilities," for an explanation of file transfer mode).

  • open Use this command to connect to a remote computer.

  • quit Use this command to exit Telnet.

  • send Use this command to send special Telnet protocol sequences to the remote computer, such as an abort sequence, a break sequence, or an end-of-file sequence.

  • set Use this command to set connection settings.

  • unset Use this command to unset connection parameters.

  • ? Use this command to print Help information.

On graphics-based platforms such as Microsoft Windows, a Telnet application might have its own icon and run in a window, but the underlying commands and processes are the same as with a text-based system. Consult your vendor documentation.

Telnet is an extremely useful and important tool on internal Unix networks. A system administrator can use Telnet to perform routine administration on remote computers. An admin can work from a single desktop computer and access a server across the network to restart a process, delete a file, create a new directory, or check system statistics. The recent emphasis on security has placed some restrictions on the free use of Telnet. The problem is that Telnet gives network intruders what they want more than anything direct access to a terminal session on a remote server. The Telnet standard supports password authentication, but passwords typically are transported as clear text. You almost never see Telnet deployed on the open Internet and, on internal networks where security is important, Telnet is usually deployed with some restrictions on who uses it and what they can do with it.

By the Way

The emergence of Virtual Private Networks provides new opportunities for using Telnet in situations that once would have been considered insecure. See Hour 20, "TCP/IP Security," for more on VPNs.




Sams Teach Yourself TCP/IP in 24 Hours
Sams Teach Yourself TCP/IP in 24 Hours (4th Edition)
ISBN: 0672329964
EAN: 2147483647
Year: 2003
Pages: 259
Authors: Joe Casad

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net