iTerm2 使用笔记 (2)

四、更多特性

看官方文档:https://www.iterm2.com/features.html

五、DIY 功能 1、实现双击 Profiles 的服务器可以免密登录

(1)Profiles 设置里,指定如下图的路径expect /Users/xjnotxj/Program/ssh/121.xxx.xxx.xxx

(2)路径指定的文件121.xxx.xxx.xxx,内容如下:

#!/usr/bin/expect -f set user root set host 121.xxx.xxx.xxx set password xxxxsxx set timeout -1 spawn ssh $user@$host -o StrictHostKeyChecking=no expect "*assword:*" send "$password\r" interact expect eof

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wpfyxw.html