iTerm2免密登录

创建一个登录脚本

#!/usr/bin/expect

set timeout 10
spawn ssh [lindex $argv 0]@[lindex $argv 1]
expect {
    "(yes/no)?"
    {send "yes\n";exp_continue}
    "password:"
    {send "[lindex $argv 2]\n"}
}

interact

给脚本赋予执行权限

chmod +x *.sh

在iTerm2中配置
image-20200616114759666

猜你喜欢

转载自blog.csdn.net/bloodzer0/article/details/106784324