Telnet protocol tutorial| How does it work?
The telnet protocol was created to allow users to connect to the terminal of a remote machine that is not physically accessible. After networking protocols such as TCP/IP were standardized, a service could be run on a server and a remote client could request a resource from the server.
The HTTP protocol or another protocol may be used to access the resource. However, what happens if an administrator wishes to modify the machine’s configuration, add a software package, restart the machine, or need to perform any other task that requires console access?
The telnet protocol is used to establish a connection to the remote machine from the initial stage or can do day-to-day administration activities from the remote.
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.
How does telnet work?
Telnet is a client-server protocol. On the client machine, the user enters the telnet command with the IP address and port (optional, default 23) to start the connection.
The telnet command syntax is –
telnet hostname port.
After setting up a TCP connection between the client and the server. The client asks for a username and password to 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.
On the server side, the Telnet process runs like a demon, reading messages, executing instructions, and returning the results to the client.
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 hitting an enter key.
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 a few seconds to apply the new settings.
- Once done you will see the following on trying the telnet command again.
How to configure the 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 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?