MENU

item2连接ssh

July 3, 2021 • MacOSX

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

Last Modified: July 9, 2021