Telnet protocol tutorial| How does it work?
The telnet protocol enables users to connect to a remote machine’s terminal that may not be physically accessible. After networking protocols such as TCP/IP were standardized, a service could be run on a server, and a remote client could access it.
The HTTP protocol or another protocol may be used to access the resource over a network. However, what happens if an administrator wishes to modify the machine’s configuration, add a software package, restart the machine, or perform any other task that requires console access?
The telnet protocol establishes a connection to the remote machine from the initial stage or can do day-to-day administration activities remotely.
The telnet protocol is an application layer protocol developed on top of TCP/IP for remote administration. It was standardized in 1969 for a command-line-based interface with the remote machine.
How does telnet work?
Telnet is a client-server protocol. The user executes the telnet command with the IP address and port (optional, default 23) to start the connection from the client machine to the server.
The telnet command syntax is – telnet hostname port
.
After the TCP connection completes between the client and the server, the command prompts for a username and password to authenticate and log in.
After login, the user is presented with a bidirectional command-based interface. Each network command transmits control information and the actual command via the virtual terminal connection.
The Telnet process runs like a demon on the server side, reading messages, executing instructions, and returning the results to the client.
In order to terminate a session, the user types telnet at the command prompt.
How to Access/Enable Telnet Client on Windows 10?
A telnet client on Windows may not be enabled by default, e.g., on Windows 10. If so, you will see the following screen while trying to connect a remote host via telnet.
Following are the steps to turn on the telnet client on Windows.
- Go to start.
- Open the control panel.
- On the left side, click on Turn on Windows Features on or off.
- Select the Telnet Client by clicking the check box as shown above.
- After clicking OK, Windows takes a few seconds to apply the updated settings.
- When you try the telnet command again, you will see the following.
How to enable the telnet server on Linux ( e.g Centos) Operating System?
- Verify that the telnet RPM package is installed.
rpm -qa | grep telnet
- Install the package if it is not already installed.
yum install telnet-server telnet
- Start the Telnet service using
systemctl
.systemctl start telnet.socket
What are the security implications of Telnet?
Information exchanges in a telnet session are in plain text. This makes telnet vulnerable to security threats. For example, someone on the network can capture a username and password and later can misuse it. SSH has almost replaced telnet in the past few years to overcome this problem. The ssh service works similarly but uses the Secure Socket layer (SSL) protocol that encrypts all the commands between client and server.
How can you check/troubleshoot if Telnet does not function?
- Make sure that the firewall does not block the port for telnet.
- Use ICMP ping to check if the server is reachable from the client machine.
- There is a Telnet service running on the server.
- The firewall permits the use of the port and IP address used by the telnet client.