Winscp - 尝试登录远程网站并出现无法打开数据连接的情况

Winscp - 尝试登录远程网站并出现无法打开数据连接的情况

我正在使用 WinScp 访问远程 FTP 服务器。我无法在笔记本电脑上连接,并显示以下消息Can't open data connection。然而,当我的同事在她的计算机上连接时,她可以连接到远程 FTP 站点

我列出了解决方案,我尝试过

  • 设置为被动模式:无效
  • 设置为活动模式:无效
  • 使用另一个 ftp 客户端(这里是 Filezilla):不起作用
  • 在远程防火墙上为服务器开放了端口范围(包括3900041000:不起作用
  • 根据共享驱动器设置一个 bat 文件,并通过 ftp 访问我想要的服务器:不起作用

另请查看日志的详细摘录

    2016-10-25 16:16:11.100 Session upkeep
    . 2016-10-25 16:16:11.103 Session upkeep
    . 2016-10-25 16:16:11.602 Session upkeep
    . 2016-10-25 16:16:12.124 Session upkeep
    . 2016-10-25 16:16:12.615 Session upkeep
    . 2016-10-25 16:16:13.129 Session upkeep
    . 2016-10-25 16:16:13.628 Session upkeep
    . 2016-10-25 16:16:14.143 Session upkeep
    . 2016-10-25 16:16:14.644 Session upkeep
    . 2016-10-25 16:16:15.157 Session upkeep
    . 2016-10-25 16:16:15.657 Session upkeep
    . 2016-10-25 16:16:16.171 Session upkeep
    . 2016-10-25 16:16:16.682 Session upkeep
    . 2016-10-25 16:16:17.185 Session upkeep
    . 2016-10-25 16:16:17.686 Session upkeep
    . 2016-10-25 16:16:18.199 Session upkeep
    . 2016-10-25 16:16:18.699 Session upkeep
    . 2016-10-25 16:16:19.214 Session upkeep
    . 2016-10-25 16:16:19.714 Session upkeep
    . 2016-10-25 16:16:20.228 Session upkeep
    . 2016-10-25 16:16:20.728 Session upkeep
    . 2016-10-25 16:16:21.242 Session upkeep
    . 2016-10-25 16:16:21.742 Session upkeep
    . 2016-10-25 16:16:22.256 Session upkeep
    . 2016-10-25 16:16:22.770 Session upkeep
    . 2016-10-25 16:16:23.271 Session upkeep
    . 2016-10-25 16:16:23.784 Session upkeep
    . 2016-10-25 16:16:24.284 Session upkeep
    . 2016-10-25 16:16:24.798 Session upkeep
    . 2016-10-25 16:16:25.297 Session upkeep
    . 2016-10-25 16:16:25.812 Session upkeep
    . 2016-10-25 16:16:26.312 Session upkeep
    . 2016-10-25 16:16:26.312 Sending dummy command to keep session alive.
    > 2016-10-25 16:16:26.312 REST 0
    < 2016-10-25 16:16:26.312 350 Rest supported. Restarting at 0
    . 2016-10-25 16:16:26.312 Dummy directory read to keep session alive.
    . 2016-10-25 16:16:26.312 Listage du répertoire en cours...
    > 2016-10-25 16:16:26.312 TYPE A
    < 2016-10-25 16:16:26.362 200 Type set to A
    > 2016-10-25 16:16:26.363 PASV
    < 2016-10-25 16:16:26.411 227 Entering Passive Mode (2x,92,x,143,159,76)
    > 2016-10-25 16:16:26.411 MLSD
    . 2016-10-25 16:16:26.412 Connexion à 2x.92.x.143:40780...
    < 2016-10-25 16:16:36.795 425 Can't open data connection.
    . 2016-10-25 16:16:36.795 Listage du répertoire impossible
    . 2016-10-25 16:16:36.795 Got reply 4 to the command 2
    . 2016-10-25 16:16:36.912 Session upkeep
    . 2016-10-25 16:16:36.967 Session upkeep
    . 2016-10-25 16:16:37.471 Session upkeep
    . 2016-10-25 16:16:37.981 Session upkeep
    . 2016-10-25 16:16:38.136 Session upkeep
    . 2016-10-25 16:16:38.481 Session upkeep
    . 2016-10-25 16:16:38.995 Session upkeep
    . 2016-10-25 16:16:39.497 Session upkeep
    . 2016-10-25 16:16:40.010 Session upkeep
    . 2016-10-25 16:16:40.514 Session upkeep
    . 2016-10-25 16:16:41.023 Session upkeep
    . 2016-10-25 16:16:41.523 Session upkeep
    . 2016-10-25 16:16:42.037 Session upkeep
    . 2016-10-25 16:16:42.537 Session upkeep
    . 2016-10-25 16:16:43.054 Session upkeep
    . 2016-10-25 16:16:43.551 Session upkeep
    . 2016-10-25 16:16:44.065 Session upkeep
    . 2016-10-25 16:16:44.565 Session upkeep
    . 2016-10-25 16:16:45.079 Session upkeep
    . 2016-10-25 16:16:45.578 Session upkeep
    . 2016-10-25 16:16:46.093 Session upkeep
    . 2016-10-25 16:16:46.598 Session upkeep
    . 2016-10-25 16:16:47.107 Session upkeep
    . 2016-10-25 16:16:47.607 Session upkeep
    . 2016-10-25 16:16:48.121 Session upkeep
    . 2016-10-25 16:16:48.674 Session upkeep
    . 2016-10-25 16:16:49.135 Session upkeep
    . 2016-10-25 16:16:49.638 Session upkeep
    . 2016-10-25 16:16:50.150 Session upkeep
    . 2016-10-25 16:16:50.649 Session upkeep
    . 2016-10-25 16:16:51.164 Session upkeep
    . 2016-10-25 16:16:51.312 --------------------------------------------------------------------------
    . 2016-10-25 16:16:51.313 WinSCP Version 5.9.2 (Compilation 6958) (OS 6.1.7601 Service Pack 1 - Windows 7 Professional)
    . 2016-10-25 16:16:51.313 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
    . 2016-10-25 16:16:51.313 Log level: Debug 2
    . 2016-10-25 16:16:51.313 Local account: xxx
    . 2016-10-25 16:16:51.313 Working directory: C:\Program Files (x86)\WinSCP
    . 2016-10-25 16:16:51.313 Process ID: 7428
    . 2016-10-25 16:16:51.317 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" 
    . 2016-10-25 16:16:51.317 Time zone: Current: GMT+2, Standard: GMT+1 (Paris, Madrid), DST: GMT+2 (Paris, Madrid (heure d’été)), DST Start: 27/03/2016, DST End: 30/10/2016
    . 2016-10-25 16:16:51.318 Login time: mardi 25 octobre 2016 16:16:51
    . 2016-10-25 16:16:51.318 --------------------------------------------------------------------------
    . 2016-10-25 16:16:51.319 Session name: zZz
    . 2016-10-25 16:16:51.319 Host name: 2x.92.46.143 (Port: 21)
    . 2016-10-25 16:16:51.319 User name: GERMANY (Password: Yes, Key file: No)
    . 2016-10-25 16:16:51.319 Transfer Protocol: FTP
    . 2016-10-25 16:16:51.319 Ping type: Dummy, Ping interval: 30 sec; Timeout: 15 sec
    . 2016-10-25 16:16:51.319 Disable Nagle: No
    . 2016-10-25 16:16:51.319 Proxy: None
    . 2016-10-25 16:16:51.319 Send buffer: 262144
    . 2016-10-25 16:16:51.319 UTF: Auto
    . 2016-10-25 16:16:51.319 FTPS: Explicit TLS/SSL [Client certificate: No]
    . 2016-10-25 16:16:51.319 FTP: Passive: Yes [Force IP: Auto]; MLSD: Auto [List all: Auto]; HOST: Auto
    . 2016-10-25 16:16:51.319 Session reuse: Yes
    . 2016-10-25 16:16:51.319 TLS/SSL versions: TLSv1.0-TLSv1.2
    . 2016-10-25 16:16:51.319 Local directory: C:\Users\xxx\Documents, Remote directory: /, Update: Yes, Cache: No
    . 2016-10-25 16:16:51.319 Cache directory changes: No, Permanent: Yes
    . 2016-10-25 16:16:51.319 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
    . 2016-10-25 16:16:51.321 Timezone offset: 0h 0m
    . 2016-10-25 16:16:51.321 --------------------------------------------------------------------------
    . 2016-10-25 16:16:51.324 Session upkeep
    . 2016-10-25 16:16:51.385 Connexion à 2x.92.x.143...
    . 2016-10-25 16:16:51.386 TLS layer changed state from unconnected to connecting
    . 2016-10-25 16:16:51.386 TLS layer changed state from connecting to connected
    . 2016-10-25 16:16:51.386 Connecté à 2x.92.x.143, négociation de la connexion SSL...
    < 2016-10-25 16:16:51.422 220-FileZilla Server version 0.9.41 beta
    < 2016-10-25 16:16:51.669 220-written by Tim Kosse ([email protected])
    < 2016-10-25 16:16:51.669 220 Please visit http://sourceforge.net/projects/filezilla/
    > 2016-10-25 16:16:51.669 AUTH TLS
    . 2016-10-25 16:16:51.695 Session upkeep
    < 2016-10-25 16:16:51.717 234 Using authentication type TLS
    . 2016-10-25 16:16:51.768 TLS connect: SSLv3 read server hello A
    . 2016-10-25 16:16:51.768 TLS connect: SSLv3 read server certificate A
    . 2016-10-25 16:16:51.768 TLS connect: SSLv3 read server done A
    . 2016-10-25 16:16:51.771 TLS connect: SSLv3 write client key exchange A
    . 2016-10-25 16:16:51.771 TLS connect: SSLv3 write change cipher spec A
    . 2016-10-25 16:16:51.771 TLS connect: SSLv3 write finished A
    . 2016-10-25 16:16:51.771 TLS connect: SSLv3 flush data
    . 2016-10-25 16:16:51.824 TLS connect: SSLv3 read server session ticket A
    . 2016-10-25 16:16:51.824 TLS connect: SSLv3 read finished A
    . 2016-10-25 16:16:51.825 Verifying certificate for "xxx GERMANY" with fingerprint xcr and 18 failures
    . 2016-10-25 16:16:51.825 Certificate for "xxx GERMANY" matches cached fingerprint and failures
    . 2016-10-25 16:16:51.826 Using TLSv1, cipher TLSv1/SSLv3: AES256-SHA, 1024 bit RSA, AES256-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(256)  Mac=SHA1
    . 2016-10-25 16:16:51.826 Session upkeep
    . 2016-10-25 16:16:51.854 Connexion SSL établie. En attente du message de bienvenue...
    > 2016-10-25 16:16:51.854 USER GERMANY
    < 2016-10-25 16:16:51.874 331 Password required for germany
    > 2016-10-25 16:16:51.874 PASS ********
    < 2016-10-25 16:16:51.922 230 Logged on
    > 2016-10-25 16:16:51.922 SYST
    < 2016-10-25 16:16:51.970 215 UNIX emulated by FileZilla
    > 2016-10-25 16:16:51.970 FEAT
    < 2016-10-25 16:16:52.020 211-Features:
    < 2016-10-25 16:16:52.020  MDTM
    < 2016-10-25 16:16:52.020  REST STREAM
    < 2016-10-25 16:16:52.020  SIZE
    < 2016-10-25 16:16:52.020  MLST type*;size*;modify*;
    < 2016-10-25 16:16:52.020  MLSD
    < 2016-10-25 16:16:52.021  AUTH SSL
    < 2016-10-25 16:16:52.021  AUTH TLS
    < 2016-10-25 16:16:52.021  PROT
    < 2016-10-25 16:16:52.021  PBSZ
    < 2016-10-25 16:16:52.031  UTF8
    < 2016-10-25 16:16:52.031  CLNT
    < 2016-10-25 16:16:52.031  MFMT
    < 2016-10-25 16:16:52.031 211 End
    > 2016-10-25 16:16:52.031 CLNT WinSCP-release-5.9.2
    < 2016-10-25 16:16:52.069 200 Don't care
    > 2016-10-25 16:16:52.070 OPTS UTF8 ON
    < 2016-10-25 16:16:52.118 200 UTF8 mode enabled
    > 2016-10-25 16:16:52.118 PBSZ 0
    < 2016-10-25 16:16:52.165 200 PBSZ=0
    > 2016-10-25 16:16:52.165 PROT P
    . 2016-10-25 16:16:52.205 Session upkeep
    < 2016-10-25 16:16:52.213 200 Protection level set to P
    . 2016-10-25 16:16:52.213 Session upkeep
    . 2016-10-25 16:16:52.263 Connecté
    . 2016-10-25 16:16:52.263 Got reply 1 to the command 1
    . 2016-10-25 16:16:52.263 --------------------------------------------------------------------------
    . 2016-10-25 16:16:52.263 Using FTP protocol.
    . 2016-10-25 16:16:52.263 Doing startup conversation with host.
    > 2016-10-25 16:16:52.321 PWD
    < 2016-10-25 16:16:52.369 257 "/" is current directory.
    . 2016-10-25 16:16:52.369 Got reply 1 to the command 16
    . 2016-10-25 16:16:52.369 Changing directory to "/".
    > 2016-10-25 16:16:52.369 CWD /
    < 2016-10-25 16:16:52.417 250 CWD successful. "/" is current directory.
    . 2016-10-25 16:16:52.417 Got reply 1 to the command 16
    . 2016-10-25 16:16:52.417 Getting current directory name.
    > 2016-10-25 16:16:52.418 PWD
    < 2016-10-25 16:16:52.466 257 "/" is current directory.
    . 2016-10-25 16:16:52.466 Got reply 1 to the command 16
    . 2016-10-25 16:16:52.580 Listage du répertoire en cours...
    > 2016-10-25 16:16:52.580 TYPE A
    < 2016-10-25 16:16:52.628 200 Type set to A
    > 2016-10-25 16:16:52.628 PASV
    < 2016-10-25 16:16:52.678 227 Entering Passive Mode (2x,92,x,143,159,77)
    > 2016-10-25 16:16:52.678 MLSD
    . 2016-10-25 16:16:52.678 Connexion à 2x.92.x.143:40781...
    . 2016-10-25 16:16:52.680 Session upkeep
    . 2016-10-25 16:16:53.231 Session upkeep
    . 2016-10-25 16:16:53.731 Session upkeep
    . 2016-10-25 16:16:54.231 Session upkeep
    . 2016-10-25 16:16:54.732 Session upkeep
    . 2016-10-25 16:16:55.232 Session upkeep
    . 2016-10-25 16:16:55.735 Session upkeep
    . 2016-10-25 16:16:56.285 Session upkeep
    . 2016-10-25 16:16:56.785 Session upkeep
    . 2016-10-25 16:16:56.785 Sending dummy command to keep session alive.
    > 2016-10-25 16:16:56.785 PWD
    < 2016-10-25 16:16:56.785 257 "/" is current directory.
    . 2016-10-25 16:16:57.286 Session upkeep
    . 2016-10-25 16:16:57.786 Session upkeep
    . 2016-10-25 16:16:58.287 Session upkeep
    . 2016-10-25 16:16:58.813 Session upkeep
    . 2016-10-25 16:16:59.315 Session upkeep
    . 2016-10-25 16:16:59.815 Session upkeep
    . 2016-10-25 16:17:00.315 Session upkeep

不确定该怎么想。

我已经为此奋斗了两天了,因此非常欢迎任何提示或建议。

答案1

由于您使用的是 winscp 而不是scp,我假设您使用的是 Windows。安装“Git Bash”是获取 bash 和 git 的简单方法,但它还包括一些其他方便的实用程序,包括 ssh 和 scp。我会尝试它们来帮助缩小您的问题范围。抱歉,我想不出更直接的解决方案或诊断测试。

答案2

这是一个不太可能的尝试,但我们还是决定尝试一下。

  1. 您的同事的计算机的 IP 地址是多少?
  2. 她的 IP 范围和你的 IP 范围不同吗?
  3. 远程计算机上是否有防火墙规则允许您的同事连接,但不允许您的计算机连接?

可能的解决方案:

  1. 尝试一下同事计算机的 IP 地址。
  2. 尝试与同事的计算机处于同一 IP 范围内的 IP。
  3. 要求服务器团队/客户将您计算机的 IP 纳入他们的防火墙规则。

额外的解决方案:

我个人曾经遇到过这样的情况:如果使用的 Windows 帐户是简单的用户帐户,Windows 7 家庭版就无法连接到 FTP 服务器。使用 Windows 7 家庭版上的管理员帐户登录解决了这个问题。即使您可能使用的是专业版,这也可能是您的客户端的解决方案:使用特权/管理员帐户登录并尝试再次连接到 FTP 服务器。(以管理员身份启动 WinSCP 可能会有效)。

相关内容