假设有三台机器 host1,host2,host3,host1能免密登录其他两台。要在第一台的机器里面写一个脚本分别删除每台机器的/root/test.txt

rm -rf /root/test.txt
ssh host2 <<eeooff
rm -rf /root/test.txt
exit
eeooff
ssh host3 <<eeooff
rm -rf /root/test.txt
exit
eeooff

 

相关文章:

  • 2021-12-23
  • 2022-02-22
  • 2022-01-25
  • 2021-08-13
  • 2021-12-05
  • 2022-12-23
猜你喜欢
  • 2021-05-29
  • 2021-10-03
  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案