linux安装xinetd,CentOS-Minimal版本下安装telnet服务和xinetd服务

默认在CentOS-Minimal版本下没有安装telnet和xinetd服务。

1、安装telnet

[root@localhost ~]# rpm -qa | grep telnet  --检查是否安装telnet,没有文件表示未安装

[root@localhost ~]# yum -y install telnet  --安装telnet客户端,出现“Complete!”表示安装完成

[root@localhost ~]# yum -y install telnet-server  --安装telnet服务端,出现“Complete!”表示安装完成

2、安装xinetd

[root@localhost ~]# rpm -qa | grep xinetd  --检查是否安装xinetd,没有文件表示未安装

[root@localhost ~]# yum -y install xinetd  --安装xinetd,出现“Complete!”表示安装完成

3、在xinetd服务中开启telnet服务

[root@localhost ~]# vi /etc/xinetd.d/telnet  --编辑

# default: yes

# description: The telnet server servestelnet sessions

# unencrypted username/password pairs for authentication

service telnet

{

flags = REUSE

socket_type = stream

wait = no

user = root

server =/usr/sbin/in.telnetd

log_on_failure += USERID

disable = no

}

4、启动xinetd服务

[root@localhost ~]# systemctl restart xinetd.service  --启动服务

[root@localhost ~]# ps -ef | grep xinetd  --查看启动

5、设置开机启动xinetd

[root@localhost ~]# chkconfig --level 35 xinetd on

Note: Forwarding request to 'systemctl enable xinetd.service'.

[root@localhost ~]# systemctl enable xinetd.service

[root@localhost ~]# chkconfig --list  --查看

6、测试telnet

[root@localhost ~]# telnet 127.0.0.1

telnet下root登录,密码正确,总提示:Login incorrect

[root@localhost ~]# vi /etc/pam.d/remote

注释/etc/pam.d/remote的第一行,即:auth required pam_securetty.so

关闭防火墙

[root@localhost ~]# systemctl status firewalld.service --再查看防火墙状

[root@localhost ~]# systemctl stop firewalld.service --关闭防火墙

[root@localhost ~]# systemctl disable firewalld.service --永久关闭防火墙

0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值