美文网首页
Mac中,在iTerm2下使用ssh访问Linux,类似xshe

Mac中,在iTerm2下使用ssh访问Linux,类似xshe

作者: Crassus | 来源:发表于2019-03-19 15:26 被阅读0次

1.配置Profiles

#!/usr/bin/expect -f
  set user <用户名>
  set host <ip地址>
  set password <密码>
  set timeout -1
 
  spawn ssh $user@$host -p 22
  expect "*assword:*"
  send "$password\r"
  interact
  expect eof

配置完毕后放在具体某处,命名如根据服务器名称命名103

2.iTerm2中配置Profiles

其中Command:expect <Profile存放地址>

image.png

3.iTerm2中菜单直接打开

image.png

相关文章

网友评论

      本文标题:Mac中,在iTerm2下使用ssh访问Linux,类似xshe

      本文链接:https://www.haomeiwen.com/subject/abagmqtx.html