且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从* nix中执行远程Windows计算机上的EXE或BAT文件

更新时间:2022-12-22 23:05:35

我preFER使用Cygwin和使用SSH然后登录到Windows机器上执行命令。要知道,在默认情况下,cygwin没有安装OpenSSH的。

I prefer to use cygwin and use SSH to then log in to the windows machine to execute commands. Be aware that, by default, cygwin doesn't have OpenSSH installed.

一旦你有SSH工作在Windows机器上你可以从Linux机器上像这样运行命令:

Once you have SSH working on the windows machine you can run a command on it from the Linux machine like this:

ssh user@windowsmachine 'mycommand.exe'

您还可以设置 ssh认证键,以便你不需要输入每次都输入密码。

You can also set up ssh authentication keys so that you don't need to enter a password each time.