How to install & configure telnet networking services in Linux.

In Linux, the telnet is used to create a remote connection with a system over a TCP/IP network. It allows to communicate other systems by the terminal.Telnet is a client-server protocol that can be used to open a command line on a remote computer.

Telnet is mostly used by program developers and anyone who has a need to use access data & applications or files located at a remote machine.

Install Telnet on Linux.
Update the system
apt-get update

Install the telnet.

apt-get install telnetd

Start the telnet service.

systemctl start inetd

Check telnet status.

systemctl status inetd

Here is the command output.

● inetd.service - Internet superserver
     Loaded: loaded (/lib/systemd/system/inetd.service; enabled; vendor preset: enabled)
     Active: active (running); 32s ago
       Docs: man:inetd(8)
   Main PID: 202192 (inetd)
      Tasks: 1 (limit: 18859)
     Memory: 1.0M
     CGroup: /system.slice/inetd.service
             └─202192 /usr/sbin/inetd

 systemd[1]: Starting Internet superserver...
 systemd[1]: Started Internet superserver.

Open port number 23 in firewall.

ufw allow 23/tcp  

Here is the command output.

Rules updated
Rules updated (v6)

Reload the firewall.

ufw reload  

Test Telnet shell.Run the telnet command.

telnet

Here is the command output.

telnet> 

Test localhost using telnet.Run the following command.

telnet localhost

Provide localhost name & password.

Here is the command output.

 telnet localhost  
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Ubuntu 20.04.2 LTS
system-name login: host-name
Password: password

Logout remote user and close the connection.

logout

Here is the command output.

Connection closed by foreign host.

Telnet Connection from Remote System.Provide username & password.

telnet ip-address

Check Open Ports using telnet.

telnet ip-address port-number

If port number is open,we should see the following output:

Trying ip-address...
Connected to ip-address.
Escape character is '^]'.

If port 80 is blocked or the Telnet service is not running.

Trying ip-address...
telnet: Unable to connect to remote host: Connection refused

 

 

Leave a Reply

Your email address will not be published.