Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Why Telnet? 
2.1.
How does Telnet work?
3.
Pros and Cons
3.1.
Pros
3.2.
Cons
4.
Frequently Asked Questions
4.1.
Why is Telnet not secure?
4.2.
What is the Telnet command to access the remote system?
4.3.
Can Telnet work on cross-platform?
4.4.
What is a Pseudo-Terminal driver?
4.5.
What is NVT, and what is its' importance?
5.
Conclusion
Last Updated: Mar 27, 2024

TELNET

Author Ankit Kumar
1 upvote
Computer Networks

Introduction

What is Telnet? 

Telnet is a command-line tool to access remote systems. It is text-oriented, and there isn't any graphical user interface. Telnet is the acronym for teletype network protocol. It was developed way back in 1969, which means it is even older than the internet. 

Telnet follows a client-server protocol, and the traffic is entirely bi-directional. Telnet uses port 23, which means it is needed to ensure that port 23 is open in the remote system in order to access it. If port 23 is not opening the remote system, we won't be able to access it using Telnet. Let's discuss why Telnet was made.

Why Telnet? 

Telnet is a command-line tool used to access remote computer systems. If a telnet service is running on a remote system, we can pretty much access that system with a straightforward command, i.e.,

TELNET SPACE (The IP address of the remote system)

This will open up a Telnet session right in front of us and not only that once the connection is established. The files can be edited, and programs can be run on the remote system from the system right in front of us. But all these activities can only be performed when the required permissions are given to the accessing system.

Telnet can also check the open network ports on a remote system. A port is a communication endpoint that is used to connect an external device to the computer. It is a 16-bit unsigned integer number from 1 to 65535.

So if the user wants to check whether a specific port is open on the remote system, the user can use Telnet. The user has to execute a very simple command, i.e., 

TELNET SPACE (The IP address of the remote system) SPACE (The port that the user wants to check).

The user will get a blank screen if the port is open on the remote system. 

Telnet can also configure the network devices like routers, switches and more. Suppose the user wants to configure an IP address to a particular port on a router, then the user can pretty much do it with the help of Telnet. In the next section, we’ll discuss how Telnet works.

How does Telnet work?

The following diagram shows the essential operation of Telnet. 

Telnet Operations

It may look a bit complex, but it will be effortless to understand with the upcoming explanation. Everything here starts with the terminal. Whatever the input is given by the user or whatever the user provides the command, it will be through the terminal. The terminal driver captures all the keystrokes from the user and will forward them to the telnet client. Now the telnet client converts those characters into a universal language. The input is converted into the universal language for the ease of data transmission. 

Suppose the operating system used by the client may be Windows, and the operating system used by the server may be Linux. Still, irrespective of the operating system used, it should communicate. It should establish a proper connection so it is converted into a universal language. After the conversion, it will be forwarded to a TCP/IP stack. Telnet follows the TCP/IP protocol for communication. After that, it will be sent to the end system or the server. It is now coming to the Network Virtual Terminal or NVT.

NVT sets a standard for both systems to communicate. It ensures how the data is transferred, the format of data transmission, or the rate of transmission.

NVT controls everything, and at the end, it will be forwarded into the TCP/IP stack of the end system. After that, it will be passed to a telnet server. Telnet server performs a reverse operation of Telnet client. It converts the universal language information into a system understandable language.

Finally, information will be forwarded to a pseudo-terminal driver. Pseudo-terminal is a pseudo-device pair that provides a text terminal interface without an associated virtual console, computer terminal or serial port hardware.

 Pseudo-terminal driver invokes the application based on the user input. Suppose that if the user has requested to delete a file, it will be done through the pseudo-terminal driver.

So this is the basic operation of Telnet, and this is the work of Telnet. Since a coin has two sides, similar is the case for Telnet.
 

Must Read Subnetting in Computer Networks

Pros and Cons

Pros

Now, let's look into the advantages of Telnet. 

  1. Users can access any computer using Telnet. It is a lightweight tool and easy to use. 
  2. It is fast since there is no graphical user interface.
  3. It is bi-directional. It allows traffic in both directions from client to server and vice versa.
  4. Cross-platform. The user can use the Telnet in any operating system, whether Windows, Mac or Linux; it doesn't matter. 

Cons

Now, let's look into some of the disadvantages of Telnet.

  1. Telnet is not secure because the information transmitted between the client and the server will be in the form of clear types. Suppose if the user is trying to authenticate with the server, anybody can eavesdrop and get that information. So, it is not at all secure to use Telnet.
  2. It is old; still, we can use Telnet for some old systems that don't support the new protocols or modern protocols.
     

Let’s go through FAQs.

You can also read about mime protocol.

Must Read Stop and Wait Protocol.

Frequently Asked Questions

Why is Telnet not secure?

Telnet is not secure because the information transmitted between the client and the server will be in the form of clear types.

What is the Telnet command to access the remote system?

TELNET SPACE (The IP address of the remote system).

Can Telnet work on cross-platform?

Yes, Telnet can work on different platforms. For example -  Windows, Linux, Mac etc.

What is a Pseudo-Terminal driver?

Pseudo-terminal is a pseudo-device pair that provides a text terminal interface without associated virtual console, computer terminal or serial port hardware. 

What is NVT, and what is its' importance?

NVT is Network Virtual Terminal. NVT sets a standard for both systems to communicate. It sets the standard of data transmission.

Now, let’s summarize our learning.

Conclusion

In this article, we talked about Telnet. Firstly we got to know about the basics of Telnet. The need to access the remote system led to the discovery of Telnet. Then we understood why Telnet is important and how to use it. We learned the different commands of Telnet that performs different tasks. Since anything can not be all good, we discussed the disadvantages of Telnet too. In the end, we discussed the FAQs of Telnet. Telnet only looks complicated but is one of the easiest to deal with.

Recommended Readings:


Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, etc. on Coding Ninjas Studio.

Also check out some of the amazing Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Basics of C, Basics of Java, Computer Networks, etc. along with some Contests and Interview Experiences only on Coding Ninjas Studio

Live masterclass