返回列表 发帖

ssh+expect

  1. #!/usr/bin/expect -f
  2. # Expect script to supply root/admin password for remote ssh
  3. spawn ssh -D 9999 user@site.com
  4. expect "user@site.com's password:"
  5. send "PASSWORD"
  6. send -- "\r"
  7. interact
复制代码

提示: 作者被禁止或删除 内容自动屏蔽

TOP

返回列表