curl schlägt fehl, Datei an ein FTPS zu senden

curl schlägt fehl, Datei an ein FTPS zu senden

Es wird versucht, „Testdatei“ an den FTPS-Server zu senden.

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/

Die Verbindung wird zwar hergestellt, schlägt aber danach fehl. Hier ist eine Ausgabe:

> * 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

Scheint, als ob nach „Verbunden mit EXAMPLE.COM_IP_ADDRESS (IP_ADDRESS) )“ und „Angemeldet“ steht „Verbindung zum Host konnte nicht hergestellt werden", obwohl in ein paar Zeilen oben scheint verbunden zu sein "

AKTUALISIEREN: Wenn Sie denselben Befehl mit dem Argument „--disable-epsv“ ausführen, scheint es, als würde er auch versuchen, die Datenkanal-Ports zu öffnen:

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

Dabei sind A, B, C, D die IP-Adressen der Server und ich glaube, die anderen 19, 179 sind die Ports. Stimmt’s? PS: Die letzte Zahl (179) wird jedes Mal um 1 erhöht, wenn ich den Befehl ausführe.

verwandte Informationen