Tutorials

▷ How to configure telnet server in ubuntu or any linux system

Table of contents:

Anonim

In this new step by step we are going to configure Telnet server in Ubuntu, although it will also be perfectly applicable to most Linux machines. Thanks to remote connections, the work of system administrators has been greatly facilitated, since this way they can manage servers without having to be physically in the place where they are. But this is not only restricted to professional use, we ourselves can do the same from our own computers or virtual machines on our home network. In this way we can connect from a client computer to manage the configuration of a Web server, for example.

Index of contents

Currently, Telnet is not a remote communication protocol used too much for this type of solution, especially in Linux environments, since much more secure communication protocols such as SSH have appeared. These allow us to establish encrypted connections, much more secure to computer attacks such as spyware than Telnet.

But, in any case, it could be interesting to use this Telnet to carry out an interconnection between computers in a simple and fast way in internal LAN networks which are protected from external action. Except Windows 10, the rest of operating systems such as Windows Server, 7 or even Linux have tools for creating Telnet servers. This is why, from the point of view of Closed networks, the use of this service is very useful.

Preliminary operations

We recommend carrying out a series of operations before setting up the server. As we can deduce, we must ensure that the connection between the two teams is possible. If two computers are not seen in a network, Telnet will be of little use. In addition to this, we will avoid possible connection errors that we later do not identify.

To do this it is as simple as using the ifconfig command on our Ubuntu machine to find out the IP address of the computer. then we will ping between machines to verify the connection.

Know IP address and / or computer name

To check the IP address in Ubuntu we will have to open a terminal, if it has a graphical interface. We can do it quickly with the key combination " Ctrl + Atl + T ". So, we write:

ifconfig

If we do not have it installed, we must write the following:

sudo apt-get install net-tools

Once written, we must look for the " inet " line, which will show us what our local IP address is.

To know the name of the team in Ubuntu is extremely easy, when we are in a command terminal we must look at the promt. This will display the user followed by the "@" symbol and the name of the computer.

Check connection

Now that we know IP addresses or a computer name, let's test if the computers are visible. For this we open a command terminal on the computer that is going to be a client and write:

ping

We see that all are correctly connected and in communication.

Configure Telnet server in Ubuntu

Natively, Ubuntu does not have the Telnet package installed, but we will be able to locate it in the repositories. To do this, we must first install a toolkit that will activate daemons from services such as Telnet.

So, the first thing we will have to do is open a command terminal and install the inetd tools. For this we use the following command:

From now on, we could log in as root in Linux for convenience

sudo apt-get isntall openbsd-inetd

We wait for the process to finish to install the Telnet daemon again:

sudo apt-get install Telnetd

Verify inetd file settings

This step will only be necessary to verify that the inetd settings are correct for the Telnet server to function properly. To access the configuration file we will write the following:

sudo gedit /etc/inetd.conf

In this file, we will have to verify that the line corresponding to Telnet does not have the “#” symbol in front of it. If this were the case, we have to delete it so that the line is taken into account by the inetd tool

To finish, we only save the file again if we have touched something. In which case we will also have to restart the inetd daemon, for this we write:

sudo /etc/init.d/openbsd-inetd restart

Verify that the Telnet service is listening

To verify that the Telnet service is listening on the Ubuntu machine, we will have to type the following command:

netstat -ltp

We will be able to identify that Telnet is indeed active and listening. We could also put it in the following way:

netstat -ltpn

In this way we can see, in addition to the service, through which port it is listening. We see that it is the port corresponding to Telnet, 23. This will be useful to keep in mind if we want to open the router port to receive remote connections.

Access from a Telnet client

Now we only have to go to the Telnet client and write the following command in the CMD or PowerShell or Linux terminal window:

Telnet

In our case, " Telnet profesional-virtual-machine " or " Telnet 192.168.2.106 ". In this way, the user and password will be requested. In “ login ” we put the Ubuntu username and in “ Password ” we put the password

In this way we will have accessed the Telnet server configured in Ubuntu.

If we want to end the session we will only have to write in the promt "exit" and we will leave the remote machine.

If we wanted to do it remotely from outside our network, we would have to open port 23 of the router. Although for external remote connections we recommend using SSH and not Telnet, for greater security.

As we can see, configuring Telnet server in Ubuntu is quite simple, and it is also applicable to practically any Linux machine.

We also recommend:

For what purpose would you use your Telnet in Ubuntu or another system? If you have had any problem or question or point, leave it in the comments.

Tutorials

Editor's choice

Back to top button