Project three configuration and application remote link service

Task 1: Configure Telnet Service

 mount the disc

  Insert the CD into the CD-ROM drive, and then use the [mount /dev/cdrom /mnt] command to mount the CD to the system.

 Configure YUM source

YUM installation solves the software dependency problem, so the general software installation adopts YUM installation, but the YUM source must be configured before installation.

[cd /etc/yum.repos.d/] Enter the YUM configuration directory as follows.

[mkdir /etc/yum.repos.d/bak] Create a backup folder.

[mv /etc/yum.repos.d/Cent* /etc/yum.repos.d//bak/] Move the original configuration file to the backup folder.

[vim /etc/yum.repos.d/local.repo] Edit your own repo file


Install client and server software

Use the following command to check whether the software is installed first. If it is not installed, use the [yum] command to install it.

[rpm -q Telnet] Query the client software of Telnent.


[rpm q Telnet-server] Query the server software of Telnet. If the installation information of Telnet related software is not queried, you need to use the following commands to install it.

[yum install -y telnet] Install the client software of Telnet.

[yum install -y telnet-server] Install Telnet server software.

After the installation is complete, query again, you can see the relevant software information of Telnet




Modify the main configuration file

Use the [vim /etc/xinetd.d/telnet] command to edit the Telnet configuration file, find the line where disable=yes is located, change it to disable=no, and enable the Telnet function.

(1) Set the maximum number of connections. Add a line after disable=no: instances=4, which means that only 4 users are allowed to connect at the same time, as shown in the following figure:


(2) Enable Telnet service on the server.

[/ect/init.d/xinetdrestart] or [service xineted restart] to restart the Telnet service.

[chkconfigxinetd on] Set the Telnet service to run in the system.



(3) Modify the connection port

[vim /etc/services] Modify the default port number of the server to improve the service, and change the port number in telnet 23/tcp and telnet 23/udp to a custom port number, as shown in the figure:


Use the [/etc/init.d/xinetd restart] command to restart the Telnet service on the server.


Step 5: Allow root user login

Because Telnet transmits data in a civilized way, including user names and passwords, data is easily intercepted and tampered with during the transmission process. Therefore, the system default root user cannot Telnet to the remote server, but only allows ordinary users Telnet to the remote server.

If you need the root user to be able to remotely Telnet to the server, you need to use the [mv /etc/securetty /etc/securetty.bak] command to annotate the /etc/securetty file to make it invalid. Then remotely Telnet to the host as root user.

Log in from a third-party client





Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324602523&siteId=291194637