RHEL6 telnet服务设置

2011-05-12 21:12:44

技术资料 Linux

检查是否安装telnet服务: rpm -qa | grep telnet

修改配置文件:/etc/xinetd.d/telnet

# default: on
# description: The telnet server serves telnet 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
}

配置防火墙允许连接23端口,修改配置文件:etc/sysconfig/iptables,加入以下语句:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT

重启防火墙服务:service iptables restart