debuggingAIX客户端和Windows Server之间的SFTP连接

情况:具有AIX机器的客户端无法正确连接到运行FTP服务器Serv-U FTP Server v10.2的Windows 2003 Server。 普通的FTP工作。 SFTP不工作。

不清楚错误发生在哪里,这是FTP客户端还是服务器端的问题。 他们正在连接一个具有-s标志选项的ftp二进制文件。

以下是他们看到的一面:

 $ ftp -s -D 900 ftp.example.com Connected to XX.XXX.XX.XXX. 220 Serv-U FTP Server v10.2 ready... 234 AUTH command OK. Initializing SSL connection. TLS Auth Entered. ERROR Error during the hand shake for the control connection ERROR Error setting BIO object for the control connection FTP: Unable to authenticate to Server. 

使用FreeBSD机器时,我想知道是否可以评估可能发生的事情,所以我尝试的是如下所示运行curl,并在PHP中使用curl,并且我感觉到可能存在SSL证书的问题在Windows服务器上。 但其他人已经能够使用SFTP从其他机器连接而没有问题,所以很难说出问题的出在哪里。

下面是一个curl命令和从networking外的FreeBSD机器得到的输出错误:

 curl --ftp-ssl ftp://ftp.example.com 

结果是:

 curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed More details here: http://curl.haxx.se/docs/sslcerts.html curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). The default bundle is named curl-ca-bundle.crt; you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option. 

我能做些什么来查看错误可能在哪里? 任何指导如何debugging,也许看到来回传递的证书? 或者,也许可以提供指导,告诉客户要给我们提供比“无法validation”更多的诊断信息。 再说一遍,当我们向他们打开vanilla FTP时,一切正常,所以这绝对是在连接的安全。

据我所知,高达7.1的AIX版本都没有带有SSLfunction的FTP客户端(并且在你的例子中没有-s开关),所以它听起来像是在使用非标准的客户端,这可能是真的。

也许要求他们切换到LFTP ,或从IBM的RPM软件包中curl,都有FTP over SSL支持

我们在企业设置中遇到了类似的问题, 这是由于思科ASA的configuration在所涉及的机器之间的路线上造成的:

 inspect ftp strict 

去除strict的伎俩。