Telnet protocol | How it works?
If I define it in a single line, the telnet protocol was developed to access the terminal of a remote machine, that is not reachable physically. After the standardization of networking protocol such as TCP/IP, a serving can run on a server and a client can request a resource.
A resource could be via HTTP protocol or other. But what if an administrator wants to modify any configuration, need to add a software package, restart the machine or want to perform any other activities?
The telnet protocol is an application layer protocol that was developed on top of TCP/IP for remote administration. It was standardized in 1969 for a command-line based interface with the remote machine. It could be used for setting up a remote machine from the initial stage or can do day to day administration activities from the remote.
How does telnet work?
The Telenet works on a client-server model. On the client machine, a user types the telnet command with an IP address and a port (optional, default 23) with syntax telnet hostname port.
If a server is running, and the TCP connection is established between client and server. The client is prompted for a username and password for authentication.
Once authentication is done, the user will have a bidirectional command-based interface. Each command over the network sends the control information and actual command using the virtual terminal connection.
Telnet on the server-side runs as a demon, read the message and execute the commands and returns the outcomes to the user.
To end a session and log off, the user types Telnet on the command prompt.
How to Access/Enable Telnet client on Windows 10?
By default, a telnet client on windows may not be enabled e.g on Windows 10. If so, you will see the following screen when tying the telnet and enter.
To enable ->
- 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.
- After clicking on OK, windows takes few seconds to apply the new settings.
- Once done you will see the following on trying the telnet command again.
How to configure telnet server on the Linux Centos?
- Check if packages are installed.
rpm -qa | grep telnet
- Install the packages
yum install telnet-server telnet
- Start telnet service
systemctl start telnet.socket
Telnet and user data protection?
Information exchanges in a telnet session are in plain text. This makes telnet vulnerable to the security threat. For example, someone on the network can capture a username and password and later can misuse it. To overcome the issue, in the few past years telnet is almost replaced by the SSH. An ssh service works in a similar way, but using the Secure Socket layer (SSL) protocol it encrypts all the information between client and server.
What to check/troubleshoot if telnet does not work?
- Check if the firewall is blocking the port for telnet.
- Telnet service is running on the server.
- Port used in telnet is configured on the server too.
- Use ICMP ping to check if the server is reachable?