1、安装xinetd以及telnetd
#apt-getinstallxinetdtelnetd
2、配置文件/etc/inetd.conf
#cat/etc/inetd.conf(如果存在就不需要了)
telnetstreamtcpnowaittelnetd/usr/sbin/tcpd/usr/sbin/in.telnetd
3.修改/etc/xinetd.conf
#catxinetd.conf
#Simpleconfigurationfileforxinetd
#
#Somedefaults,andinclude/etc/xinetd.d/
defaults
{
#Pleasenotethatyouneedalog_typelinetobeabletouselog_on_success
#andlog_on_failure.Thedefaultisthefollowing:
#log_type=SYSLOGdaemoninfo
instances=60
log_type=SYSLOGauthpriv
log_on_success=HOSTPID
log_on_failure=HOST
cps=2530
}
includedir/etc/xinetd.d
4.在/etc/xinetd.d/telnet并加入以下内容:
#default:on
#description:Thetelnetserverservestelnetsessions;ituses\
#unencryptedusername/passwordpairsforauthentication.
servicetelnet
{
disable=no
flags=REUSE
socket_type=stream
wait=no
user=root
server=/usr/sbin/in.telnetd
log_on_failure =USERID
}
5.重启机器或重启网络服务
#/etc/init.d/xinetdrestart
下载本文示例代码
阅读(185) | 评论(0) | 转发(0) |