多linux服务器之间实现文件自动复制
时间:2024-05-30 05:07:21 点击:205

  #!/usr/bin/expect

  set password 1234 #密码

  #download

  spawn scp /root/test.jar root@192.168.1.2:/usr/local/

  set timeout 300

  expect “192.168.1.2's password:“

  set timeout 3000

  #exec sleep 1

  send “$passwordr“

  set timeout 300

  send “exitr“

  #expect eof

  interact

  spawn scp /root/test.jar root@192.168.1.3:/usr/local/

  set timeout 300

  expect “root@192.168.1.3's password:“

  set timeout 3000

  #exec sleep 1

  send “$passwordr“

  set timeout 300

  send “exitr“

  interact

最新游戏更多

最新软件更多

  • 玩家推荐
  • 游戏攻略

金钼软件下载站 Copyright(C) 2008- 601958.cn All Rights Reserved!

闽ICP备2023004188号| 免责声明