大网数据广告活动
服务器运维问答

How to access FTP server in terminal using proxy?

· 52CE 我爱测

I have Ubuntu 16.04 installed on my pc. My network require http proxy to access the internet. Say Proxy is " xxx.xx.xx.xx " and port is " 8080 ". I set up system proxy for http, https and ftp. I am able to access internet through…

问题原文

原帖链接 · Sanjay Prajapat · CC BY-SA 4.0

I have Ubuntu 16.04 installed on my pc. My network require http proxy to access the internet.

Say Proxy is "xxx.xx.xx.xx" and port is "8080".

I set up system proxy for http, https and ftp. I am able to access internet through terminal. But I am able to access FTP server only in web browser, not in terminal.

When i try to access FTP server, i get :

user@hostname:~$ ftp ftp.example.org
ftp: connect to address 213.138.116.78: Connection refused
Trying 2001:41c8:112:8300::15:0...
ftp: connect: Network is unreachable
ftp> 

It working with VPN.

Any help is appreciated.

已采纳解答

原帖链接 · Marco · CC BY-SA 3.0

Install lftp. It has an ftp proxy environment variable that you can set to connect through proxy from the command line. lftp man page

Example:

user@yourmachine:~$ sudo apt-get install lftp

[...]

user@yourmachine:~$ lftp
lftp :~> set ftp:proxy http://proxyuser:proxypass@yourproxyIPorHOSTNAME:port 
lftp :~> open ftp.example.com 
lftp :~> USER ftpUSER
password: ftpPASS

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-07-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0 / CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。