1 Star 0 Fork 0

metmit / sshx

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
ruesin 提交于 2019-07-19 21:18 . update readme

SSHX

SSHX 将host、port、user、password经过简单混淆之后,存储在本地文件。需要连接时,按照规则解析出必要信息,使用expect自动输入密码连接。

SSHX 目前提供了bash、golang两种使用方式,将sshx文件拷贝到可执行目录,即可使用。

依赖

  • expect:自动交互输入密码
  • ssh:建立连接必须的
  • md5sum:仅shell方式时需要,用于混淆
  • bc::仅shell方式时需要,用于混淆

使用

/yourpath/sshx -n connect_name -s connect_secret -o operation
  • -n connect_name:连接名称
  • -s connect_secret:混淆码,用于混淆存储
  • -o operation:操作add添加、del删除、con连接(默认)
# 创建连接配置
/yourpath/sshx -n connect_name -s connect_secret -o add

# 删除连接配置
/yourpath/sshx -n connect_name -s connect_secret -o add

# 建立连接
/yourpath/sshx -n connect_name -s connect_secret -o add
/yourpath/sshx -n connect_name -s connect_secret

# 直接使用,交互输入连接名、混淆码
/yourpath/sshx 

示例

# 拷贝可执行文件到bin # 也可拷贝go编译的文件
$ cp ./shell/sshx /usr/local/bin/

# 赋予可执行权限
$ chmod +x /usr/local/bin/sshx

# 查看文件位置
$ which sshx
/usr/local/bin/sshx

# 添加连接配置
$ sshx -o add

# 连接
$ sshx

iterm2

添加配置后,可通过iterm2profiles管理连接。

⌘ + ,偏好设置,选择Profiles添加快捷连接:

add

⌘ + o打开Profiles列表,选择连接打开:

list

连接成功:

connect

tab名称显示可在偏好设置 - Appearance 中勾选 Show profie name,可设置Badge在连接窗口显示。

添加的Tags可以方便的在连接时筛选。

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/metmit/sshx.git
git@gitee.com:metmit/sshx.git
metmit
sshx
sshx
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891