1、安装telnet安全
一、检测xinetd是否安装session
telnet服务由xinetd守护,安装前先看看xinetd是否安装了.socket
[root@localhost ~]# rpm -qa xinetdtcp
若未安装输入yum install xinetd测试
二、安装telnet服务端rest
[root@localhost ~]#yum install telnet-server server
三、安装telnet客户端进程
[root@localhost ~]#yum install telnetip
2、配置telnetcmd
设置开机启动 [root@locahost ~]#chkconfig telnet on
修改配置文件 vi /etc/xinetd.d/telnet 将”disable= yes”改为” disable=no”
若是没有该文件则建立该文件,内容为:
# default: yes
# description: The telnet server servestelnet sessions; it uses \
# 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
}
为了安全须要,能够在该文件中配置链接本机的各类限制,如IP和开放时间
3、激活服务
从新启动守护进程: [root@locahost ~]#service xinetd restart
4、开放端口
查看23端口是否开启: [root@localhost ~]#netstat -tnl |grep 23
若是没有返回内容,多是防火墙没有开放23端口,
[root@localhost ~]# firewall-cmd --query-port=23/tcp
no
显示23端口没有开启使用下面命令开启23端口(若是提示找不到这个命令使用yum install firewalld安装)
[root@localhost ~]# firewall-cmd --zone=public --add-port23/tcp --permanent
success
从新加载
[root@localhost ~]# firewall-cmd --complete-reload
success
再次查询
[root@localhost ~]# firewall-cmd --query-port=23/tcp
yes
再次执行[root@localhost ~]#netstat -tnl |grep 23
若是尚未返回内容能够尝试一下重启.....
5、测试
telnet localhost