Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8962657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:10:42+00:00 2026-06-15T16:10:42+00:00

I have this problem when use ftp4j: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? The

  • 0

I have this problem when use ftp4j:

javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

The ftp server has enabled connections on port 22 and I can connect with no problems filezilla.

and this is my code:

 private boolean copiarArchviosFtp(){

    FTPClient ftpDestino=new FTPClient();

    try{
        TrustManager[] trustManager = new TrustManager[] { new X509TrustManager() {
            public X509Certificate[] getAcceptedIssuers() {
                return null;
            }
            public void checkClientTrusted(X509Certificate[] certs, String authType) {
            }
            public void checkServerTrusted(X509Certificate[] certs, String authType) {
            }
        } };
        SSLContext sslContext = null;
        try {
            sslContext = SSLContext.getInstance("SSL");
            sslContext.init(null, trustManager, new SecureRandom());
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        } catch (KeyManagementException e) {
            e.printStackTrace();
        }
        SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();

        ftpDestino.setSSLSocketFactory(sslSocketFactory);
        ftpDestino.setSecurity(FTPClient.SECURITY_FTPS);

        ftpDestino.connect("172.24.1.109",22);
        ftpDestino.login("user","password");
        ftpDestino.changeDirectory("/home/");


        FTPFile[] listFilte=ftpDestino.list();
        for(FTPFile ftpFile:listFilte){
            System.out.println("nameFile: "+ftpFile.getName());
        }

    }
    catch(Exception e){
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    return false;
}

Any idea about to how solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:10:43+00:00Added an answer on June 15, 2026 at 4:10 pm

    I am investigating how to copy files by SFTP. The ftp4j library was not working even with FTPClient.SECURITY_FTPS specified because FTPS is different from SFTP.

    I found a solution using another library called JSCH.

    Here is an example of JSCH. I hope this helps somebody.

    Here is more information on SFTP vs FTPS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok I have this problem I'm trying to use Jquery to load a partial
I become use raw socket and i have this problem: bad file descriptor the
i am having this problem try to use the cocos2d CCScrollLayer I have added
i have problem use link_to_remote link_to_remote document example say link_to_remote Delete this post, :update
I'm having a misunderstanding problem with this use of Linq Query I do have
I have some problem with this mongoid. It's my first time to use mongoDB,
I have a problem. I want to use a LINQ query against this database:
I'm doing a Microsoft Surface Application and I have this problem: I use the
i often use but i have this problem. if there is a whose action
I have this as configuration of my Express server app.use(app.router); app.use(express.cookieParser()); app.use(express.session({ secret: keyboard

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.