在Java服务器上运行远程命令的最佳方式? [英] Best way to run remote commands on a Windows server from Java?

查看:161
本文介绍了在Java服务器上运行远程命令的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有任何现有的解决方案,从本地的Java远程执行命令在Windows服务器上? psexec.exe不是一个选项,因为java应用程序必须是跨平台的。

Are there any existing solutions for remote execution of commands on a windows server from Java natively? psexec.exe is not an option since the java application has to be cross platform.

即使是使用Java RM的预先存在的解决方案也是足够的。

Even a preexisting solution using Java RM would be sufficient.

目前,我使用SSH客户端库ssh通过java到运行cygwin SSH守护进程的Windows服务器。可悲的是,SSH守护进程在引用到CMD(而不是bash)shell的命令时遇到一些问题。

Currently, I'm using an SSH client library to ssh through java into a Windows server that's running the cygwin SSH daemon. Sadly the SSH daemon has some issues when it comes to quoting commands that go into a CMD (as opposed to bash) shell.

推荐答案

查看 Java RDP客户端

由于它使用了getopt,我认为它是GPL的,因为它不是真的开箱,但是很少挖掘你应该能够修剪它到你需要的。 d。

Since it uses getopt, I would assume it's GPL'd.

这篇关于在Java服务器上运行远程命令的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆