telnet-server、telnet

1、查询yum仓库中的安装包

[root@localhost /]# yum list |grep telnet
telnet.x86_64                              1:0.17-48.el6                 @base 
telnet-server.x86_64                       1:0.17-48.el6                 @base 
[root@localhost /]#

2、安装telnet和telnet-server

yum -y install telnet

yum -y install telnet-server  //安装telnet-server的同时,会安装其依赖的xinetd

3、查询确认安装完成

[root@localhost /]# rpm -qa |grep telnet
telnet-0.17-48.el6.x86_64
telnet-server-0.17-48.el6.x86_64
[root@localhost /]# rpm -qa |grep xinetd
xinetd-2.3.14-40.el6.x86_64
[root@localhost /]#

4、修改vi /etc/xinetd.d/telnet文件中disable的值为no,保存

5、启动xinetd服务

[root@localhost /]# service xinetd start
正在启动 xinetd:[确定]
[root@localhost /]#

6、防火墙添加规则如下:

iptables -I INPUT -p tcp --dport 23 -j ACCEPT   //向INPUT链插入一条目的tcp端口为23的报文接受的规则
service iptables save       //保存
service iptables restart    //重启防火墙

7、添加telnet访问账号(使用root账号不能telnet的情况下)

[root@localhost /]# useradd zfp1
[root@localhost /]# passwd zfp1
更改用户 zfp1 的密码 。
新的 密码:
无效的密码: 过于简单化/系统化
无效的密码: 过于简单
重新输入新的 密码:
passwd: 所有的身份验证令牌已经成功更新。
[root@localhost /]#

8、开机启动

[root@localhost /]# chkconfig xinetd on

9、测试OK。

 

posted @ 2018-12-03 17:11  fangpinz  阅读(1545)  评论(0编辑  收藏  举报