简体   繁体   English

使用ftp4j使用FTPES连接到IBM MVS OS / 390服务器

[英]using ftp4j to connect using FTPES to IBM MVS OS/390 server

I am trying to connect FTPES server (IBM MVS OS/390), when trying with ftp4j I am getting PASS failed exception when using their example code 我尝试连接FTPES服务器(IBM MVS OS / 390)时,使用ftp4j尝试使用示例代码时出现PASS失败异常

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

I tried using python as well using ftplib as well as M2Crypto ftpslib, all these returning the same error "530 PASS command failed" 我尝试使用python以及ftplib和M2Crypto ftpslib,所有这些都返回相同的错误“ 530 PASS命令失败”

any clue? 有什么线索吗?

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)))

All the ports FTPES in java, python as well as working charmingly except that, I missed the wrong username while copy and pasting from source to properties file. Java,Python中所有端口FTPES以及迷人的工作方式都不同,除了在从源文件复制并粘贴到属性文件时,我错过了错误的用户名。 This was found when I tried with filezilla to connect to the host with authentication details caught me with failure, during that period, I verified my credentials and caught me with wrong information put earlier in the properties file. 当我尝试使用filezilla连接到具有身份验证详细信息的主机时,发现了该错误,在此期间,我验证了我的凭据,并使用属性文件中先前放置的错误信息捕获了我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM