item2充当ssh客户端
创建文件 /Users/name/item2/ssh/vps.conf
内容如下:
#!/usr/bin/expect -f
set user xxx
set password xxxxx
set host xxxxx
set port 22
set timeout -1
spawn ssh $user@$host
expect "*assword:*"
send "$password\r"
interact
expect eof
在 item2
菜单 Profiles--Open Profiles...
然后 Edit Profiles
窗口中新建一条记录,并设置为 command
: expect /Users/name/item2/ssh/vps.conf