Illegaler PORT-Befehl. - Verbindung über WinSCP

547
Avis

Wenn ich versuche, mich über Winscp mit meinem FTP-Server zu verbinden, erhalte ich beim ersten Mal den Fehler "Illegal port command" und er ist aufgetreten, als er die Root-Verzeichnisdateien (/) auflistete. Ich bin nicht sicher, wie ich diesen Fehler beseitigen kann, habe das Quellenskript überprüft (vorausgesetzt, es gibt ein Init-Skript), aber ich konnte nicht die richtige Quelle oder Links finden, die es zu erkunden gilt.

Kopierter Protokollkontext als Referenz.

Zu Ihrer Information: FileZilla funktioniert einwandfrei ohne Probleme. Bitte werfen Sie ein wenig Licht auf das Problem!

. 2018-01-08 08:57:09.656 -------------------------------------------------------------------------- . 2018-01-08 08:57:09.656 WinSCP Version 4.2.7 (Build 758) (OS 6.1.7601 Service Pack 1) . 2018-01-08 08:57:09.656 Login time: Monday, January 08, 2018 8:57:09 AM . 2018-01-08 08:57:09.656 -------------------------------------------------------------------------- . 2018-01-08 08:57:09.656 Session name: test@myuploads.com . 2018-01-08 08:57:09.656 Host name: myuploads.com (Port: 21) . 2018-01-08 08:57:09.656 User name: test (Password: Yes, Key file: No) . 2018-01-08 08:57:09.656 Tunnel: No . 2018-01-08 08:57:09.656 Transfer Protocol: FTP . 2018-01-08 08:57:09.656 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec . 2018-01-08 08:57:09.656 Proxy: none . 2018-01-08 08:57:09.656 FTP: FTPS: Explicit TLS; Passive: No [Force IP: No] . 2018-01-08 08:57:09.656 Local directory: C:\Users\Administrator\Documents, Remote directory: /, Update: Yes, Cache: Yes . 2018-01-08 08:57:09.656 Cache directory changes: Yes, Permanent: Yes . 2018-01-08 08:57:09.656 DST mode: 1 . 2018-01-08 08:57:09.656 -------------------------------------------------------------------------- . 2018-01-08 08:57:09.671 Connecting to myuploads.com ... . 2018-01-08 08:57:09.671 m_pSslLayer changed state from 0 to 1 . 2018-01-08 08:57:09.671 m_pSslLayer changed state from 1 to 2 . 2018-01-08 08:57:09.671 m_pSslLayer changed state from 2 to 4 . 2018-01-08 08:57:09.671 Connected with myuploads.com, negotiating SSL connection... < 2018-01-08 08:57:09.671 220 (vsFTPd 3.0.2) > 2018-01-08 08:57:09.671 AUTH TLS < 2018-01-08 08:57:09.671 234 Proceed with negotiation. . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 read server hello A . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 read server certificate A . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 read server key exchange A . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 read server certificate request A . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 read server done A . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 write client certificate A . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 write client key exchange A . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 write change cipher spec A . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 write finished A . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 flush data . 2018-01-08 08:57:09.827 SSL_connect: SSLv3 read finished A . 2018-01-08 08:57:09.827 Using TLSv1, cipher TLSv1/SSLv3: DHE-RSA-AES256-SHA, 2048 bit RSA . 2018-01-08 08:57:09.827 SSL connection established. Waiting for welcome message... > 2018-01-08 08:57:09.827 USER test < 2018-01-08 08:57:09.827 331 Please specify the password. > 2018-01-08 08:57:09.827 PASS ****** < 2018-01-08 08:57:09.858 230 Login successful. > 2018-01-08 08:57:09.952 SYST < 2018-01-08 08:57:09.952 215 UNIX Type: L8 > 2018-01-08 08:57:09.952 FEAT < 2018-01-08 08:57:09.952 211-Features: < 2018-01-08 08:57:09.952 AUTH TLS < 2018-01-08 08:57:09.952 EPRT < 2018-01-08 08:57:09.952 EPSV < 2018-01-08 08:57:09.952 MDTM < 2018-01-08 08:57:09.952 PASV < 2018-01-08 08:57:09.952 PBSZ < 2018-01-08 08:57:09.952 PROT < 2018-01-08 08:57:09.952 REST STREAM < 2018-01-08 08:57:09.952 SIZE < 2018-01-08 08:57:09.952 TVFS < 2018-01-08 08:57:09.952 UTF8 < 2018-01-08 08:57:09.952 211 End > 2018-01-08 08:57:09.952 OPTS UTF8 ON < 2018-01-08 08:57:09.952 200 Always in UTF8 mode. > 2018-01-08 08:57:09.952 PBSZ 0 < 2018-01-08 08:57:09.952 200 PBSZ set to 0. > 2018-01-08 08:57:09.952 PROT P < 2018-01-08 08:57:09.952 200 PROT now Private. . 2018-01-08 08:57:09.952 Connected . 2018-01-08 08:57:09.952 Got reply 1 to the command 1 . 2018-01-08 08:57:09.952 -------------------------------------------------------------------------- . 2018-01-08 08:57:09.952 Using FTP protocol. . 2018-01-08 08:57:09.952 Doing startup conversation with host. > 2018-01-08 08:57:09.952 PWD < 2018-01-08 08:57:09.952 257 "/" . 2018-01-08 08:57:09.952 Got reply 1 to the command 16 . 2018-01-08 08:57:09.952 Changing directory to "/". > 2018-01-08 08:57:09.952 CWD / < 2018-01-08 08:57:09.952 250 Directory successfully changed. . 2018-01-08 08:57:09.952 Got reply 1 to the command 16 . 2018-01-08 08:57:09.952 Getting current directory name. > 2018-01-08 08:57:09.952 PWD < 2018-01-08 08:57:09.952 257 "/" . 2018-01-08 08:57:09.952 Got reply 1 to the command 16 . 2018-01-08 08:57:09.952 Retrieving directory listing... > 2018-01-08 08:57:09.952 TYPE A < 2018-01-08 08:57:09.952 200 Switching to ASCII mode. > 2018-01-08 08:57:09.952 PORT 10,0,40,181,244,221 < 2018-01-08 08:57:09.952 500 Illegal PORT command. . 2018-01-08 08:57:09.952 Could not retrieve directory listing . 2018-01-08 08:57:09.952 Got reply 4 to the command 2 . 2018-01-08 08:57:09.968 Retrieving directory listing... > 2018-01-08 08:57:09.968 TYPE A < 2018-01-08 08:57:09.968 200 Switching to ASCII mode. > 2018-01-08 08:57:09.968 PORT 10,0,40,181,244,222 < 2018-01-08 08:57:09.968 500 Illegal PORT command. . 2018-01-08 08:57:09.968 Could not retrieve directory listing . 2018-01-08 08:57:09.968 Got reply 4 to the command 2 * 2018-01-08 08:57:09.968 (ECommand) Error listing directory '/'. * 2018-01-08 08:57:09.968 Could not retrieve directory listing * 2018-01-08 08:57:09.968 Illegal PORT command. . 2018-01-08 08:57:27.159 Startup conversation with host finished. . 2018-01-08 08:57:27.798 Session upkeep . 2018-01-08 08:57:28.313 Session upkeep 
1

1 Antwort auf die Frage

1
Martin Prikryl

Sie haben WinSCP für die Verwendung eines aktiven FTP-Modus konfiguriert.

Ich bin mir ziemlich sicher, dass Sie in FileZilla einen passiven Modus verwenden.

Stellen Sie sicher, dass Sie den Passivmodus in WinSCP erneut aktivieren: https://winscp.net/ger/docs/ui_login_connection

Lesen Sie den WinSCP-Artikel über den Aktiv / Passiv-Modus, um zu verstehen, warum der Aktivmodus problematisch ist.