Skip to content

ssh client with quick search and remote config

License

Notifications You must be signed in to change notification settings

codeskyblue/sshg

Repository files navigation

sshg

先说为什么起这个名字呢? 因为我之前起的几个名字sshx, sshs 都被别人捷足先登了,而且项目写的还不错。可他们的项目又不能满足我快速选择要连接的设备和远程配置的需求,所以我就只起sshg这个名字了

codecovPyPI version

支持的功能

  • 支持将ip,user,password写入到配置文件中,并快速的键盘选择上下选择功能(VIM的hj也支持)
  • 支持ssh跳板机的功能
  • 远程配置的功能

安装

pip3 install sshg

使用

创建配置文件 ~/.sshg.yml

文件内容例子

- name: inner-serveruser: appuserhost: 192.168.8.35port: 22password: 123456# login passwordvia: user: via-serverhost: 10.0.0.38port: 2222 - name: dev server fully configureduser: appuserhost: 192.168.1.1keypath: ~/.ssh/id_rsapassword: abcdefghijklmn # passphrasecallback-shells: - {delay: 1, cmd: "uptime" } - {cmd: "echo 1" } - name: dev groupport: 22# children will inherit all the configs as defaultchildren: - user: pc01host: 192.168.3.1 - user: pc02host: 192.168.3.2 - host: 192.168.3.3 # leave user empty will set to current user
$ sshg Use the arrow keys to navigate (support vim style): ↓ ↑ ✨ Select host ➤ inner-server [email protected] dev server fully configured [email protected] dev group # specify config file $ sshg --conf ~/.sshg.yml

开发者文档

# 没安装就装一下,项目依赖poetry发布# pip install poetry poetry self add "poetry-dynamic-versioning[plugin]" poetry publish --build # 进入到项目的虚拟环境 poetry shell

Refs

LICENSE

MIT

About

ssh client with quick search and remote config

Resources

License

Stars

Watchers

Forks

Packages

No packages published