How to enable telnet service in Linux?

To activate the telnet service in Linux, you can follow the steps below:

  1. Check if the telnet service is installed on the system by entering the following command in the terminal:
  2. Connect to the local machine using Telnet.
  3. If the system displays “Connection refused” or “command not found”, it means that the telnet service is not installed. You can use the following command to install it:
  4. For Debian-based systems (such as Ubuntu): use the command “sudo apt-get install telnetd” to install telnetd.
  5. For Red Hat systems (such as CentOS): use sudo yum install telnet-server.
  6. Start the telnet service by entering the following command in the terminal.
  7. For Debian-based systems (such as Ubuntu): restart the openbsd-inetd service using “sudo service openbsd-inetd restart”.
  8. For Red Hat-based systems (such as CentOS): Use the following command to start the telnet service: sudo systemctl start telnet.socket
  9. To ensure the telnet service starts automatically at system startup, input the following command in your terminal.
  10. For Debian-based systems (such as Ubuntu): use sudo to enable the openbsd-inetd service using update-rc.d.
  11. For Red Hat-based systems like CentOS, you can enable the Telnet socket by running the command: sudo systemctl enable telnet.socket
  12. Set up the firewall: If using a firewall, make sure that the relevant ports for the telnet service are open. The default telnet port is 23.

Currently, the telnet service has been enabled and can be used in the Linux system.

bannerAds