Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Batch file 批处理:在Windows计算机上通过ssh运行文件_Batch File_Ssh - Fatal编程技术网

Batch file 批处理:在Windows计算机上通过ssh运行文件

Batch file 批处理:在Windows计算机上通过ssh运行文件,batch-file,ssh,Batch File,Ssh,对于经验丰富的程序员来说,我要做的可能很简单。我有两台Windows机器:MachineA和MachineB。从MachineA,我想: 1) ssh到MachineB中,运行一个批处理文件,比如C:\parent\test.bat-start 2) 删除C:\parent文件夹 3) 将C:\parent文件夹从MachineA复制到MachineB中的C驱动器 4) 运行C:\parent\test.bat-停止 5) 我需要通过MachineA上的脚本(最好是批处理脚本)完成上述所有操作

对于经验丰富的程序员来说,我要做的可能很简单。我有两台Windows机器:MachineA和MachineB。从MachineA,我想:

1) ssh到MachineB中,运行一个批处理文件,比如C:\parent\test.bat-start 2) 删除C:\parent文件夹 3) 将C:\parent文件夹从MachineA复制到MachineB中的C驱动器 4) 运行C:\parent\test.bat-停止 5) 我需要通过MachineA上的脚本(最好是批处理脚本)完成上述所有操作

到目前为止,我读到的关于这个的大部分内容都使用plink或其他软件(有人建议使用WinSCP)。 如果我能在不安装任何软件的情况下完成这一切,那就太好了。有什么建议吗??
(两台机器上都有msysgit)

windows不支持SSH。您必须安装一个实用程序才能在远程计算机上运行命令

您可以在此帖子中找到详细信息:

您的另一个选项是使用Windows Powershell脚本