"curl" 连接到 ftp 不可能:“500?”
"curl" connection to ftp impossible : "500 ?"
我正在尝试使用命令 "curl" 从 raspberry pi 连接到我的 NAS FTP 服务器。连接使用 ssl 加密,所以我使用以下命令类型:
curl --ftp-ssl <FTPSERVEUR>:21 --user "<USER>:<PASS>"
不幸的是,我得到了:
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 ?
然后什么都不追加。
似乎 curl 甚至无法将我的 ID 传输到服务器.. 你知道发生了什么事吗?
预先感谢您的帮助。
您需要使用 URL 语法,即 ftp://host...
。否则 curl 不知道要使用哪个协议并将采用默认协议,即 http://...
。您在输出中看到的实际上是向端口 21 上的 FTP 服务器发送 HTTP 请求的结果: 首先您得到 FTP 服务器对 TCP 连接(欢迎消息)的响应,它是然后由于尝试将 HTTP 请求中的行解释为 FTP 命令而出现几条错误消息。
我正在尝试使用命令 "curl" 从 raspberry pi 连接到我的 NAS FTP 服务器。连接使用 ssl 加密,所以我使用以下命令类型:
curl --ftp-ssl <FTPSERVEUR>:21 --user "<USER>:<PASS>"
不幸的是,我得到了:
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 ?
然后什么都不追加。 似乎 curl 甚至无法将我的 ID 传输到服务器.. 你知道发生了什么事吗?
预先感谢您的帮助。
您需要使用 URL 语法,即 ftp://host...
。否则 curl 不知道要使用哪个协议并将采用默认协议,即 http://...
。您在输出中看到的实际上是向端口 21 上的 FTP 服务器发送 HTTP 请求的结果: 首先您得到 FTP 服务器对 TCP 连接(欢迎消息)的响应,它是然后由于尝试将 HTTP 请求中的行解释为 FTP 命令而出现几条错误消息。