如何在 Windows 命令提示符下使用被动 FTP 模式? [英] How to use passive FTP mode in Windows command prompt?

查看:44
本文介绍了如何在 Windows 命令提示符下使用被动 FTP 模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Ubuntu ftp -p 中,被动模式可以正常工作.

In Ubuntu ftp -p for passive mode works fine.

如何在 Windows 中执行相同的操作?

How do I do the same in Windows?

我尝试使用 quote pasv 但出现以下错误:

I tried with quote pasv but I am getting following error:

230 OK. Current restricted directory is /
ftp> quote pasv 
227 Entering Passive Mode (31,170,167,221,116,239)    
ftp> cd os    
250 OK. Current directory is /os    
ftp> dir    
500 I won't open a connection to 10.23.16.248 (only to 113.193.128.177)    
425 No data connection    
ftp>

我的防火墙已禁用.

推荐答案

Windows FTP 命令行客户端 (ftp.exe) 在任何版本的 Windows 上都不支持被动模式.由于无处不在的防火墙和 NAT,它现在变得非常无用.

The Windows FTP command-line client (ftp.exe) does not support the passive mode, on any version of Windows. It makes it pretty useless nowadays due to ubiquitous firewalls and NATs.

使用 quote pasv 无济于事.它只将服务器切换到被动模式,而不是客户端.

Using the quote pasv won't help. It switches only the server to the passive mode, but not the client.

请改用任何第三方 Windows FTP 命令行客户端.其他大多数都支持被动模式.

Use any thirdparty Windows FTP command-line client instead. Most other support the passive mode.

例如 WinSCP 默认为被动模式,并且有一个指南可用于转换 Windows FTP 脚本到 WinSCP 脚本.如果您是从头开始,请参阅使用 WinSCP 自动将文件传输到 FTP 的指南.此外,WinSCP GUI 可以为您生成脚本模板.

For example WinSCP defaults to the passive mode and there's a guide available for converting Windows FTP script to WinSCP script. If you are starting from the scratch, see the guide to automating file transfers to FTP using WinSCP. Also, WinSCP GUI can generate a script template for you.

(我是 WinSCP 的作者)

这篇关于如何在 Windows 命令提示符下使用被动 FTP 模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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