I am trying to connect to my NAS FTP server from a raspberry pi using the command "curl". The connection use ssl encryption, so I am using the following command type:
curl --ftp-ssl <FTPSERVEUR>:21 --user "<USER>:<PASS>"
Unfortunately, I get :
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 10 allowed.
220-Local time is now 20:38. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 10 minutes of inactivity.
530 You aren't logged in
500 ?
500 ?
500 ?
500 ?
500 ?
And then nothing appends. It seems that curl is even not able to transmit my ID to the server.. Do you have any idea of what is going on ?
Thank you in advance for your help.
You need to use the URL syntax, i.e. ftp://host...
. Otherwise curl does not know which protocol to use and will assume the default, i.e http://...
. What you see in the output is actually the result of sending a HTTP request to the FTP server on port 21: First you get the response of the FTP server to the TCP connect (welcome message) which is then followed by several error messages as the result of trying to interpret the lines in the HTTP request as FTP commands.