Open cheungseol opened 7 years ago
脚本ssh登录开发机
test.sh
chmod a+x test.sh
#!/usr/bin/expect -f set USER cheungseol // username set HOST 1.1.1.1 // fake host addr set PASSWORD test123 // password set timeout -1 // expect mode never time out spawn ssh $USER@$HOST expect "*assword:*" send "$PASSWORD\r" # expect eof interact
脚本ssh登录开发机
test.sh
chmod a+x test.sh