TELNET : TELNET (TELecommunication NETwork) is a network protocol used on the Internet or local area network (LAN) connections. It was developed in 1969 beginning with RFC 15 and standardized as IETF STD 8, one of the first Internet standards.
It is a network protocol used on the Internet or local area networks to provide a bidirectional interactive communications facility. Typically, telnet provides access to a command-line interface on a remote host via a virtual terminal connection which consists of an 8-bit byte oriented data connection over the Transmission Control Protocol (TCP). User data is interspersed in-band with TELNET control information. The user’s computer, which initiates the connection, is referred to as the local computer.
The computer being connected to, which accepts the connection, is rderred to as the remote computer. The remote compmer can be physically located in the next room, the next town or in another country.
The network terminal protocol (TELNET) allows a user to log in on any other computer on the network. We can start a remote session by specifying a computer to connect to. From that time until we finish the session, anything we type is sent to the other computer.
The Telnet program runs on the computer and connects your PC to a server on the network. We can then enter commands through the Telnet program and they will be executed as if we were entering them directly on the server console. This enables we to control the server and communicate with other servers on the network. To start a Telnet session, we must log in to a server by entering a valid username and password. Telnet is a common way to remotely control Web servers.
The term telnet also refers to software which implements the client part of the protocol. TELNET clients have been available on most Unix systems for many years and are available virtually for all platforms. Most network equipment and OSs with a TCP/IP stack support some kind of TELNET service server for their remote configuration including ones based on Windows NT. TELNET is a client server protocol, based on a reliable connection oriented transport. Typically this protocol used to establish a connection to TCP port 23, where a getty-equivalent program (telnetd) is listening, although TELNET predates.
Telnet was developed in 1969 to aid in remote connectivity between computers over a network. Telnet can connect to a remote machine that on a network and is port listening. Most common ports to which one can connect to through telnet are:
Port 21 ~ File Transfer Protocol
Port 22 – SSH Remote Login Protocol
Port 23 – Telnet Server
Port 25 – Simple Mail Transfer Protocol (SMTP)
Port 53 – Domain Name Server (DNS)
Port 69 – Trivial File Transfer Protocol (TFTP)
Port 70 – Gopher
Port 80 – Hyper Text Transfer Protocol (HTTP)
Port 110 – Post Office Protocol 3 (POP3)
Telnet can be used to connect to virtually any machine that listens on ports. In other words, you can connect to any machine that has certain ports open. Once connected to a machine, you need to issue UNIX based commands to interact with the remote service. For example, a user don’t need to login, check and send mails only through his e-mail service provider’s interface but this can be achieved using simple telnet commands.
It is because of this reason that many hackers can send spoofed emails or access information such as which services are running on the remote machine. This is also called banner grabbing or daemon tracking. Black hat hackers can also use telnet to sniff network packets which might contain sensitive information such as usernames and passwords. This is achieved by using telnet and network utilities such as TCP dump and wire shark.
Telnet client and server functionality comes built-in in most operating systems. However, there are several third-party applications like putty client that enable remote connectivity. A user can connect to a remote machine through several access modes such as raw access, SSH access, etc. SSH mode offers encryption and security and hence can prevent eavesdropping by hackers. This is by far the most secure way of connecting to a machine.
However, it is necessary that the remote machine supports SSH login to make use of the encryption and security features. On windows machines, telnet client can simply be started by issuing the telnet command in windows command shell. The following example would help you connect to a remote machine on the HTTP Port 80 and issue a GET command which would fetch a file as your web browser does it behind scenes:
Command Prompt> Telnet
Command Prompt> open (somedomain.com or ip address) 80
At this stage, you would be connected to some domain.com or ip address on port 80 and the daemon that is running on port 80 (most probably HTTP Server) would be waiting for HTTP requests.
GET/HTTP/1.1host: Issuing the command above would make the HTTP Server return the file requested, in this case it would be the default file at the root location, most applications and embedded devices make use of the telnet technology to connect to remote server machines and provide end user functionality. The most common use of telnet stands to enable remote authentication and access,
Establishing Telnet Connection
To use Telnet, you need to know the address of the host whose resources you want to use.
Your Telnet client contacts the host using its internet address. When you contact the host, the distant computer and your computer negotiate how they will communicate with each other. They decide which terminal emulation will be used. Telnet emulation determines how your keyboard will transmit information to the distant computer and how information will be displayed on your screen. For example, it determines how a back space key <- will work.
Type text in a Telnet session accumulates in a buffer on your computer. When a complete line of data is ready for transmission, or when you give a command to transmit data (such as pressing the Enter key), the data is sent across the Internet from your Network Virtual Terminal (NVT) keyboard. Along with the data is the host’s IP address, which makes sure that the packet is sent to the proper location.
Your IP address is also sent so that information can be routed back to you. Additionally, specific Telnet commands that the other NVT will use, are sent to decide what to do with the data, or how to respond to the data. E.g. when data is sent from one NVT to another and certain information must be sent back to the originating NVT for a process to proceed, the Telnet Go Ahead (GA) command is sent.
After Telnet host receives data you have sent it, processes the data and returns to your screen and give the results of using the data or running the command on a distant computer.
Connecting to a Remote Host
Follow these steps to connect to a remote host using Telnet
1. Open Telnet by clicking on Start menu and choose run. Now type Telnet, and press Enter key from the keyboard or by clicking on the OK button.
2. From the Menu, choose Connect. Remote
3. Enter the name or IP address of the system that you want to connect to in the Host Name Field.
4. If required, a port in the Port field.
5. In the term Type, select the type of terminal that you want Telnet to emulate.
6. After you are finished with the remote host, you can disconnect from a remote host by choosing Connect, Disconnect.
Telnet Protocol Characteristics
There are the various characteristics of Telnet which are described below:
Telnet is a terminal emulation protocol. When you start installing and configuring native TCP/IP devices, you are going to need some way to connect to the device to issue its commands.
Telnet is versatile. You can establish Telnet sessions over the phone. If there is no phone connection and your device is accessible to the Internet, you can establish a Telnet session over the Internet. In any of these conditions you can establish a Telnet session with a remote host.
Terminal Emulation
A personal computer can connect via Modem to a large computer and run a terminal emulation program. The most common terminal emulation is the VT100. The computer works like a dumb terminal, except it is connected via a phone line instead of a direct connection. Often, you will not be able to use graphics on the Internet, such as the WWW (World Wide Web), this kind of access, although you will be able to browse the text-only portion of the Web.
This kind of Internet account is sometimes called “Shell” account. This shell account is available with VSNL for students in India. Many terminal emulation programs can emulate DEC terminals, including the VT52 and VT200 series terminals. For example, tty pathname of your terminal’s device file.
The syntax for this command is
tty [option]
The options are:
1. -1 Prints the synchronous line number.
2. -s Causes tty not to print any output but sets the exit status to 0 if the standard input file is a terminal, and to 1 if it is not.
TELNET is generally used with the following applications :
(1) Enterprise networks to access host applications, e.g. on IBM Mainframes.
(2) Administration of network elements, e.g., in commissioning, integration and maintenance of core network elements in mobile communication networks.
(3) MUD games played over the Internet, as well as talkers, MUSHes, MUCKs, MOOes, and the resurgent BBS community.
(4) embedded systems.