iterm2免密登录
增加如下sh脚本
#!/usr/bin/expect -f
trap {
set rows [stty rows]
set cols [stty columns]
stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH
set host 192.168.182.566 set user root set password 6666666 set timeout -1 spawn ssh $user@$host expect "*assword:*" send "$password\r" interact expect eof
iterm2中,增加如下配置
http://wxnacy.com/2018/02/26/iterm2-expect/