A terminal-based SSH connection manager that helps you manage and connect to your servers easily. 一个基于终端的 SSH 连接管理器,帮助您轻松管理和连接服务器。
- Simple and intuitive terminal UI 简单直观的终端界面
- JSON configuration file support 支持 JSON 配置文件
- Password and SSH key authentication 支持密码和 SSH 密钥认证
- Server management (add/delete) 服务器管理(添加/删除)
- Interactive server selection 交互式服务器选择
Clone the repository 克隆仓库
git clone https://github.com/thunur/sshmenu.git
cd sshmenu
go build -o sshmenu main.go
./sshmenu
go install github.com/thunur/sshmenu@latest
This will directly show the server selection menu. 这将直接显示服务器选择菜单。
./sshmenu -m
Enter management mode to add or delete servers. 进入管理模式以添加或删除服务器。
The configuration file is stored at ~/.sshmenu/config.json
配置文件存储在 ~/.sshmenu/config.json
Example configuration 配置示例:
{
"servers": [
{
"name": "Production Server",
"host": "prod.example.com",
"user": "admin",
"port": 22,
"key_path": "~/.ssh/id_rsa"
},
{
"name": "Test Server",
"host": "test.example.com",
"user": "developer",
"port": 22,
"password": "your-password"
}
]
}
↑/↓
: Navigate through items 上下移动选项Enter
: Select item 选择项目Ctrl+C
: Exit 退出Ctrl+D
: Exit 退出
- github.com/spf13/viper
- github.com/manifoldco/promptui
- golang.org/x/crypto/ssh
Q: How to backup my configuration? 如何备份配置?
A: Simply copy the ~/.sshmenu/config.json
file.
直接复制 ~/.sshmenu/config.json
文件即可。
Q: How to use SSH key authentication? 如何使用 SSH 密钥认证?
A: When adding a new server, choose "SSH Key" as authentication method and provide the path to your private key.
添加新服务器时,选择"SSH 密钥"作为认证方式,并提供私钥路径。
Q: Can I edit the configuration file manually? 可以手动编辑配置文件吗?
A: Yes, you can edit ~/.sshmenu/config.json
directly. Just make sure to follow the correct