SSH自动登录脚本
原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/11926792.html
vi app-stg.sh
1 #!/usr/bin/expect -f 2 #auto ssh login 3 set timeout 30 4 spawn ssh hatianqi@181.171.161.10 5 expect "password:" 6 send "12345678\r" 7 interact
wq后
1 chmod 744 app-stg.sh
cd到脚本所在的目录,登录
1 ./app-stg.sh
强者自救 圣者渡人