/usr/local/bin/expect -f

set password   *******

spawn scp -rp /home/  x.x.x.x:/home/   ###不要写成/home/*

expcet "user@x.x.x.x's password:"

send "$password\r"

send "exit\r"

expect eof

###参考http://www.cnblogs.com/lzrabbit/p/4298794.html

相关文章:

  • 2021-10-20
  • 2021-12-15
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-18
  • 2021-06-04
  • 2022-12-23
  • 2021-11-06
  • 2021-12-14
  • 2022-02-12
相关资源
相似解决方案