连接机器不输入密码
#!/usr/bin/env expect
spawn ssh guosong@xx_ip;
expect "*password*";
send "xx_password\r";
expect "*PASSCODE*"
send -- xx_pin码s
interact
连接机器不输入密码
spawn ssh guosong@xx_ip;
expect "*password*";
send "xx_password\r";
expect "*PASSCODE*"
send -- xx_pin码s
interact