In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the JSch how to use the sftp protocol to achieve server file upload and download related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe you read this JSch how to use the sftp protocol to achieve server file upload and download articles will have a harvest, let's take a look.
What is Jsch?
JSch is a pure Java implementation of SSH2. It allows you to connect to a sshd server, using port forwarding, X11 forwarding, file transfer, and so on. You can integrate its functions into your own program. At the same time, the project also provides a J2ME version to connect directly to the SSHD server on the phone.
Jsch is very powerful, and bloggers are mainly used to do file operations here.
How do I use it? Add jar dependency com.jcraft jsch 0.1.53
I posted my SftpUtil below, and the comments are still clear.
/ * Content: upload and download sftp protocol files * Created by kl on 2016-5-6. * / public class SftpUtil {/ * upload files to the designated server * @ param ip connection ip * @ param user username * @ param psw password * @ param port port
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.