无法连接到 FTP 服务器:425 无法建立数据连接:连接超时

Mis*_*hko 17 ftp ubuntu ubuntu-11.10

我的笔记本电脑上安装了 Windows 7。我在 Ubuntu 11.10 上安装了 VirtualBox 4.1.4。

我正在尝试通过 FTP 连接到我的站点,但在执行ls以下操作时出现错误:

~> ftp <my_site>
Connected to <my_site>.
220 DreamHost FTP Server
Name (<my_site>:misha): <my_username>
331 Password required for <my_username>
Password: <my_password>
230 User <my_username> logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful
425 Unable to build data connection: Connection timed out
ftp> 
Run Code Online (Sandbox Code Playgroud)

可能是什么问题呢?

Pau*_*aul 27

正在建立连接,但无法设置返回数据路径。

这可能是因为路径中的某些内容不支持来自源(可能是外围路由器)的 PORT 模式 ftp。

尝试使用ftp -pwhich 将在被动 (PASV) 模式下启动客户端。

  • 正如 [Damon Hill](https://superuser.com/users/588842/damon-hill) 在现已删除的回答中指出的那样,“如果您已经连接到 ftp 服务器并且忘记了 `-p ` 参数,您可以发出命令 `passive` 以进入此模式。” (2认同)