当 claude remote-control 找不到 claude.ai 登录时,Claude Code 会显示这个错误。运行 claude auth login,选择 claude.ai 选项,然后重试。
如果问题仍然存在,很可能是环境中的 API 密钥或令牌覆盖了登录。如果你想直接从 iPhone 访问 Mac 的终端,可以使用 Macky。
这个错误是什么意思
官方文档中这样列出了该提示:
Error: You must be logged in to use Remote Control.
Remote Control is only available with claude.ai subscriptions.Remote Control 只能配合 claude.ai 登录使用。如果你已退出登录,或者通过 Console 或 API 密钥登录,命令就会退出并显示这个错误。
方法 1:使用 claude.ai 登录
在终端中运行:
claude auth login当它询问如何登录时,选择 claude.ai 选项。你也可以先运行 claude,然后在会话中输入 /login。完成后,再次运行 claude remote-control。
方法 2:删除会覆盖登录的凭证
有些凭证的优先级高于你的登录。先检查你的 shell:
env | grep ANTHROPIC然后按下面的列表逐项排查:
- ANTHROPIC_API_KEY 或 ANTHROPIC_AUTH_TOKEN: 从 shell 环境中删除它,并从所有 Claude Code 设置文件的
env块中移除。当前 shell 可以使用unset ANTHROPIC_API_KEY。 - ANTHROPIC_BASE_URL: 指向 api.anthropic.com 以外的主机会阻止 Remote Control。请取消设置该变量。
- setup-token 登录:
claude setup-token生成的令牌或CLAUDE_CODE_OAUTH_TOKEN只涵盖模型请求。请运行claude auth login进行完整登录。
通过企业版 Claude apps gateway 登录也会阻止 Remote Control。
在 iPhone 上查看 Claude Code
Macky 可以把你 Mac 的终端带到 iPhone 上,端到端加密,并且不需要开放端口。你可以在 Mac 上打开终端并运行 claude。然后在手机上查看输出并回复。如果想了解其他移动端方案,请参阅 Claude Code on iPhone。

检查版本和套餐
Remote Control 需要 Claude Code v2.1.238 或更高版本。运行 claude --version 检查版本,如果版本较旧,请更新。在 Team 或 Enterprise 套餐中,需要由 Owner 在管理设置中开启 Remote Control 开关。
类似的 Remote Control 错误
这些提示看起来相似,但对应的问题不同:
| 提示 | 可能的解决方法 |
|---|---|
Remote Control requires a claude.ai subscription. | 已退出登录。运行 claude auth login。 |
Remote Control requires claude.ai subscription auth. | 正在使用 API 密钥或令牌。请将其删除。 |
Remote Control requires a full-scope login token | 将 setup-token 登录替换为 claude auth login。 |
Failed to create remote session. Try running /login and signing in with a claude.ai account (not Console). | 在使用 --remote 和 & 时出现。请使用 claude.ai 账号登录。 |
Error: Remote Control is not yet enabled for your account. | 请参阅 Claude Code Remote Control Not Working?。 |
如需了解设置基础和使用限制,请阅读 Claude Code Remote Control。
常见问题
如何远程连接 Claude Code?
在要运行 Claude Code 的机器上,打开终端并运行 claude remote-control。你需要 Claude Code v2.1.238 或更高版本,以及 claude.ai 登录。然后在手机上的 Claude 应用中打开该会话。
如何在 Mac 上启用 Remote Control?
把 Claude Code 更新到 v2.1.238 或更高版本,然后用 claude auth login 登录,并选择 claude.ai 选项。接着运行 claude remote-control。如果你使用 Team 或 Enterprise 套餐,需要先由 Owner 在管理设置中开启 Remote Control 开关。
Remote Control 可以使用 API 密钥吗?
不支持。API 密钥和 Bedrock 认证都不支持。有用户使用 Bedrock 凭证运行 claude remote-control 时,也遇到了同样的登录错误。
setup-token 登录可以用于 Remote Control 吗?
可以。claude setup-token 生成的令牌和 CLAUDE_CODE_OAUTH_TOKEN 只能用于模型请求,无法启动 Remote Control 会话。运行 claude auth login 即可获得完整登录。