[英]How to copy file from remote linux machine to JSP web directory
I want to create a JSP webpage which contains a button on click of which I want to copy a file from remote linux machine to my local directory (in windows) where JSP pages are hosted. 我想创建一个包含一个按钮的JSP网页,单击该按钮我想将文件从远程linux计算机复制到托管JSP页面的本地目录(在Windows中)。 I have the UserID and Password of that machine and I can connect to the remote server using SSH command in putty.
我具有该机器的用户名和密码,并且可以在腻子中使用SSH命令连接到远程服务器。
I am using Eclipse Indigo and Tomcat Server. 我正在使用Eclipse Indigo和Tomcat服务器。
您可以从远程计算机使用FTP吗?
You can use JSch to have a pure Java implementation of the SSH protocol and copy your file. 您可以使用JSch获得SSH协议的纯Java实现并复制文件。 File transfer (
scp
command) with JSch
can be a bit tricky, so you can add securechannelfacade to transfer your file properly 使用
JSch
进行文件传输( scp
命令)可能会有些棘手,因此您可以添加securechannelfacade来正确传输文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.