import subprocess

machines=["10.0.4.1",
"10.0.4.2",
"10.0.4.3",
"10.0.4.4",
"10.0.4.5",
"10.0.4.6",
"10.0.4.7",
"10.0.4.8",
"10.0.4.9",
"10.0.4.10"]
cmd = "hostname"
for machine in machines:
  subprocess.call("ssh root@%s %s" % (machine,cmd),shell=True)

  

相关文章:

  • 2021-06-07
  • 2022-12-23
  • 2022-02-09
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2021-06-13
  • 2021-05-30
  • 2021-05-29
  • 2021-08-01
相关资源
相似解决方案