原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/11926792.html
vi app-stg.sh
#!/usr/bin/expect -f
#auto ssh login
set timeout
spawn ssh [email protected]
expect "password:"
send "12345678\r"
interact
wq后
chmod app-stg.sh
cd到脚本所在的目录,登录
./app-stg.sh
原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/11926792.html
vi app-stg.sh
#!/usr/bin/expect -f
#auto ssh login
set timeout
spawn ssh [email protected]
expect "password:"
send "12345678\r"
interact
wq后
chmod app-stg.sh
cd到脚本所在的目录,登录
./app-stg.sh