Prettify and group your ~/.ssh/config.
Project description
sshow
sshow 是一个用来 美化展示 ~/.ssh/config 的小工具。
它支持按注释分组、子分组展示 SSH 主机,并提供简单的搜索与高亮功能,让你的 SSH 配置一目了然。
- 支持 Windows PowerShell / macOS Terminal / Linux 各种终端
- 默认读取
~/.ssh/config(Windows 下是C:\Users\<用户名>\.ssh\config) - 终端支持 ANSI 颜色时,会自动带颜色输出
安装
pip install --break-system-packages sshow
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Or
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
基本用法
sshow # 以分组、每行2个的方式打印你的ssh config
sshow -h # 打印所有可用命令
sshow --help
sshow -c 5 # 以分组、每行5个的方式打印你的ssh config
sshow --col 5
sshow -f path/to/your/ssh/config # 以分组、每行2个的方式打印你指定的ssh config
sshow --file path/to/your/ssh/config
sshow -s 192 # 打印出所有包含字符串 '192' 的主机
sshow --search 192
sshow -s 192 -c 5 # 也可以组合命令
示例:
#### Home
Host first
HostName 192.168.31.20
User Administrator
### Rasperries
Host pi8g
HostName 192.168.31.2
User root
Host pi4g
HostName 192.168.31.21
User erichuanp
在 sshow 里,结构会变成:
- 大组:
Home- hosts:
first - 小组:
Rasperries- hosts:
pi8g,pi4g
- hosts:
- hosts:
SSH Show
------------------------
Home # 大组(来自 #### Home),以红色标识出
Host: ...
Username: ...
IP&Port: ...
Rasperries # 小组(来自 ### Rasperries),以亮红色标识出
Host: ...
...
------------------------
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sshow-0.1.1.tar.gz
(5.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
sshow-0.1.1-py3-none-any.whl
(5.5 kB
view details)
File details
Details for the file sshow-0.1.1.tar.gz.
File metadata
- Download URL: sshow-0.1.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f60322cca237e690b64daf87922c99b275952d7fd2e0d8ff819aab5ea92937d7
|
|
| MD5 |
716e65ccb9cf8567d6fd422867ff041d
|
|
| BLAKE2b-256 |
bbe484a32b538c5be9ff2c6d3295d1bafee2fb1c47c2df4f6cfd8049cc9a5b7e
|
File details
Details for the file sshow-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sshow-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9155e7605347491dbd8f02b10f359a0b766ed58ce19b658a9e7699424c7e35dd
|
|
| MD5 |
a41a379bbef5bce1c4c69df5e955c71b
|
|
| BLAKE2b-256 |
6c22e6710f69c74d29a5321c1d31112331691ba8f19b90c81db0557f65c762f2
|