#!/usr/bin/expect
spawn ssh [email protected]
expect "yes/no"
send "yes\r"
expect "password"
send "123456\r"

uj5u.com熱心網友回復:
expect "*password:*" {send "你的密碼\r";interact}追加 interact 可留下不退出!
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/130994.html
標籤:專題技術討論區
上一篇:dhcp
