1. 安装xinetd和telnetd
1
sudo apt-get install xinetd telnetd
  1. /etc/inetd.conf在安装过程中已经配置好,修改/etc/xinetd.conf
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
defaults{

# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
## Please note that you need a log_type line to be able to use log_on_success
## and log_on_failure. The default is the following :## log_type = SYSLOG daemon info
# 
## start the insert content
#
# if I have time, I will add some comments about this part.
# instances =60#log_type = SYSLOG authpriv
# log_on_success = HOST PID
# log_on_failure = HOST
# tcps = 25 30
## end the insert content
  1. 添加/etc/xinet.d/telnet
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#service telnet
#{
#disable = no
#flags = REUSE
#socket_type = stream
#wait = no
#user = root
#server = /usr/sbin/in.telnetd
#log_on_failure += USERID
#}
  1. 重启xinetd服务
1
sudo /etc/init.d/xinetd restart
  1. 测试一下
1
telnet 127.0.0.1