1 Star 1 Fork 0

FreedomLi / iTermLoginServerShell

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

iTermLoginServerShell

介绍

用于 macbook 中 iTerm 终端软件,可统一管理服务器信息,支持一键登录。

使用说明

  1. 安装 jq,用于解析 json 文件
    brew install jq
  2. 安装 expect,用于 ssh 登录服务器
    brew install expect
  3. 设置 goserver.sh 与 login.sh 文件的可执行权限
    chmod u+x goserver.sh
    chmod u+x login.sh
  4. 在 server.json 中添加服务器信息,用于 ssh 参数
    {    
        "serv1":{                
            "name":"服务器1",
            "ip":"xx.xx.xx.xx",
            "port":"22",
            "username":"xxx",
            "password":"xxx"
        },
        "serv2":{
            "name":"服务器2",
            "ip":"xx.xx.xx.xx",
            "port":"22",
            "username":"xxx",
            "password":"xxx"
        }
    }
  5. 在 iTerm 中设置 Profile
    iTerm -> Profiles -> +Add -> Command -> Login Shell 
    -> 填写 /Users/xxx/xxx/goserver.sh serv1
  6. 在 iTerm -> Profiles 列表中选择要访问的服务器,即可实现一键登录。

其他

  1. 可移动 goserver.sh、login.sh、server.json 到其他位置,但需要保证在同一路径下。

  2. 在命令行直接执行 /Users/xxx/xxx/goserver.sh serv1 ,也可实现一键登录服务器。

MIT License Copyright (c) 2021 FreedomLi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

用于 macbook 中 iTerm 终端软件,可统一管理服务器信息,支持一键登录。 展开 收起
Shell
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Shell
1
https://gitee.com/FreedomLi/iTerm-login-server-shell.git
git@gitee.com:FreedomLi/iTerm-login-server-shell.git
FreedomLi
iTerm-login-server-shell
iTermLoginServerShell
master

搜索帮助