在Windows 7中通过命令提示符访问代理后面的FTP服务器 [英] Accessing FTP server behind a proxy via command prompt in Windows 7

查看:243
本文介绍了在Windows 7中通过命令提示符访问代理后面的FTP服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要连接到FTP服务器 ftp://trmmopen.gsfc.nasa. Windows 7中从命令提示符中访问gov/pub/merged/3B42RT .

I want to connect to the FTP server ftp://trmmopen.gsfc.nasa.gov/pub/merged/3B42RT from my command prompt in Windows 7.

它总是显示未连接.

我正在代理服务器后运行我的PC.我开始了解端口错误.遵循此解决方案此处关于端口转发,但仍然没有结果.

I am running my PC behind proxy. I came to know about port error. Followed this solution here about port forwarding but still no result.

推荐答案

Windows内置命令行ftp.exe客户端不支持通过代理连接.它还仅支持活动模式,这使得无论如何都难以通过代理进行连接(即使使用了某些透明的代理解决方案也是如此).

Windows built-in command-line ftp.exe client does not support connecting over a proxy. It also supports an active mode only, what makes it difficult to connect though proxy anyway (even if some transparent proxy solution is used).

您必须使用支持被动模式和代理的第三方命令行FTP客户端.

You have to use a 3rd party command-line FTP client that supports a passive mode and a proxy.

例如,对于 WinSCP FTP客户端,您可以使用以下批处理文件(.bat):

For example with WinSCP FTP client, you can use the following batch file (.bat):

WinSCP.com /command ^
    "open ftp://anonymous:dummy@trmmopen.gsfc.nasa.gov/ -rawsettings ProxyMethod=3 ProxyHost=proxy ProxyUsername=username ProxyPassword=password" ^
    "cd /pub/merged/3B42RT" ^
    "ls" ^
    "exit"

请参见使用WinSCP编写脚本的指南以上代码用于HTTP代理.如果使用其他代理类型,请相应地更改ProxyMethod设置.请参见 https://winscp.net/eng/docs/rawsettings

The above code is for an HTTP proxy. If you use a different proxy type, alter the ProxyMethod setting accordingly. See https://winscp.net/eng/docs/rawsettings

尽管更容易的是在WinSCP GUI中配置连接,然后将其生成脚本模板为您.

Though easier is to configure the connection in WinSCP GUI and then have it generate a script template for you.

(我是WinSCP的作者)

这篇关于在Windows 7中通过命令提示符访问代理后面的FTP服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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