commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aidan Diffey <aidan.dif...@gmail.com>
Subject [NET] FTPES Problems
Date Tue, 07 Dec 2010 21:57:15 GMT
Hello all.

I have previously posted before, but this time I can give much more detail..

I have setup an vsftpd server (on linux) to use FTPES (TLS) and 
AES-256-SHA encryption.

I configure my FTPSClient as specified below, but I get the following error:

*522 SSL connection failed; session reuse required: see 
require_ssl_reuse option in vsftpd.conf man page*

I can connect to my FTPES server using FileZilla, but not using Commons 
NET.   Am I missing something

I am using Java 6 and Common Net 2.2

-------------
package common.ftp;

import java.io.PrintWriter;
import java.net.InetAddress;

import org.apache.commons.net.PrintCommandListener;
import org.apache.commons.net.ftp.FTPFile;
import org.apache.commons.net.ftp.FTPSClient;

import trust.MyTrust;


public class FTPTest
{

     public static void main(String...strings) throws Exception
     {
         FTPSClient client = new FTPSClient("TLS", false);

         try
         {
             InetAddress address = InetAddress.getByName("192.168.1.102");
             client.connect(address, 21);
             client.addProtocolCommandListener(new 
PrintCommandListener(new PrintWriter(System.out)));
             //client.setTrustManager(new MyTrust());
             client.setEnabledCipherSuites(new String[] 
{"TLS_RSA_WITH_AES_256_CBC_SHA"});
             client.login("aidan", "TtmHD1q7");

             client.enterLocalPassiveMode();

             client.execPROT("P");
             client.execPBSZ(0);

             FTPFile[] files = client.listFiles();

             for (FTPFile f : files)
             {
                 System.out.println(f.getName());
             }

         }
         finally
         {
             client.disconnect();
         }
     }
}


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message