Many of you are not familiar with the configuration of the Telnet service. Here we will introduce in detail the configuration of the Telnet service. The specific configuration process is as follows: the common configuration of the Telnet service is as follows:
1. Configure the Telnet service port
The Telnet server listens to all client connections on port 23 by default. to make the system more secure, you can change the server listening port.
To edit the/etc/services file, run the following command:
[Root @ MyRedHat ~] # Vi/etc/services
Enter the editing mode and find the Telnetvi editing mode input/Telnet). The following content is found:
Telnet 23/tcp Telnet 23/udp
Change port 23 to another unused port number, for example, 4000), 1, save and exit vi, restart the xinetd service, and change the default port number for Telnet. after the default port number of Telnet is changed, use the following command to connect to the client: Telnet Server IP Address/Domain Name port number
Figure 1 configure the Telnet service port
2. Configure the maximum number of connections for the Telnet Service
By default, the Telnet service does not limit the number of terminals connected to the server at the same time. You can set the maximum number of connections of the Telnet Service as follows:
Edit the/etc/xinetd. d/Telnet file by running the following command:
[Root @ MyRedHat ~] # Vi/etc/xinetd. d/Telnet
Add the statement "instances = 5" in curly brackets "{}", indicating that the Telnet service can connect up to three terminals at the same time, as shown in figure 2. save and exit vi, restart the xinetd service, and change the maximum connections of the Telnet service.
3. Configure Telnet service restrictions
Telnet is a plaintext transmission password and data. If you are not satisfied with the default settings, You need to restrict the service scope.
Figure 2 configure the maximum connections of the Telnet Service