Practical issues related to Java FTP sftp

Source: Internet
Author: User
Tags response code

The first one:

Java FTP uses Apache common-net, but FTP servers provided on the FTP service side only support SFTP, resulting

Java.net.ConnectException:Connection refused

The above error is on the company test server, the local running code error is as follows:

org.apache.commons.net.MalformedServerReplyException:Could not parse response code. Server reply:ssh-2.0-openssh_5.3

In summary: The use of Com.jcraft.jsch for SFTP is handled

The second one:

SFTP with Com.jcraft.jsch treatment found local test can, put in the company test environment error:

Java.net.ConnectException:Connection refused

Discovery: An exception occurred due to company security considerations that limited the company server SFTP permissions.



Operation of SFTP on Linux:

1:sftp-oport=22022 [email protected]

If the connection is denied, it is possible that SFTP is not supported locally on the SFTP server

Practical issues related to Java FTP sftp

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.