Thursday, April 30, 2009

Ubuntu 8.10下配置telnet服务

1. apt-get install xinetd telnetd
2. 安装成功后,系统会自动添加
telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd
到/etc/inetd.conf。如果没加进去需要手动添加一下。
3. vi /etc/xinetd.conf
添加红色部分:
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
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
}

includedir /etc/xinetd.d
4. vi /etc/xinetd.d/telnet
添加红色部分:
# default: on
# deion: The telnet server serves telnet sessions; it uses \
# 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
}
5. /etc/init.d/xinetd restart
接下来就可以使用telnet远程登录了。
更详细的设置可参考http://www.cnblogs.com/Huntercat/archive/2008/06/23/1228222.html

No comments:

Post a Comment