检测 SSH 服务器提供的算法

GET/ssh-algorithms

连接目标 SSH 端口,交换版本行后读取服务端的 SSH_MSG_KEXINIT,列出密钥交换、主机密钥、加密、MAC 和压缩算法,判断是否提供后量子混合密钥交换(mlkem768x25519-sha256、sntrup761x25519-sha512)、是否声明 strict KEX(Terrapin 缓解),并标出已弃用的算法。不做密钥交换,也不认证。只连接公网单播地址和常见 SSH 端口;Cloudflare 网段内的目标 Workers 不能直连,返回 verdict 为 cloudflare 且不发起连接。

访问公开(可选 Bearer)路径兼容GET /ssh-algorithms/{host}CLI 默认text/plain

请求参数

hostquery · 字符串必填

域名或公网 IP。

长度:1 ~ 253 字符路径简写:/ssh-algorithms/{host}示例:github.com
portquery · 整数

SSH 端口,可选 22、222、2022、2222、8022、22222

默认:22示例:22
通用输出参数_format_color展开
_formatquery · 字符串

响应格式:json 或 text(plain 为 text 别名)。

可选:json | text
_colorquery · 字符串

0、false、off 或 no 关闭 ANSI 颜色。

可选:0 | false | off | no

响应体

host字符串
port整数
address字符串
verdict字符串
可选:pq | classical | cloudflare
banner字符串 | null
software字符串 | null
openssh对象 | null

从版本行读出的 OpenSSH 版本,及该版本是否带 strict KEX(9.6)、sntrup761x25519(9.0 起默认)、mlkem768x25519(9.9)并默认启用(10.0)。非 OpenSSH 为 null。发行版可能反向移植补丁,只作参考。

version字符串
strictKex布尔值
sntrup布尔值
mlkem布尔值
mlkemDefault布尔值
postQuantum字符串数组
strictKex布尔值 | null
terrapin字符串 | null
可选:mitigated | vulnerable | not-affected | null
algorithms对象 | null
kex字符串数组
hostKey字符串数组
encryption字符串数组
mac字符串数组
compression字符串数组
deprecated对象数组
type字符串
可选:kex | hostKey | encryption | mac
name字符串
reason字符串
可选:sha1 | dsa | cbc | rc4 | des | md5 | truncated | none
latencyMs整数