连接机器不输入密码

#!/usr/bin/env expect
 

spawn ssh guosong@xx_ip;

expect "*password*";

send  "xx_password\r";

expect "*PASSCODE*"

send -- xx_pin码s

interact

05-11 11:33