Appearance
SSH ProxyCommand 排障
遇到 kex_exchange_identification、Connection closed by UNKNOWN port 65535 等错误时,应先确认连接断在哪一层。
推荐命令:
bash
ssh -G target-host
nc -vz 127.0.0.1 7897
nc -v -X 5 -x 127.0.0.1:7897 example.com 22
ssh -vvv target-host判断口径:
| 现象 | 优先判断 |
|---|---|
UNKNOWN port 65535 | 代理中转语境下的本地展示,不代表真实远端端口 |
| 认证前断开 | 优先检查代理出口、DNS、TUN、跳板策略 |
ProxyCommand=none 后无法解析 | 当前网络环境不支持直连解析 |
| TCP 通但 SSH 握手断开 | 继续查跳板策略、代理出口或服务端限制 |