컬이 FTPS로 파일을 보내는 데 실패했습니다.

컬이 FTPS로 파일을 보내는 데 실패했습니다.

FTPS 서버에 "test_file"을 보내려고 합니다.

curl -v -k --ftp-ssl --tlsv1 --ftp-ssl-reqd --ftp-pasv --key key_nopass.pem --cert client.pem --user 'user:pass' --upload-file test_file ftp://Ftps.example.com:21/

연결되지만 이후에는 실패합니다. 다음은 몇 가지 결과입니다.

> * Connected to EXAMPLE.COM_IP_ADDRESS (IP_ADDRESS) port 21 (#0)
> < 220 Microsoft FTP Service
> > AUTH SSL
> < 234 AUTH command ok. Expecting TLS Negotiation.
> * successfully set certificate verify locations:
> USER username
< 331 Password required for username.
> PASS thepassword
< 230 User logged in.
> PBSZ 0
< 200 PBSZ command successful.
> PROT P
< 200 PROT command successful.
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> EPSV
* Connect data stream passively
< 229 Entering Extended Passive Mode (|||5013|)
*   Trying example.com.ip.addess
  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:03:09 --:--:--     0* Connection timed out
* couldn't connect to host
* got positive EPSV response, but can't connect. Disabling EPSV
> PASV
* response reading failed
  0     0    0     0    0     0      0      0 --:--:--  0:03:09 --:--:--     0
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
} [data not shown]
curl: (56) response reading failed

"EXAMPLE.COM_IP_ADDRESS(IP_ADDRESS)에 연결됨)" 및 "로그인" 후에 "호스트에 연결할 수 없습니다"그래도 위의 몇 줄로 연결되는 것 같습니다."

업데이트: "--disable-epsv" 인수를 사용하여 동일한 명령을 실행하면 데이터 채널 포트도 열려고 시도하는 것 같습니다.

* Connect data stream passively
< 227 Entering Passive Mode (A,B,C,D,19,179).

A,B,C,D는 서버의 IP이고 다른 IP는 19,179가 포트입니다. 오른쪽? 추신: 명령을 실행할 때마다 마지막 숫자(179)가 1씩 증가합니다.

관련 정보