更新时间:2022-12-23 09:41:59
If Machine A is a Windows box, you can use Plink (part of PuTTY) with the -m parameter, and it will execute the local script on the remote server.
plink root@MachineB -m local_script.sh
如果计算机A是基于Unix的系统,则可以使用:
If Machine A is a Unix-based system, you can use:
ssh root@MachineB 'bash -s' < local_script.sh
您不必将脚本复制到远程服务器即可运行.
You shouldn't have to copy the script to the remote server to run it.