如何使用perl触发另一台机器上运行的另一个perl scipt?

blu*_*ers 2 ssh perl execution

需要一种方法让一台机器上运行的perl脚本运行另一台运行的perl脚本.

远程机器配置是:

  • 的CentOS-5.5,
  • 它在同一个网络上是请求机器,
  • 有一个DNS,
  • 端口打开(SSH,HTTP)

问题,反馈,评论 - 只是评论,谢谢!

Nyl*_*ile 5

这是你想要的吗?

system("ssh user@remotemachine perl <remote script's full path>");
Run Code Online (Sandbox Code Playgroud)

将在远程计算机上运行该脚本.

你可能想要没有密码的ssh,请检查:http://linuxproblem.org/art_9.html

  • ssh没有指定密码作为参数的选项,它与system()没有任何关系 (2认同)