Home > OS >  Expect was used to simulate the SSH log in, after execution of the script automatically quit SSH wha
Expect was used to simulate the SSH log in, after execution of the script automatically quit SSH wha

Time:10-17

 #! The/usr/bin/expect 
Spawn SSH [email protected]
Expect "yes/no"
Send "yes \ r"
Expect "password", "
Send "123456 \ r"




CodePudding user response:

Expect * password: "*" {send your password \ "r"; Interact}
Additional interact to leave don't quit!
  • Related