Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux &引用;卷曲;无法连接到ftp:“;500?“;_Linux_Ssl_Curl_Raspberry Pi_Ftps - Fatal编程技术网

Linux &引用;卷曲;无法连接到ftp:“;500?“;

Linux &引用;卷曲;无法连接到ftp:“;500?“;,linux,ssl,curl,raspberry-pi,ftps,Linux,Ssl,Curl,Raspberry Pi,Ftps,我正在尝试使用命令“curl”从raspberry pi连接到我的NAS FTP服务器。连接使用ssl加密,因此我使用以下命令类型: curl --ftp-ssl <FTPSERVEUR>:21 --user "<USER>:<PASS>" 然后就什么都没有了。 似乎curl甚至无法将我的ID传输到服务器。。你知道发生了什么事吗 提前感谢您的帮助。您需要使用URL语法,即ftp://host...。否则,curl不知道使用哪个协议,并将采用默认协议,即htt

我正在尝试使用命令“curl”从raspberry pi连接到我的NAS FTP服务器。连接使用ssl加密,因此我使用以下命令类型:

curl --ftp-ssl <FTPSERVEUR>:21 --user "<USER>:<PASS>"
然后就什么都没有了。 似乎curl甚至无法将我的ID传输到服务器。。你知道发生了什么事吗


提前感谢您的帮助。

您需要使用URL语法,即
ftp://host...
。否则,curl不知道使用哪个协议,并将采用默认协议,即
http://...
。您在输出中看到的实际上是向端口21上的FTP服务器发送HTTP请求的结果:首先,您得到FTP服务器对TCP connect(欢迎消息)的响应,然后,由于尝试将HTTP请求中的行解释为FTP命令,出现了多条错误消息。

使用URL语法,即
ftp://host/...
不仅仅是ip:port。好的,非常感谢,现在它可以工作了。但我不明白为什么。我们可以想象端口上的ftp服务器不同于默认端口21,否?有关详细信息,请参阅我的答案。
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 ?