多linux服务器之间实现文件自动复制
时间:2023-04-18 05:23:26 点击: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- ytdonghua.net All Rights Reserved!

闽ICP备2023006282号-2| 免责声明