WED MAY 20,2009
2009-05-20 16:45
190 查看
今天第一次使用 UBUNTU下的TELNET,打开终端,输入telnet 主机IP 后,提示Connection refused。后天在BAIDU中看到这样一篇文章:
首先安装xinetd(它是inetd替代品):
sudo apt-get install xinetd
再安装telnetd,在Ubuntu中没有telnetd这个软件包,它是包含在inetutils-telnetd软件包中:
sudo apt-get install inetutils-telnetd
在/etc/xinetd.d目录下新建文件,名称为telnet,内容为:
# default: off
# description: Telnet service which is the interface of remote access.
# This is the tcp version.I omited the UDP's.
service telnet
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/telnetd
disable = no
}
重新启动xinetd:
sudo /etc/init.d/xinetd restart
在终端查看telnet服务有没有打开:
netstat -ta | grep telnet
输出可能如下:
tcp 0 0 *:telnet *:* LISTEN
说明telnet已启动.
现在先在本地测试一下,如图:
再在Windows平台下测试一下,如图:
若只允许在局域网内的机器访问,则可在/etc/hosts.allow文件中添加所在局域网的IP段地址或网络组:
# /etc/hosts.allow: list of hosts that are allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: LOCAL @some_netgroup
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#
照着操作,果然可以了,哈哈
参考网站:http://hi.baidu.com/chenfeng2006/blog/item/cacac65887da9786800a18d1.html
首先安装xinetd(它是inetd替代品):
sudo apt-get install xinetd
再安装telnetd,在Ubuntu中没有telnetd这个软件包,它是包含在inetutils-telnetd软件包中:
sudo apt-get install inetutils-telnetd
在/etc/xinetd.d目录下新建文件,名称为telnet,内容为:
# default: off
# description: Telnet service which is the interface of remote access.
# This is the tcp version.I omited the UDP's.
service telnet
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/telnetd
disable = no
}
重新启动xinetd:
sudo /etc/init.d/xinetd restart
在终端查看telnet服务有没有打开:
netstat -ta | grep telnet
输出可能如下:
tcp 0 0 *:telnet *:* LISTEN
说明telnet已启动.
现在先在本地测试一下,如图:
再在Windows平台下测试一下,如图:
若只允许在局域网内的机器访问,则可在/etc/hosts.allow文件中添加所在局域网的IP段地址或网络组:
# /etc/hosts.allow: list of hosts that are allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: LOCAL @some_netgroup
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#
照着操作,果然可以了,哈哈
参考网站:http://hi.baidu.com/chenfeng2006/blog/item/cacac65887da9786800a18d1.html
相关文章推荐
- 每日英语-7/20/2009
- NetBeans 时事通讯(刊号 # 81 - Nov 20, 2009)
- 2009/3/20 - 4/10 股票虚拟操作总结与分析
- NetBeans 时事通讯(刊号 # 81 - Nov 20, 2009)
- 2009,11,20笔记
- 每日英语-8/20/2009
- 2009-9-20
- NetBeans 时事通讯(刊号 # 81 - Nov 20, 2009)
- Linux kernel 2.6.18-20 2009 local root exploit
- NetBeans 时事通讯(刊号 # 42 - Jan 20, 2009)
- 上周总结 (2009-11-20)
- NetBeans 时事通讯(刊号 # 81 - Nov 20, 2009)
- NetBeans 时事通讯(刊号 # 42 - Jan 20, 2009)
- 2009-03-20 VB定义事件
- Interesting Finds: 2009 03.20~03.22
- 11/20/2009其一
- NetBeans 时事通讯(刊号 # 42 - Jan 20, 2009)
- 11/20/2009其二
- NetBeans 时事通讯(刊号 # 42 - Jan 20, 2009)
- 读书摘要--《C++.GUI.Programming.with.Qt.4》chapter18~20