TELNET (Teletype Network) is the service that allows you to access another computer by logging in to the remote system, such that, you can pass commands to another system by sitting back at your place. It allows you to send the instructions to a remote client, but in a plain-text format. Telnet listens to all the requests by the user usually on TCP port 23, but you can change it accordingly.
Telnet is one of the oldest communication protocol to perform this activity, later on with the advancement of technology “SSH” came into existence, which is a secure method as it sends all the data in an encrypted format. SSH is used by the professionals in the public network where they can’t take a chance to expose their credentials to everyone. But with this, it doesn’t mean that Telnet is vanished. There are many situations where people use Telnet specifically for testing and debugging, in a local or private network.
Through this tutorial, you will learn the steps to install and use TELNET in Ubuntu. Each step is explained along with the images so that you may realize how to practically implement it.
Steps to Install and Use Telnet in Ubuntu
Step 1: Firstly, open the “Terminal” window by pressing “Ctrl + Alt + T”. In the figure, you may see “$” that signifies that you are not logged in as a root user.
So, I”ll write “sudo apt-get install telnetd” and press enter. If you are a root user, then you don’t need to write sudo in Ubuntu. “telnetd” is a daemon that gets invoked by “inetd” or its extension “xinetd”, both are the internet servers.
Step 2: Then you are asked to enter the user password and then press enter. Processing will start as soon as you press enter. After this, I have noticed a line “274 KB additional disk space will be used” on the terminal screen.
You may also observe some sort of a message like this and then you”ll be asked to continue or not. Just write “y” and then press enter to continue.
Step 3: Now when you are done with it, restart “inetd”. Type “sudo /etc/init.d/open-bsd-inetd restart”.
“inetd” is daemon used for dealing with incoming network and it is responsible for deciding which program to run when a request comes.
Step 4: To ensure “inetd” is started, press enter after writing the above command.
To connect with any remote client:
Step 5: Just type:“telnet hostipaddress”. For an example: “telnet 18.104.22.168” and press enter.
Step 6: Then you”ll see, it is connected to “host ip address”. For security reasons, you are required to provide “username” and “password” as well.
NOTE: In order to access Ubuntu/ Windows client using Telnet you must have to install open source terminal emulators such as Putty, Tera Term, etc. depending upon the OS you are using. To know how to use Putty on Windows 7 to access Ubuntu, check out the post to connect to remote computer.