【问题标题】:using ftp4j to connect using FTPES to IBM MVS OS/390 server使用 ftp4j 使用 FTPES 连接到 IBM MVS OS/390 服务器
【发布时间】:2013-12-13 13:08:49
【问题描述】:

我正在尝试连接 FTPES 服务器 (IBM MVS OS/390),在尝试使用 ftp4j 时,我在使用他们的示例代码时遇到 PASS 失败异常

it.sauronsoftware.ftp4j.FTPException [code=530, message= PASS command failed]

我尝试使用 python 以及使用 ftplib 和 M2Crypto ftpslib,所有这些都返回相同的错误“530 PASS 命令失败”

有什么线索吗?

def connect(self):
    try:
        ctx = SSL.Context('sslv23')
        self.ftps = ftpslib.FTP_TLS(ssl_ctx=ctx)
        self.ftps.connect(self.host,self.port)
        self.ftps.auth_tls()
        self.ftps.set_pasv(1)
        self.ftps.sendcmd('USER %s' % self.username) # '331 Please specify the password.'
        self.ftps.sendcmd('PASS %s' % self.password)

        #self.ftps.login(self.username, self.password)
        self.ftps.prot_p()
        print('logged in sucessfuly')
        self.ftps.cwd('XXXX')
    except Exception,e:
        self.ftps = None
        self.logger.warning("Exception raised while connecting FTPS server, %s" % ("*** Caught exception: %s: %s" % (e.__class__, e)))

【问题讨论】:

    标签: java python m2crypto ftps ftp4j


    【解决方案1】:

    java、python 中的所有端口 FTPES 以及迷人的工作,除了我在从源文件复制和粘贴到属性文件时错过了错误的用户名。当我尝试使用 filezilla 连接到主机时发现此问题,但身份验证详细信息使我失败,在此期间,我验证了我的凭据并发现我之前在属性文件中输入了错误信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多