Telnet和被动FTP [英] Telnet and passive FTP

查看:151
本文介绍了Telnet和被动FTP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的FTP测试服务器有问题.我已经安装并配置了FileZilla服务器,它正在侦听端口21上的控制连接,然后可以在50100和51100之间的端口上提供被动模式数据连接.

I've a problem with my FTP test server. I've installed and configured FileZilla server, It's listening for control connection on port 21, then it can provide passive mode data connection on ports between 50100 and 51100.

我正在尝试本地连接127.0.0.1:21并在FTP根目录中检索文件和文件夹的列表.

I'm trying a local connection 127.0.0.1:21 and retrieve the LIST of files and folders in the root FTP directory.

FileZilla客户端:作品
MS-DOS中的FTP:Works
MS-DOS中的TELNET:控制连接和用户身份验证正常,然后切换到被动模式,当我尝试使用命令LIST检索文件和文件夹时,它响应无法打开数据连接以传输"/" .

FileZilla Client: Works
FTP in MS-DOS: Works
TELNET in MS-DOS: Control connection and user authentication OK, then I switch to passive mode, and when I'm trying to retrieve files and folder with the command LIST It respond "Can't open data connection for transfer of "/"".

我尝试为端口50100-51100和FileZilla服务器设置防火墙规则.它仍然无法正常工作.

I've tried setting firewall rules for ports 50100-51100 and the FileZilla server. It's still not working.

推荐答案

您无法使用Telnet客户端通过FTP协议检索文件.

You cannot retrieve files over FTP protocol using a Telnet client.

虽然您可以通过在Telnet控制台上键入FTP命令来模拟FTP客户端,但是您不能以这种方式进行文件传输.这是因为对于文件传输,您需要一个单独的数据传输连接,这是Telnet客户端无法执行的操作.

While you can simulate the FTP client by typing FTP commands on a Telnet console, you cannot do file transfers this way. It's because for file transfer you need a separate data transfer connection, what the Telnet client cannot do.

这就是FTP服务器故障的原因.在活动模式下,由于没有监听,它无法重新连接到客户端计算机.在被动模式下,它超时等待客户端连接到其数据端口.

That's why the FTP server fails. In an active mode, it fails to connect back to your client machine, because there's nothing listening. In a passive more, it timeouts waiting for the client to connect to its data port.

这篇关于Telnet和被动FTP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆