How can the telnet port be changed in Linux?

To change the telnet port, you need to edit the configuration file of the telnet server. Here are the steps to modify the telnet port on a Linux system:

  1. Open the terminal and log in to the system as a root user.
  2. the configuration file for the inet super server
  3. The telnet configuration file located in the directory /etc/xinetd.d.
sudo vim /etc/inetd.conf
  1. Connect to a remote server using the Telnet protocol.
  2. telnet daemon
telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  in.telnetd
  1. connect to a remote computer via telnet
  2. A program that provides the telnet service.
  3. Esc (pronounced eh-sk)
  4. Save and exit
  5. Restart the telnet server. Depending on your Linux distribution, use one of the following commands to restart the telnet server:
sudo service telnet restart
sudo systemctl restart telnet
sudo /etc/init.d/inetd restart
  1. Please verify if the port has been successfully changed. You can use the telnet command to test the new telnet port. For example, use the following command to connect to the new telnet port:
telnet localhost <新端口号>

Please be aware that telnet is an insecure remote access protocol as it transmits data in plain text. To enhance system security, it is recommended to use more secure remote access protocols, such as SSH.

Leave a Reply 0

Your email address will not be published. Required fields are marked *