Linux: Install the telnet command

I'm ABin-阿斌: write code for a lifetime, create a story for a lifetime, and build a youth at a glance. If you guys think it’s good, just click three times~

insert image description here

Statement: Original address: https://www.pudn.com/news/6332b44a272bb74d44053074.html

Other reference articles: https://www.cnblogs.com/diantong/p/9713204.html

foreword

  • Telnet is a common tool for our remote connection, it must be installed before using it

1. Install telnet

step 1, rpm -qa telnet-server (no output means telnet-server is not installed, then execute step2; otherwise execute step3)

step 2、yum -y install telnet-server(安装telnet-server)

step 3, rpm -qa telnet (no output means telnet is not installed, then execute step4, otherwise execute step5)

\[root@dev09 xinetd.d\]# rpm -qa telnet  
telnet-0.17-64.el7.x86_64

step 4, yum -y install telnet (installation)

2. Restart the xinetd daemon

Since the telnet service is also guarded by xinetd, after installing telnet-server, you need to restart the xinetd daemon process

step 5, service xinetd restart (skip directly to step7 if the startup is normal)

unit not found indicates that xinetd is not installed

step 6, yum -y install xinetd (install xinetd, and then continue to execute step5)

3. Test

Check whether port 23 of tcp is normally opened

step 7, netstat -tnl |grep 23 (if there is no output indicating that it has not started normally, then step8; otherwise, the entire installation process is completed)

As shown in the figure below, it means that the startup is normal:

Step 8. Modify the /etc/xinetd.d/telnet file, change disable=yes to disable=no, and re-execute step5

If there is no telnet file in the path /etc/xinetd.d/, construct a telnet file.

------------I am delimiter---------------------

The content of the telnet file is as follows:

# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
disable = yes
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID

}

--------------I am delimiter----------------------------

The default disable is yes, just modify it to no

Guess you like

Origin blog.csdn.net/Mango_Bin/article/details/128496040