Centos7 安装Telnet服务与启动

环境:centos7.7   IP:10.9.96.212

[root@study ~]# cat /etc/redhat-release 
CentOS Linux release 7.7.1908 (Core)
[root@study ~]# 

1.在安装Telnet前先检查系统是否安装了telnet-server和xinetd

[root@study ~]# rpm -qa telnet

[root@study ~]# rpm -qa telnet-server

[root@study ~]# rpm -qa xinetd

2.安装Telnet

[root@study ~]# yum -y install telnet
[root@study ~]# yum -y install telnet-server
[root@study ~]# yum -y install xinetd

3.安装完成后,将xinetd服务、telnet服务加入开机自启动

[root@study ~]#systemctl enable telnet.socket
[root@study ~]#systemctl start xinetd

   telnet服务默认是不开启的,修改文件/etc/xinetd.conf来开启服务 ,把enabled 注释去掉,=号后面加yes

[root@study etc]# vim xinetd.conf 

#
# This is the master xinetd configuration file. Settings in the
# default section will be inherited by all service configurations
# unless explicitly overridden in the service configuration. See
# xinetd.conf in the man pages for a more detailed explanation of
# these attributes.

defaults
{
# The next two items are intended to be a quick access place to
# temporarily enable or disable services.
#
        enabled         =yes
#       disabled        =

# Define general logging characteristics.
        log_type        = SYSLOG daemon info
        log_on_failure  = HOST
        log_on_success  = PID HOST DURATION EXIT

# Define access restriction defaults
#
#       no_access       =
#       only_from       =
#       max_load        = 0
        cps             = 50 10
        instances       = 50
        per_source      = 10

# Address and networking defaults
#

4.检查服务开启状态 

[root@study ~]# systemctl status telnet.socket 
● telnet.socket - Telnet Server Activation Socket
   Loaded: loaded (/usr/lib/systemd/system/telnet.socket; enabled; vendor preset: disabled)
   Active: active (listening) since 三 2019-09-18 21:31:27 CST; 13h ago
     Docs: man:telnetd(8)
   Listen: [::]:23 (Stream)
 Accepted: 0; Connected: 0

9月 18 21:31:27 study.centos systemd[1]: Listening on Telnet Server Activation Socket.

[root@study ~]# systemctl status xinetd
● xinetd.service - Xinetd A Powerful Replacement For Inetd
   Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled; vendor preset: enabled)
   Active: active (running) since 三 2019-09-18 21:31:36 CST; 13h ago
 Main PID: 1085 (xinetd)
   CGroup: /system.slice/xinetd.service
           └─1085 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid

9月 18 21:31:37 study.centos xinetd[1085]: removing daytime
9月 18 21:31:37 study.centos xinetd[1085]: removing discard
9月 18 21:31:37 study.centos xinetd[1085]: removing discard
9月 18 21:31:37 study.centos xinetd[1085]: removing echo
9月 18 21:31:37 study.centos xinetd[1085]: removing echo
9月 18 21:31:37 study.centos xinetd[1085]: removing tcpmux
9月 18 21:31:37 study.centos xinetd[1085]: removing time
9月 18 21:31:37 study.centos xinetd[1085]: removing time
9月 18 21:31:37 study.centos xinetd[1085]: xinetd Version 2.3.15 started with libwrap loadavg labeled-networking options compiled in.
9月 18 21:31:37 study.centos xinetd[1085]: Started working: 0 available services
[root@study ~]# 

5.关闭防火墙

[root@study ~]#systemctl stop firewalld.service    //停止firewall
[root@study ~]#systemctl disable firewalld.service //禁止firewall开机启动

6.测试

[I:\~]$ telnet 10.9.96.212


Connecting to 10.9.96.212:23...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Kernel 3.10.0-1062.1.1.el7.x86_64 on an x86_64
study login: root
Password: 
Last login: Thu Sep 19 10:50:49 from 10.9.96.224
[root@study ~]# 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

苹果macOS引导镜像

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值