一、安装Telnet Server
1)下载xinetd_2.3.15-1ubuntu2_amd64.deb、telnetd_0.17-36build2_amd64.deb
2)安装Telnet
sudo dpkg –i telnetd_0.17-36build2_amd64.deb
sudo dpkg –i telnetd_0.17-36build2_amd64.deb
如果连网时,可以通过sudo apt-get install telnetd
3)设置ip
终端中输入:sudo ifconfig eth0 192.168.0.120 netmask 255.255.255.0
4)修改/etc/xinetd.conf配置文件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
# 红色表示插入的部分
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
5)修改/etc/xinetd.d/telnet配置文件
加入如下内容:
# default: on
# description: The telnet server serves telnet sessions; it users \
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure +=USERID
}
6) 重启网络服务
sudo /etc/init.d/xinetd restart
sudo service xinetd restart
至此telnet服务配置完成
二、测试
Win7客户端必须启动Telnet客户端服务,然后在命令行输入telnet后,提示输入用户名和密码即为配置成功