调试 AIX 客户端和 Windows Server 之间的 SFTP 连接

调试 AIX 客户端和 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,我感觉 Windows 服务器上的 SSL 证书可能存在问题。但其他人能够使用 SFTP 从其他机器进行连接,没有任何问题,所以很难说问题出在哪里。

下面是curl我从网络外的 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.

我该怎么做才能查看错误可能出在哪里?有没有关于如何调试这个问题的指导,也许可以查看来回传递的证书?或者也许可以指导如何告诉客户端做什么,以便为我们提供比“无法验证”更多的诊断信息。同样,当我们向他们打开 vanilla FTP 时,一切都运行正常,所以这肯定是连接的安全性问题。

答案1

据我所知,AIX 7.1 之前的版本都没有附带支持 SSL 的 FTP 客户端(并且没有 -s 开关,如您在示例中所示),所以听起来他们正在使用非标准客户端,但实际上可能是任何东西。

也许可以要求他们切换到低速FTP或卷曲IBM 的 RPM 包,均支持 FTP over SSL

答案2

我们在企业设置中遇到了类似的问题;这是由所涉及机器之间的 Cisco ASA 配置中的以下行引起的:

inspect ftp strict

删除就strict成功了。

相关内容