Use FTPS (通过发送 AUTH TLS) 与 wget

huangapple go评论54阅读模式
英文:

Use FTPS (by sending AUTH TLS) with wget

问题

我正在尝试使用wget从FTP服务器下载文件:

wget --debug --no-passive-ftp --ftp-user=user --ftp-password=password ftp://server/file.gz file.gz

我得到的是:

220 Private FTP server
Logging in as xxx ... 
--> USER xxx

331 Non-anonymous sessions must use encryption.

--> PASS xxx
Error in server response, closing control connection.

我能够使用FileZilla连接并下载FTP服务器上的文件。在FileZilla中,日志显示:

Response:	220 Private FTP server
Command:	AUTH TLS
Response:	234 Proceed with negotiation.
Status:	Initializing TLS...
Status:	Verifying certificate...
Status:	TLS connection established.
Command:	USER xxx
Response:	331 Please specify the password.
Command:	PASS ******************

下载任务必须在无法使用FileZilla的远程服务器上执行。如何强制wgetUSER xxx命令之前发送AUTH TLS命令?

英文:

I am trying to download file from FTP server using wget:

wget --debug --no-passive-ftp --ftp-user=user --ftp-password=password ftp://server/file.gz file.gz

What I get is:

220 Private FTP server
Logging in as xxx ... 
--> USER xxx

331 Non-anonymous sessions must use encryption.

--> PASS xxx
Error in server response, closing control connection.

I am able to connect and download files from FTP server using FileZilla. In FileZilla I get this in log:

Response:	220 Private FTP server
Command:	AUTH TLS
Response:	234 Proceed with negotiation.
Status:	Initializing TLS...
Status:	Verifying certificate...
Status:	TLS connection established.
Command:	USER xxx
Response:	331 Please specify the password.
Command:	PASS ******************

Download task must be executed on remote server where I cannot use FileZilla. How can I force wget to send AUTH TLS command before USER xxx command?

答案1

得分: 0

Just use ftps:// URL:

wget ... --ftp-user=user --ftp-password=password ftps://server/file.gz file.gz
英文:

Just use ftps:// URL:

wget ... --ftp-user=user --ftp-password=password ftps://server/file.gz file.gz

huangapple
  • 本文由 发表于 2023年3月8日 18:44:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/75672004.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定