java - ftps- unable to get data connection -


i trying connect ftp server using ssh/tls every method have used hasn't been helpful.

    ftpsclient ftpsclient = new ftpsclient("tls", false);    // log.debug("using tls");     ftpclientconfig ftpclientconfig = new ftpclientconfig(ftpclientconfig.syst_unix);     ftpclientconfig.setserverlanguagecode("de");     ftpsclient.configure(ftpclientconfig);     ftpsclient.addprotocolcommandlistener(new printcommandlistener(new printwriter(system.out))); // outputs conversation console     ftpsclient.connect(domain, 21);     // set protection buffer size     ftpsclient.execpbsz(0);     // set data channel protection private     ftpsclient.execprot("p");     ftpsclient.login(username, password);     ftpsclient.enterlocalpassivemode();     ftpsclient.changeworkingdirectory(filepath);     ftpsclient.execpbsz(0);     // set data channel protection private     ftpsclient.execprot("p");     ftpsclient.listfiles();     ftpsclient.logout(); 

but keep getting same error-

250 cwd command successful pbsz 0 200 pbsz 0 successful prot p 200 protection set private pasv 227 entering passive mode (188,65,181,123,23,20). list 150 opening ascii mode data connection file list 425 unable build data connection: operation not permitted tls quit 221 goodbye. 

from have gathered through searching web, caused ftp server wanting client use same session both commands , data transfer.

the current work around change server config doesn't enforce session reuse.for proftp config explained on link http://www.proftpd.org/docs/howto/tls.html.

unfortunately not find 1 can tell java client reuse session data transfer.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -