Comando PORT ilegal. - Conectando-se através do WinSCP

1

Quando tento conectar-me ao meu servidor ftp por meio do winscp, recebo o erro "Comando de porta ilegal" pela primeira vez e estava acontecendo quando ele estava listando arquivos de diretório raiz (/). Não sei como me livrar desse erro, verifiquei o script de origem (presumindo que há algum script de inicialização), mas não consegui encontrar a fonte ou os links corretos para explorar.

Contexto de log copiado para referência.

FYI: O FileZilla funciona bem sem problemas. Por favor, lance alguma luz sobre o assunto!

. 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: [email protected]
. 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
    
por Avis 08.01.2018 / 13:11

1 resposta

1

Você configurou o WinSCP para usar um modo FTP ativo.

Tenho certeza que você usa um modo passivo no FileZilla.

Certifique-se de reativar o modo passivo no WinSCP: link

Leia o artigo do WinSCP sobre modo ativo / passivo para entender por que o modo ativo é problemático.

    
por 08.01.2018 / 13:37