
ssher
中文 | ENG
ssher 是一款连接远程服务器命令行工具,简单易用。
由于是使用 Go 语言开发,所以支持多平台,包括 Linux、MacOS 和 Windows。
🔍 预览

⚙️ 安装
直接 Go install 安装
如果本地已经安装了 Go 环境,可以直接使用 go install
安装:
go install github.com/poneding/ssher@latest
二进制文件
MacOS & Linux 安装,参考以下命令:
# MacOS
sudo wget https://github.com/poneding/ssher/releases/download/v1.1.0/ssher_1.1.0_darwin_arm64 -O /user/local/bin/ssher && sudo chmod +x /user/local/bin/ssher
# Linux
sudo wget https://github.com/poneding/ssher/releases/download/v1.1.0/ssher_1.1.0_linux_amd64 -O /user/local/bin/ssher && sudo chmod +x /user/local/bin/ssher
注意:下载前确认你的系统是 arm64
还是 amd64
,下载对应的二进制文件。
Windows 安装,参考以下步骤:
首先下载 ssher.exe
文件:
# 下载 .exe 文件
wget https://github.com/poneding/ssher/releases/download/v1.1.0/ssher_1.1.0_windows_amd64.exe
下载完成后,将 ssher.exe
文件路径添加到环境变量中,或者将其放到一个已经添加到环境变量的路径下。
浏览器下载
👉🏻 发布下载,国内网络访问可能受阻。
源码编译
需要安装 Go 环境,然后执行以下命令:
git clone https://github.com/poneding/ssher.git
cd ssher
go build -o ssher main.go
🛠️ 使用
快速开始
ssher
ssher -s <server>
输入以上命令,会进入交互模式,在交互模式中你可以使用通过 ↓ ↑ → ←
键选择你要连接的服务器或者添加新的服务器
服务器管理操作
# 查看 ssh 连接列表(list, ls)
ssher list
# 添加 ssh 连接
ssher add
# 删除 ssh 连接(remove, rm)
ssher remove
ssher remove <server_a> <server_b>
# 编辑 ssh 连接
ssher edit
ssher edit <server>
版本和升级
# 查看版本
ssher version
# 升级
ssher upgrade
命令自动补全
# 将补全脚本写入到 ~/.bashrc 或者 ~/.zshrc 中
# bash
echo 'source <(ssher completion bash)' >> ~/.bashrc
source ~/.bashrc
# zsh
echo 'source <(ssher completion zsh)' >> ~/.zshrc
source ~/.zshrc
⭐️ Stars

如果您觉得这个项目不错,欢迎给我一个 Star ⭐️,你的支持是我最大的动力。