LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: flyhu

!!求教:turbolinux7.0如何开启telnet,ftp服务,默认是不开启的!!

[复制链接]
发表于 2003-3-1 18:24:33 | 显示全部楼层

Re: 可以telnet localhost

最初由 ralf 发布
Amiong老大,你终于来了!
workstation的完全安装应该有telnet包了。/etc/xinetd.d/telnet已经将disable = yes改成disable = no了。我使用nmap扫描自己的端口发现有telnet的23端口开放。/usr/sbin/in.telnetd已经存在。可是我还是不能解决问题!每次都是那个可恶的:
Trying xxx.xx.xx.xx(自己的ip)...
Connected to xxx.xx.xx.xx.
Escape character is '^]'.
Connection closed by foreign host.
我快要绝望了!help!!!


其实telnet是很危险的服务,还是用SSH吧!

检查防火前:ipchains、iptables,用ps -A检查一下看看是否他们在运行。
如果是的话,killall ipchains(或者iptables),在telnet localhost试试。
发表于 2003-3-1 18:36:10 | 显示全部楼层

ssh?

windows可以使用ssh?
以下是两个配置文件,我怀疑它们有问题!

/etc/hosts.deny:

#
# hosts.deny This file describes the names of the hosts which are
#  *not* allowed to use the local INET services, as decided
#  by the '/usr/sbin/tcpd' server.
#
# See man hosts_access(5) for more information.

ALL: ALL


还有一个是/etc/hosts.allow

#
# hosts.allow   This file describes the names of the hosts which are
#               allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
# See man hosts_access(5) for details.
#
# The settings in /etc/hosts.allow take precedence over the those in
# /etc/hosts.deny.
#
# Note:  The tcp_wrappers (configured by /etc/hosts.allow and /etc/hosts.deny)
#        only affect services that are called via /usr/sbin/tcpd. Check out
#        /etc/inetd.conf to find out if a service started by inetd goes through
#        tcp_wrappers.
#        Some services are not started via inetd and still use
#        tcp_wrappers (e.g. sshd, portmap (NFS) -- see below for sample setups).
#
#        Examples of services which usually run as stand alone servers and
#        don't make use of tcp_wrappers are Apache and Sendmail.
#
# Note2: Security scanners like nmap(1) will report blocked services as being
#        open, because an initial connection is always established and only
#        dropped later, if the connection is not approved by the tcp_wrappers
#        configuration.

################################################################################
# Local host
# Allow all requests from localhost

ALL : 127.0.0.1

################################################################################
# Telnet

# Allow telnet logins from sample.foobar.edu
# Warning: telnet is inherently insecure as a protocol. All network traffic,
# including authentication information (login and password) are transmitted
# as clear text. Use secure alternatives (e.g. ssh).

#in.telnetd: sample.foobar.edu
All : All

################################################################################
# ProFTP (standard TurboLinux ftp server)

# Allow proftpd (TurboLinux default ftp daemon) logins from sample.foobar.edu
# Warning: the authentication information for ftp goes as clear text over
# the net. This is especially dangerous if the same login/password combination
# can be used for any shell logins (telnet, ssh). Make sure remote ftp users
# don't have a shell login.

#in.proftpd: sample.foobar.edu


################################################################################
# Portmap (required for an NFS server)

# Allow connects to portmap from sample.foobar.edu. This is required if you
# want to provide NFS services.

#portmap: sample.foobar.edu

################################################################################
# ssh
# Allow connets to sshd from sample.foobar.edu.

#sshd: sample.foobar.edu

################################################################################
# Allow all requests from hosts in .foobar.edu with one exception (notice the
# leading dot)

#ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
sshd : ALL
发表于 2003-3-1 18:40:44 | 显示全部楼层
这两个文件很正常,和我的是一样的。
Windows可以使用SSH的客户端。
发表于 2003-3-1 18:50:42 | 显示全部楼层

没有防火墙

奇怪,就是不行。正在运行的进程如下:
PID TTY          TIME CMD
    1 ?        00:00:04 init
    2 ?        00:00:00 keventd
    3 ?        00:00:00 kapmd
    4 ?        00:00:00 ksoftirqd_CPU0
    5 ?        00:00:00 kswapd
    6 ?        00:00:00 bdflush
    7 ?        00:00:00 kupdated
    8 ?        00:00:00 mdrecoveryd
   10 ?        00:00:00 kjournald
   51 ?        00:00:00 khubd
   99 ?        00:00:00 kjournald
  100 ?        00:00:00 kjournald
  101 ?        00:00:00 kjournald
  299 ?        00:00:00 eth0
  349 ?        00:00:00 apmd
  403 ?        00:00:00 syslogd
  413 ?        00:00:00 klogd
  446 ?        00:00:00 atd
  473 ?        00:00:00 sshd
  516 ?        00:00:00 crond
  532 ?        00:00:00 unicon
  557 ?        00:00:00 cupsd
  569 tty3     00:00:00 mingetty
  570 tty4     00:00:00 mingetty
  571 tty5     00:00:00 mingetty
  572 tty6     00:00:00 mingetty
  618 tty1     00:00:00 login
  619 tty1     00:00:00 bash
  632 tty1     00:00:00 startx
  643 tty1     00:00:00 xinit
  644 ?        00:09:25 X
  647 tty1     00:00:00 xinitrc
  650 tty1     00:00:00 startkde_distro
  672 tty1     00:00:00 zwincontrol
  683 tty1     00:00:01 chinput
  688 ?        00:00:00 kdeinit
  691 ?        00:00:00 kdeinit
  694 ?        00:00:00 kdeinit
  697 ?        00:00:01 kdeinit
  704 ?        00:00:01 artsd
  709 tty1     00:00:00 knotify
  713 tty1     00:00:01 ksmserver
  714 ?        00:00:05 kdeinit
  715 tty2     00:00:00 login
  717 ?        00:00:03 kdeinit
  719 ?        00:00:07 kdeinit
  724 tty2     00:00:00 bash
  735 ?        00:00:01 kdeinit
  738 ?        00:00:00 kdeinit
  740 ?        00:00:00 alarmd
  741 pts/0    00:00:00 cat
  766 ?        00:00:38 kdeinit
  774 ?        00:00:00 kdeinit
  776 ?        00:00:00 kdesud
  789 ?        00:00:00 kdeinit
  793 ?        00:02:42 kdeinit
  818 ?        00:00:00 rxvt
  819 pts/1    00:00:00 bash
  827 ?        00:00:00 kjournald
1849 ?        00:00:04 kdeinit
2294 ?        00:00:00 xinetd
2401 ?        00:00:00 kdeinit
2405 pts/1    00:00:00 ps
发表于 2003-3-1 19:05:50 | 显示全部楼层

运行 /usr/sbin/in.telnetd有以下显示

/usr/sbin/in.telnetd: getpeername: Socket operation on non-socket

telnet localhost没有问题。真是奇怪了!另外我的/etc里居然没有inetd.conf文件。
发表于 2003-3-1 19:29:03 | 显示全部楼层

解决了,哈哈哈哈哈哈哈哈!

Arming老大,你误导我!!!!!

我将/etc/inetd.conf的
# Local host
# Allow all requests from localhost

ALL : 127.0.0.1

改为:# Local host
# Allow all requests from localhost

ALL : All

结果就解决问题了!

不过我总是觉得这样有一点危险。如果专门改telnet那一行,应该如何改呢?
发表于 2003-3-1 19:57:37 | 显示全部楼层

Re: 解决了,哈哈哈哈哈哈哈哈!

最初由 ralf 发布
Arming老大,你误导我!!!!!

我将/etc/inetd.conf的
# Local host
# Allow all requests from localhost

ALL : 127.0.0.1

改为:# Local host
# Allow all requests from localhost

ALL : All

结果就解决问题了!

不过我总是觉得这样有一点危险。如果专门改telnet那一行,应该如何改呢?


Impossible!! There is no "/etc/inetd.conf" in TurboLinux since version 7.0!!
Which version do you use then?
发表于 2003-3-1 20:38:46 | 显示全部楼层

workstation 8.0

真的没有,我不骗你。我自己都很奇怪。我还是完全安装呢!
发表于 2003-3-1 21:10:14 | 显示全部楼层
我的turbo 8中也没有/etc/inetd.conf文件,我装过turbo6.1里面是有的,后来到了turbo7之后就没有了,据说使用/etc/xinetd.conf替换了,xinetd是inetd的升级版本。
发表于 2003-3-1 22:22:18 | 显示全部楼层
不知这位ralf兄弟是否时升级的方式安装的呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表