v0.4.0
🚀 新功能
非交互模式 — 一行命令配置 SSH 主机
add 命令新增 --host 等 CLI flag,跳过 TUI 向导,一条命令完成 SSH 主机配置。非交互模式先测连通性,通过后才动本地文件,失败时零副作用。
# 密码模式(自动生成密钥 + 部署公钥 + 写配置)
fuckssh add -H 1.2.3.4 -u root -P mypass -a myserver
# 密钥模式(已有私钥,只写配置)
fuckssh add -H 1.2.3.4 -u root -i ~/.ssh/id_ed25519
# 最简(user 默认 root,alias 从 host 自动生成)
fuckssh add -H 1.2.3.4 -P mypass| Flag | 短写 | 说明 |
|---|---|---|
--host |
-H |
主机地址(触发非交互模式) |
--user |
-u |
用户名(默认 root) |
--port |
-p |
端口(默认 22) |
--alias |
-a |
Host 别名(默认从 host 生成) |
--password |
-P |
密码 → 密码模式 |
--identity-file |
-i |
私钥路径 → 密钥模式 |
--remark |
-r |
备注 |
version 子命令
新增 fuckssh version,输出版本号、commit hash 与构建日期。原有的 fuckssh --version 依然可用。
fuckssh version
# v0.4.0 (fa87cc6, 2026-05-29)📦 安装
macOS / Linux (一键脚本)
curl -fsSL https://raw.githubusercontent.com/hczs/fuckssh/master/scripts/install.sh | bashWindows (PowerShell)
irm https://raw.githubusercontent.com/hczs/fuckssh/master/scripts/install.ps1 | iexGo 安装
go install github.com/fuckssh/fuckssh/cmd/fuckssh@v0.4.0