通过 SSH / 远程主机进行 OAuth

当 Hermes 在远程运行时,用 SSH 隧道完成基于环回重定向的 OAuth。

SSH 隧道方式

# 本地终端:
ssh -N -L 56121:127.0.0.1:56121 user@remote-host
 
# 远程终端:
hermes auth add xai-oauth --no-browser
# → 在本地浏览器中打开打印的 URL

无 SSH 客户端(Cloud Shell/Codespaces)

hermes auth add xai-oauth --manual-paste
# → 在浏览器中打开 → 授权 → 将回调 URL 粘贴回终端

需要隧道的 Provider

Provider端口
xAI Grok56121
Spotify43827

详见 workspace zh/guides/oauth-over-ssh.md