BEEN
life‘s short
日历
二月 | ||||||
---|---|---|---|---|---|---|
日 | 一 | 二 | 三 | 四 | 五 | 六 |
28 | 29 | 30 | 31 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 1 | 2 |
最新评论
最新留言
链接
can't disable telnet please help~~
参考资料
ubuntu系统在默认情况下是没有启动telent服务的,需要自行配置
1.安装启动基础服务
sudo apt-get install xinetd
2.配置基础文件,在/etc/xinet.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
}
3.安装telent客户端
sudo apt-get install telnet
4.配置telent文件,nano /etc/xinetd.d/telnet,在此目录下没有telent文件的自己touch
# default: on
# description: 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
}
更高安全要求配置
only_from = 192.168.120.0/24 #Only users in 192.168.120.0 can access to
only_from = .bob.com #allow access from bob.com
no_access = 192.168.120.{101,105} #not allow access from the two IP.
access_times = 8:00-9:00 20:00-21:00 #allow access in the two times
5.重启xinet服务
sudo /etc/init.d/xinetd restart
6.关闭telent服务,网上的教程是这样做的,但是我却不成功,求搭救~~
把/etc/xinetd.d/telnet 文件的 disable=no 改为yes
重启xinetd服务 sudo /etc/init.d/xinetd restart
> ps:重启xinetd服务 service xinetd restart 也可以,不过我的ubuntu不知道为什么,用tab能调出xinetd但是执行命令却是
stop: Unknown job: xinetd
start: Unknown job: xinetd
>ps 网上的重启xinetd服务是 sudo /etc/rc.d/init.d/xinetd restart 但是我/etc下没有rc.d 不过有rc0~6.d,不知道这个有没有关系呢