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


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

1、安装telnet

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

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

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

2、安装xinetd

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

[root@localhost ~]#yum-yinstallxinetd --安装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 ~]#systemctlrestart xinetd.service --启动服务

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

5、设置开机启动xinetd

[root@localhost ~]#chkconfig--level35xinetdon

Note:Forwardingrequestto'systemctlenablexinetd.service'.

[root@localhost ~]#systemctlenablexinetd.service

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

6、测试telnet

[root@localhost ~]# telnet127.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 --永久关闭防火墙

优质内容筛选与推荐>>
1、刚刚,李彦宏、丁磊纷纷表态,国内股市或迎来巨变!
2、ORA-27090故障一例
3、LOJ#6283.数列分块入门7
4、MyEclipse的优化技巧学习
5、NIPS2018|行人重识别告别辅助姿势信息,商汤、中科大提出姿势无关的特征提取GAN


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号