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?
Just use ftps://
URL:
wget ... --ftp-user=user --ftp-password=password ftps://server/file.gz file.gz