ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] 1. 创建shell命令文件,具体的路径自己放置 `vim ~/iterm2login.sh` 内容: ``` #!/usr/bin/expect set timeout 30 spawn ssh -p [lindex $argv 0] [lindex $argv 1]@[lindex $argv 2] expect { "(yes/no)?" {send "yes\n";exp_continue} "password:" {send "[lindex $argv 3]\n"} } interact ``` 2. 赋予权限 `chmod +x ~/iterm2login.sh` 3. 测试,是否成功登陆 `~/iterm2login.sh 22 username 127.0.0.1 password` 4. 配置在item2中 ![](https://upload-images.jianshu.io/upload_images/3069960-f92722d3654fff01.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/700)