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

查看:49
本文介绍了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:工作
MS-DOS 中的 TELNET:控制连接和用户身份验证 OK,然后我切换到被动模式,当我尝试使用命令 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天全站免登陆