ssh脚本登录

写.sh文件登录

#!/usr/bin/expect   

set timeout 10  

spawn ssh  username@ip

expect {  

"*password:" {send "password\r"}  

}  

interact

猜你喜欢

转载自blog.csdn.net/qyt0147/article/details/79198446