从 UNIX/LINUX 机器在 Windows 机器上执行命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5275450/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
executing command on a Windows Machine from a UNIX/LINUX Machine
提问by oaimac
is it possible to execute a command (ex: launching a .bat file located on the remote machine) on a Windows Remote Machine, using a UNIX or Linux Machine ?
是否可以使用 UNIX 或 Linux 机器在 Windows 远程机器上执行命令(例如:启动位于远程机器上的 .bat 文件)?
Is there something like a scp/ssh mechanism or at least a way to connect to a Windows Machine passing through the network ?
是否有类似 scp/ssh 机制或至少一种通过网络连接到 Windows 机器的方法?
Thanks for your help.
谢谢你的帮助。
回答by thkala
By default, recent Windows versions only support the Remote Desktop protocol. As far as I know, client versions only allow a single user, while server versions with installed Terminal Servicesallow for multiple simultaneous users.
默认情况下,最近的 Windows 版本仅支持远程桌面协议。据我所知,客户端版本只允许一个用户,而安装了终端服务的服务器版本允许多个用户同时使用。
Windows Server versions also support the Telnet protocol, but the server is disabled by default - it may not even be installed. Therefore you will have to enable it manually. Do you really want to use Telnetof all things, though? Just the security concerns are enough to make it mostly useless.
Windows Server 版本也支持 Telnet 协议,但默认情况下禁用服务器 - 它甚至可能没有安装。因此,您必须手动启用它。但是,您真的想使用Telnet进行所有操作吗?仅仅出于安全考虑就足以使它几乎毫无用处。
There is also a version of OpenSSH for Windows, that uses the Cygwin DLL. I have not tried it, but using an SSH implementation from the Unix world does have its appeal (and probably a few disadvantages). See also this.
还有一个用于 Windows的OpenSSH版本,它使用 Cygwin DLL。我还没有尝试过,但是使用来自 Unix 世界的 SSH 实现确实有其吸引力(可能还有一些缺点)。另请参见本。
EDIT:
编辑:
Recent Windows versions also support the Windows Remote Managementsystem, which allows you to launch an interactive session throuh a bit of trickery.
最近的Windows版本还支持Windows远程管理系统,它可以让你throuh有点推出的交互式会话欺骗。
回答by SOUser
You may want to try Vandyke VShell.
您可能想尝试Vandyke VShell。