开发者

Copying and executing local files to a remote server with windows and linux using java

What I'm attempting to do is copy a number of files from one host machine to a remote server using java and after the copy is made, I'll execute those files that I transferred. The host machine may have some dependencies like requiring putty or some other program but I'm hoping that there might be a solution that doesn't require anything installed on the remote side. And on top of that, this needs to be OS independent, though different methods can be used for different communications. I'll have access to the IP address and admin control (root username and password).

What I've had so far was that for Windows to Windows, I can mount the remote windows drive and access the files that way. In Windows to Linux, I can use putty or a similar program to ssh into the remote box. I'll also ssh from Linux to Linux and obviously I won't need putty. I can't figure out what to do for a Linux to Windows instance that won't require me setting up some ssh method on the remote end. Any ideas? Any way (or library) to perform both the copy and/or 开发者_高级运维execute methods that won't even be OS specific?


A simple solution is to use what Windows already offers: rdesktop or the more comfortable Terminal Server Client if you are on a Gnome machine.

To get the files to the Windows box, you can set up Samba Client on your Linux machine and mount the Windows file share, copy your files there, connect via rdesktop and then execute them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜